LorentzVectorBase.hh
Go to the documentation of this file.
1 #pragma once
2 
3 #include <climits>
4 
5 #include "boca/math/Vector3.hh"
6 
7 namespace boca
8 {
9 
14 enum class LorentzDim
15 {
16  x,
17  y,
18  z,
19  t,
20  last
21 };
22 
23 std::string Name(LorentzDim lorentz_dim);
24 
25 std::vector<LorentzDim> LorentzDimensions();
26 
31 template<typename Value_>
32 class LorentzVectorBase : boost::totally_ordered<LorentzVectorBase<Value_>>
33  , boost::additive<LorentzVectorBase<Value_>>
34  , Vector3<Value_>
35 {
36 
37  using ValueSquare = boca::ValueSquare<Value_>;
38 
39  template<typename Value_2>
40  using ValueProduct = boca::ValueProduct<Value_, Value_2>;
41 
42  template<typename Value_2>
43  using ValueQuotient = ValueQuotient<Value_, Value_2>;
44 
45  template <typename> struct IsQuantity : std::false_type {};
46  template <typename T> struct IsQuantity<boost::units::quantity<T>> : std::true_type {};
47 
48  template<typename Value_2>
49  using OnlyIfNotOrSameQuantity = typename std::enable_if < !IsQuantity<Value_2>::value || std::is_same<Value_, Value_2>::value >::type;
50 
51 protected:
52 
53  template<typename Value_2>
54  using OnlyIfNotQuantity = typename std::enable_if < !IsQuantity<Value_2>::value >::type;
55 
56 public:
57 
66  constexpr LorentzVectorBase() :
67  Vector3<Value_>(),
68  scalar_(Value_(0)) {}
69 
73  constexpr LorentzVectorBase(Value_ x, Value_ y, Value_ z, Value_ t) :
74  Vector3<Value_>(x, y, z),
75  scalar_(t) {}
76 
80  constexpr LorentzVectorBase(Vector3<Value_> const &vector3, Value_ const &t) :
81  Vector3<Value_>(vector3),
82  scalar_(t) {}
83 
87  template<typename Value_2>
88  constexpr LorentzVectorBase(LorentzVectorBase<Value_2> const &lorentz_vector) :
89  Vector3<Value_>(lorentz_vector.Spatial()),
90  scalar_(lorentz_vector.Scalar()) {}
92 
101  void SetVectT(Vector3<Value_> const &spatial, Value_ t)
102  {
103  Spatial() = spatial;
104  Scalar() = t;
105  }
106 
108 
110 
112 
114 
118  void SetRho(Value_ rho)
119  {
120  Spatial().SetMag(rho);
121  }
122 
126  void SetMag(Value_ magnitude)
127  {
128  Scalar() = magnitude >= Value_(0) ? sqrt(sqr(Spatial()) + sqr(magnitude)) : sqrt(std::max((sqr(Spatial()) - sqr(magnitude)), ValueSquare(0)));
129  }
130 
134  void SetVectMag(Vector3<Value_> const &spatial, Value_ magnitude)
135  {
136  Spatial() = spatial;
137  SetMag(magnitude);
138  }
139 
143  void SetPerpEtaPhiMag(Value_ const &perp, boca::Angle const &eta, boca::Angle const &phi, Value_ const &mag)
144  {
145  SetPerpEtaPhi(perp, eta, phi);
146  SetMag(mag);
147  }
148 
152  void SetPerpEtaPhiT(Value_ const &perp, boca::Angle const &eta, boca::Angle const &phi, Value_ const &t)
153  {
154  SetPerpEtaPhi(perp, eta, phi);
155  scalar_ = t;
156  }
157 
159 
168  constexpr Vector3<Value_> const& Spatial() const
169  {
170  return *this;
171  }
172 
177  {
178  return *this;
179  }
180 
181  using Vector3<Value_>::X;
182 
183  using Vector3<Value_>::Y;
184 
185  using Vector3<Value_>::Z;
186 
191  Value_ &Scalar()
192  {
193  return scalar_;
194  }
195 
196  Value_ &T()
197  {
198  return scalar_;
199  }
201 
206  constexpr Value_ const& Scalar() const
207  {
208  return scalar_;
209  }
210 
211  constexpr Value_ const& T() const
212  {
213  return scalar_;
214  }
216 
218 
224  using Vector3<Value_>::Phi;
225 
227 
229 
231 
233 
234 // using Vector3<Value_>::Angle;
235 //
236 // /**
237 // * @brief Angle wrt. another vector.
238 // */
239 // boca::Angle Angle(LorentzVectorBase const &vector) const
240 // {
241 // return Angle(vector.Spatial());
242 // }
243 
244  using Vector3<Value_>::Eta;
245 
247 
253  {
254  return 0.5 * units::log(static_cast<double>(Plus() / Minus()));
255  }
256 
257  boca::Angle Rap() const
258  {
259  return Rapidity();
260  }
262 
266  boca::Angle Rapidity(Vector3<double> const &vector) const
267  {
268  auto const mag_2 = vector.Mag2();
269  if (mag_2 <= 0) return 0_rad;
270  auto const vdotu = Spatial().Dot(vector) / sqrt(mag_2);
271  if (vdotu == Value_(0)) return 0_rad;
272 // if (Scalar() <= Value_(0)) std::cout << "Tried to take rapidity of negative-energy Lorentz vector" << '\n';
273 // auto pt = sqrt(units::max(sqr(Scalar() * std::numeric_limits<double>::epsilon()), Perp2(vector) + Mag2()));
274  auto const mt = sqrt(Perp2(vector) + Mag2());
275  if (mt == Value_(0)) return 0_rad;
276  auto const rap = units::log(static_cast<double>((Scalar() + abs(Z())) / mt));
277  return Z() > Value_(0) ? rap : -rap;
278  }
279 
281 
283 
287  template <typename Value_2_>
289  {
290  return Rap() - vector.Rap();
291  }
292 
296  template <typename Value_2_>
298  {
299  return sqrt(sqr(DeltaRapTo(vector)) + sqr(DeltaPhiTo(vector)));
300  }
301 
303 
310 
311  using Vector3<Value_>::Perp;
312 
316  constexpr ValueSquare Rho2() const
317  {
318  return Spatial().Mag2();
319  }
320 
324  constexpr Value_ Rho() const
325  {
326  return Spatial().Mag();
327  }
328 
332  constexpr ValueSquare Mag2() const
333  {
334  return sqr(Scalar()) - Rho2();
335  }
336 
342  constexpr Value_ Mag() const
343  {
344  auto const mag2 = Mag2();
345  return mag2 < ValueSquare(0) ? -sqrt(-mag2) : sqrt(mag2);
346  }
347 
351  constexpr ValueSquare MagT2() const
352  {
353  return sqr(Scalar()) - sqr(Z());
354  }
355 
359  constexpr Value_ MagT() const
360  {
361  auto const mt2 = MagT2();
362  return mt2 < ValueSquare(0) ? -sqrt(-mt2) : sqrt(mt2);
363  }
364 
368  constexpr ValueSquare ScalarT2() const
369  {
370  return sqr(Scalar()) * SinTheta2();
371  }
372 
376  constexpr Value_ ScalarT() const
377  {
378  return Scalar() < Value_(0) ? -sqrt(ScalarT2()) : sqrt(ScalarT2());
379  }
380 
384  template<typename Value, typename = OnlyIfNotQuantity<Value>>
385  constexpr ValueSquare ScalarT2(Vector3<Value> const &vector) const
386  {
387  auto const pt2 = Spatial().Perp2(vector);
388  return pt2 == ValueSquare(0) ? ValueSquare(0) : sqr(Scalar()) * pt2 / (pt2 + sqr(Spatial().Dot(vector.Unit())));
389  }
390 
394  template<typename Value, typename = OnlyIfNotQuantity<Value>>
395  constexpr Value_ ScalarT(Vector3<Value> const &vector) const
396  {
397  return Scalar() < Value_(0) ? -sqrt(Et2(vector)) : sqrt(Et2(vector));
398  }
399 
403  constexpr double Beta() const
404  {
405  return Rho() / Scalar();
406  }
407 
411  constexpr double Gamma() const
412  {
413  return 1. / std::sqrt(1. - sqr(Beta()));
414  }
415 
421  constexpr Value_ Plus() const
422  {
423  return Scalar() + Z();
424  }
425 
431  constexpr Value_ Minus() const
432  {
433  return Scalar() - Z();
434  }
436 
445  constexpr Vector3<double> BoostVector() const
446  {
447  return Scalar() == Value_(0) ? Vector3<double> {} :
448  Vector3<double> {Spatial() / Scalar()};
449  }
450 
452 
454 
459  {
460  return -BoostVector();
461  }
462 
466  constexpr LorentzVectorBase<Value_> Boosted(Vector3<double> const &boost) const
467  {
468  auto lorentz_vector = *this;
469  return lorentz_vector.Boost(boost);
470  }
472 
482  {
483  auto const mag_2 = boost.Mag2();
484  auto const gamma = 1 / sqrt(1 - mag_2);
485  auto const gamma2 = mag_2 > 0 ? (gamma - 1) / mag_2 : 0;
486  auto const bp = boost * Spatial();
487  auto const scaled = gamma * Scalar();
488 
489  Spatial() += boost * (gamma2 * bp + scaled);
490  Scalar() = scaled + gamma * bp;
491  return *this;
492  }
493 
495 
497 
499 
508  template <typename Value_2>
509  constexpr LorentzVectorBase<ValueProduct<Value_2>> Scale(Value_2 const &scalar) const
510  {
511  return {Spatial() *scalar, Scalar() *scalar};
512  }
513 
517  template <typename Value_2>
518  constexpr ValueProduct<Value_2> Dot(LorentzVectorBase<Value_2> const &lorentz_vector) const
519  {
520  return Scalar() * lorentz_vector.Scalar() - Spatial().Dot(lorentz_vector.Spatial());
521  }
522 
526  template <typename Value_2>
527  constexpr ValueProduct<Value_2> Euclidean(LorentzVectorBase<Value_2> const &lorentz_vector) const
528  {
529  return Scalar() * lorentz_vector.Scalar() + Spatial().Dot(lorentz_vector.Spatial());
530  }
531 
533 
542  constexpr bool operator<(LorentzVectorBase const &lorentz_vector) const
543  {
544  return Mag2() < lorentz_vector.Mag2();
545  }
546 
550  constexpr bool operator==(LorentzVectorBase const &lorentz_vector) const
551  {
552  return Spatial() == lorentz_vector.Spatial() && Scalar() == lorentz_vector.Scalar();
553  }
554 
558  template <typename Value_2, typename = OnlyIfNotOrSameQuantity<Value_2>>
560  {
561  Spatial() += lorentz_vector.Spatial();
562  scalar_ += lorentz_vector.Scalar();
563  return *this;
564  }
565 
570  template <typename Value_2, typename = OnlyIfNotOrSameQuantity<Value_2>>
572  {
573  Spatial() -= lorentz_vector.Spatial();
574  scalar_ -= lorentz_vector.Scalar();
575  return *this;
576  }
577 
581  template <typename Value_2, typename = OnlyIfNotQuantity<Value_2>>
582  LorentzVectorBase &operator*=(Value_2 scalar)
583  {
584  Spatial() *= scalar;
585  Scalar() *= scalar;
586  return *this;
587  }
588 
592  template <typename Value_2, typename = OnlyIfNotQuantity<Value_2>>
593  LorentzVectorBase &operator/=(Value_2 scalar)
594  {
595  Spatial() /= scalar;
596  Scalar() /= scalar;
597  return *this;
598  }
599 
603  template <typename Value_2>
604  constexpr LorentzVectorBase<ValueQuotient<Value_2>> operator/(Value_2 const &scalar) const
605  {
606  return Scale(1. / scalar);
607  }
608 
612  constexpr LorentzVectorBase operator-() const
613  {
614  return { -Spatial(), -Scalar()};
615  }
616 
620  Value_ const &operator[](LorentzDim lorentz_dim) const
621  {
622  switch (lorentz_dim) {
623  case LorentzDim::x :
624  return Spatial()[Dim3::x];
625  case LorentzDim::y :
626  return Spatial()[Dim3::y];
627  case LorentzDim::z :
628  return Spatial()[Dim3::z];
629  case LorentzDim::t :
630  return scalar_;
631  default:
632  Default("LorentzVector", Name(lorentz_dim));
633  return Spatial()[Dim3::x];
634  }
635  }
636 
640  Value_ &operator[](LorentzDim lorentz_dim)
641  {
642  return const_cast<Value_ &>(static_cast<LorentzVectorBase<Value_> const *>(this)[lorentz_dim]);
643  }
644 
648  friend auto &operator<<(std::ostream &stream, LorentzVectorBase<Value_> const &lorentz_vector)
649  {
650  stream << Stream(lorentz_vector.Scalar()) << lorentz_vector.Spatial();
651  return stream;
652  }
653 
655 
662 
664  {
665  return {this, LorentzDim::x};
666  }
667 
669  {
670  return {this, LorentzDim::last};
671  }
672 
674  {
675  return {this, LorentzDim::x};
676  }
677 
679  {
680  return {this, LorentzDim::last};
681  }
682 
684 
685 protected:
686 
690  Value_ scalar_;
691 
692 };
693 
694 template<typename Value>
695 using OnlyIfNotLorentzVectorBase = typename std::enable_if<std::is_base_of<LorentzVectorBase<Value>, Value>::value>::type;
696 
700 template <class Value, class Value_2>
701 constexpr auto operator*(LorentzVectorBase<Value> const &lorentz_vector_1, LorentzVectorBase<Value_2> const &lorentz_vector_2)
702 {
703  return lorentz_vector_1.Dot(lorentz_vector_2);
704 }
705 
709 template < class Value, class Value_2, typename = OnlyIfNotLorentzVectorBase<Value_2> >
710 constexpr auto operator*(LorentzVectorBase<Value> const &lorentz_vector, Value_2 scalar)
711 {
712  return lorentz_vector.Scale(scalar);
713 }
714 
718 template < class Value, class Value_2, typename = OnlyIfNotLorentzVectorBase<Value> >
719 constexpr auto operator*(Value scalar, LorentzVectorBase<Value_2> const &lorentz_vector)
720 {
721  return lorentz_vector.Scale(scalar);
722 }
723 
724 }
725 
726 namespace boost{
727 
728 template<typename Value_>
729 struct range_const_iterator< boca::LorentzVectorBase<Value_> > {
731 };
732 
733 template<typename Value_>
734 struct range_mutable_iterator< boca::LorentzVectorBase<Value_> > {
736 };
737 
738 }
void SetVectT(Vector3< Value_ > const &spatial, Value_ t)
Set components.
Definition: LorentzVectorBase.hh:101
void SetVectMag(Vector3< Value_ > const &spatial, Value_ magnitude)
Copy spatial coordinates, and set .
Definition: LorentzVectorBase.hh:134
LorentzVectorBase & operator+=(LorentzVectorBase< Value_2 > const &lorentz_vector)
Additions.
Definition: LorentzVectorBase.hh:559
constexpr ValueSquare Mag2() const
Square of the magnitude .
Definition: LorentzVectorBase.hh:332
constexpr ConstIterator< Vector3, Value_ > end() const
Definition: LorentzVectorBase.hh:668
constexpr Value_ Rho() const
spatial radius
Definition: LorentzVectorBase.hh:324
Dim3
Three dimensions.
Definition: Vector3.hh:13
Boost provides free peer-reviewed portable C++ source libraries.
Definition: LorentzVectorBase.hh:726
constexpr ValueProduct< Value_2 > Dot(LorentzVectorBase< Value_2 > const &lorentz_vector) const
Scalar dot product with a lorentz vector.
Definition: LorentzVectorBase.hh:518
constexpr ConstIterator< Vector3, Value_ > begin() const
Definition: LorentzVectorBase.hh:663
Iterator< Vector3, Value_ > end()
Definition: LorentzVectorBase.hh:678
void SetRho(Value_ rho)
Set spatial magnitude.
Definition: LorentzVectorBase.hh:118
constexpr Vector3< Value_ > const & Spatial() const
Getter for the spatial components.
Definition: LorentzVectorBase.hh:168
constexpr double Beta() const
Relative velocity .
Definition: LorentzVectorBase.hh:403
boost::units::quantity< boost::units::si::plane_angle > Angle
Angle measured in radian.
Definition: Si.hh:35
constexpr LorentzVectorBase< ValueProduct< Value_2 > > Scale(Value_2 const &scalar) const
Scale.
Definition: LorentzVectorBase.hh:509
constexpr ValueSquare Rho2() const
Square of the spatial radius .
Definition: LorentzVectorBase.hh:316
Value_ scalar_
time or energy component
Definition: LorentzVectorBase.hh:690
boost::units::quantity< boost::units::si::plane_angle, Y >::type log(const boost::units::dimensionless_quantity< boost::units::si::system, Y > &number)
log returning Angle
Definition: Units.hh:86
::Rho Rho
Definition: TypeDef.hh:21
const iterator
Definition: Iterator.hh:84
constexpr Value_ Minus() const
Negative light cone component .
Definition: LorentzVectorBase.hh:431
constexpr Value_ Mag() const
Magnitude .
Definition: LorentzVectorBase.hh:342
std::string Stream(Value const &message, int width=20, bool right=false)
Definition: Debug.hh:48
constexpr Value_ ScalarT() const
transvere scalar square
Definition: LorentzVectorBase.hh:376
constexpr LorentzVectorBase(Value_ x, Value_ y, Value_ z, Value_ t)
Constructor accepting the components x, y, z, t.
Definition: LorentzVectorBase.hh:73
LorentzDim
Lorentz Dimensions.
Definition: LorentzVectorBase.hh:14
void SetPerpEtaPhiT(Value_ const &perp, boca::Angle const &eta, boca::Angle const &phi, Value_ const &t)
Set perp, , and time.
Definition: LorentzVectorBase.hh:152
constexpr ValueSquare Mag2() const
The magnitude squared .
Definition: Vector3.hh:385
constexpr auto operator*(LorentzVectorBase< Value > const &lorentz_vector_1, LorentzVectorBase< Value_2 > const &lorentz_vector_2)
Scalar product of lorentzvectors.
Definition: LorentzVectorBase.hh:701
constexpr LorentzVectorBase()
Default constructor.
Definition: LorentzVectorBase.hh:66
typename std::enable_if< !IsQuantity< Value_2 >::value >::type OnlyIfNotQuantity
Definition: LorentzVectorBase.hh:54
Vector3< double > Unit() const
Unit vector parallel to this.
Definition: Vector3.hh:517
constexpr LorentzVectorBase(Vector3< Value_ > const &vector3, Value_ const &t)
Constructor accepting a 3-Vector and a scalar component.
Definition: LorentzVectorBase.hh:80
constexpr ValueSquare ScalarT2() const
transvere scalar square
Definition: LorentzVectorBase.hh:368
auto sqr(Value const &value)
square of value
Definition: Math.hh:24
constexpr ValueSquare MagT2() const
Square of the transvere magnitude .
Definition: LorentzVectorBase.hh:351
boca::Angle Rap() const
Rapidity .
Definition: LorentzVectorBase.hh:257
constexpr Vector3< double > BoostVector() const
Spatial components divided by the time component.
Definition: LorentzVectorBase.hh:445
constexpr LorentzVectorBase operator-() const
Unary minus.
Definition: LorentzVectorBase.hh:612
ValueSqrt< Value > sqrt(Value const &value)
Square Root.
Definition: Units.hh:160
constexpr LorentzVectorBase< ValueQuotient< Value_2 > > operator/(Value_2 const &scalar) const
Divison by scalar.
Definition: LorentzVectorBase.hh:604
constexpr Value_ Plus() const
Positive light cone component .
Definition: LorentzVectorBase.hh:421
constexpr Value_ const & T() const
Getter for the scalar component.
Definition: LorentzVectorBase.hh:211
constexpr LorentzVectorBase< Value_ > Boosted(Vector3< double > const &boost) const
Boosted Lorentz vector.
Definition: LorentzVectorBase.hh:466
void Default(std::string const &variable, const Value value)
Definition: Debug.hh:165
LorentzVectorBase & operator-=(LorentzVectorBase< Value_2 > const &lorentz_vector)
Subtractions.
Definition: LorentzVectorBase.hh:571
constexpr bool operator<(LorentzVectorBase const &lorentz_vector) const
Less than comparison.
Definition: LorentzVectorBase.hh:542
typename boost::units::multiply_typeof_helper< Value, Value_2 >::type ValueProduct
Definition: Units.hh:134
Iterator< Vector3, Value_ > begin()
Definition: LorentzVectorBase.hh:673
void SetPerpEtaPhiMag(Value_ const &perp, boca::Angle const &eta, boca::Angle const &phi, Value_ const &mag)
Set perp, , and magnitude.
Definition: LorentzVectorBase.hh:143
Boosted Collider Analysis.
Definition: Analysis.hh:15
Value abs(Value const &value)
Absolute value.
Definition: Units.hh:235
typename boost::units::multiply_typeof_helper< Value, Value >::type ValueSquare
Definition: Units.hh:143
Value_ & T()
Getter for the spatial components.
Definition: LorentzVectorBase.hh:196
Three dimensionial vector.
Definition: PseudoJet.hh:20
constexpr ValueProduct< Value_2 > Euclidean(LorentzVectorBase< Value_2 > const &lorentz_vector) const
Euclidean product with a lorentz vector.
Definition: LorentzVectorBase.hh:527
LorentzVectorBase & operator/=(Value_2 scalar)
Divison by scalar.
Definition: LorentzVectorBase.hh:593
constexpr Value_ MagT() const
Transvere magnitude .
Definition: LorentzVectorBase.hh:359
void SetMag(Value_ magnitude)
Set Nergy according to spatial component and magnitude .
Definition: LorentzVectorBase.hh:126
boca::Angle Rapidity(Vector3< double > const &vector) const
Rapidity with respect to another vector.
Definition: LorentzVectorBase.hh:266
constexpr ValueSquare ScalarT2(Vector3< Value > const &vector) const
Transverse scalar squared towards a vector.
Definition: LorentzVectorBase.hh:385
boca::Angle DeltaRapTo(LorentzVectorBase< Value_2_ > const &vector) const
Difference in Rapidity to a vector .
Definition: LorentzVectorBase.hh:288
constexpr Value_ const & Scalar() const
Getter for the scalar component.
Definition: LorentzVectorBase.hh:206
constexpr double Gamma() const
Lorentz factor .
Definition: LorentzVectorBase.hh:411
Iterator
Definition: Iterator.hh:23
boca::Angle Rapidity() const
Rapidity .
Definition: LorentzVectorBase.hh:252
Value max(Value const &value_1, Value const &value_2)
Maximal value.
Definition: Units.hh:260
double perp(fastjet::PseudoJet const &v_pj, fastjet::PseudoJet const &ref_pj)
Definition: FWM.cc:27
Value_ const & operator[](LorentzDim lorentz_dim) const
components by index.
Definition: LorentzVectorBase.hh:620
Vector3< Value_ > & Spatial()
Accessor for the spatial components.
Definition: LorentzVectorBase.hh:176
typename std::enable_if< std::is_base_of< LorentzVectorBase< Value >, Value >::value >::type OnlyIfNotLorentzVectorBase
Definition: LorentzVectorBase.hh:695
constexpr bool operator==(LorentzVectorBase const &lorentz_vector) const
Equality comparison.
Definition: LorentzVectorBase.hh:550
LorentzVectorBase< Value_ > & Boost(Vector3< double > const &boost)
Boost this Lorentz vector.
Definition: LorentzVectorBase.hh:481
Value_ & operator[](LorentzDim lorentz_dim)
components by index.
Definition: LorentzVectorBase.hh:640
Value_ & Scalar()
Accessor for the scalar.
Definition: LorentzVectorBase.hh:191
Lorentz Vector.
Definition: LorentzVectorBase.hh:32
std::string Name(Output output)
Definition: Base.cpp:23
LorentzVectorBase & operator*=(Value_2 scalar)
Product with scalar.
Definition: LorentzVectorBase.hh:582
boca::Iterator< boca::LorentzVectorBase, Value_ > type
Definition: LorentzVectorBase.hh:735
constexpr LorentzVectorBase(LorentzVectorBase< Value_2 > const &lorentz_vector)
Copy constructor with casting.
Definition: LorentzVectorBase.hh:88
constexpr Value_ ScalarT(Vector3< Value > const &vector) const
Transverse scalar towards a vector.
Definition: LorentzVectorBase.hh:395
boca::Angle DeltaRTo(LorentzVectorBase< Value_2_ > const &vector) const
Difference in agular space to a vector to vector.
Definition: LorentzVectorBase.hh:297
boca::ConstIterator< boca::LorentzVectorBase, Value_ > type
Definition: LorentzVectorBase.hh:730
constexpr Vector3< double > BoostIntoRestFrame() const
Definition: LorentzVectorBase.hh:458
std::vector< LorentzDim > LorentzDimensions()
Definition: LorentzVectorBase.cpp:17