CMS 3D CMS Logo

KinematicParameters.h
Go to the documentation of this file.
1 #ifndef KinematicParameters_H
2 #define KinematicParameters_H
3 
7 
16 public:
17  typedef ROOT::Math::SVector<double, 7> AlgebraicVector7;
18 
20 
21  template <typename... Args>
22  KinematicParameters(Args... args) : par(args...), vl(true) {}
23 
25 
31  AlgebraicVector7 const& vector() const { return par; }
32 
38  double operator()(const int i) const { return par(i); }
39 
43  GlobalVector momentum() const { return GlobalVector(par[3], par[4], par[5]); }
44 
48  GlobalPoint position() const { return GlobalPoint(par[0], par[1], par[2]); }
49 
53  double mass() const { return par(6); }
54 
58  double energy() const { return sqrt(par(3) * par(3) + par(4) * par(4) + par(5) * par(5) + par(6) * par(6)); }
59 
60  bool isValid() const { return vl; }
61 
62 private:
64  bool vl;
65 };
66 
67 #endif
Vector3DBase
Definition: Vector3DBase.h:8
writedatasetfile.args
args
Definition: writedatasetfile.py:18
Matrices.h
mps_fire.i
i
Definition: mps_fire.py:428
funct::false
false
Definition: Factorize.h:29
KinematicParameters::AlgebraicVector7
ROOT::Math::SVector< double, 7 > AlgebraicVector7
Definition: KinematicParameters.h:17
KinematicParameters::mass
double mass() const
Definition: KinematicParameters.h:53
KinematicParameters::momentum
GlobalVector momentum() const
Definition: KinematicParameters.h:43
GlobalVector
Global3DVector GlobalVector
Definition: GlobalVector.h:10
KinematicParameters::energy
double energy() const
Definition: KinematicParameters.h:58
KinematicParameters::vl
bool vl
Definition: KinematicParameters.h:64
KinematicParameters::isValid
bool isValid() const
Definition: KinematicParameters.h:60
mathSSE::sqrt
T sqrt(T t)
Definition: SSEVec.h:19
GlobalPoint
Global3DPoint GlobalPoint
Definition: GlobalPoint.h:10
Point3DBase< float, GlobalTag >
funct::true
true
Definition: Factorize.h:173
sipixeldigitoraw
Definition: SiPixelDigiToRaw.cc:39
KinematicParameters
Definition: KinematicParameters.h:15
KinematicParameters::KinematicParameters
KinematicParameters()
Definition: KinematicParameters.h:19
KinematicParameters::KinematicParameters
KinematicParameters(Args... args)
Definition: KinematicParameters.h:22
KinematicParameters::vector
AlgebraicVector7 const & vector() const
The full vector (7 elements)
Definition: KinematicParameters.h:31
KinematicParameters::operator()
double operator()(const int i) const
Allows to access directly one component of the vector (index between 0 and 6)
Definition: KinematicParameters.h:38
GlobalVector.h
KinematicParameters::position
GlobalPoint position() const
Definition: KinematicParameters.h:48
KinematicParameters::KinematicParameters
KinematicParameters(const AlgebraicVector7 &pr)
Definition: KinematicParameters.h:24
GlobalPoint.h
KinematicParameters::par
AlgebraicVector7 par
Definition: KinematicParameters.h:63