CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
KinematicParameters.h
Go to the documentation of this file.
1 #ifndef KinematicParameters_H
2 #define KinematicParameters_H
3 
7 
17 
18 public:
19 
20  typedef ROOT::Math::SVector<double,7> AlgebraicVector7;
21 
23 
24  template<typename... Args>
26 
28  {}
29 
35  AlgebraicVector7 const & vector() const {return par;}
36 
42  double operator()(const int i) const {return par(i);}
43 
47  GlobalVector momentum() const {return GlobalVector(par[3], par[4], par[5]);}
48 
52  GlobalPoint position() const {return GlobalPoint(par[0], par[1], par[2]);}
53 
57  double mass() const {return par(6);}
58 
62  double energy() const {
63  return sqrt(par(3)*par(3)+par(4)*par(4)+par(5)*par(5)+par(6)*par(6));
64  }
65 
66 
67  bool isValid() const
68  {return vl;}
69 
70 private:
72  bool vl;
73 };
74 
75 
76 #endif
int i
Definition: DBlmapReader.cc:9
KinematicParameters(Args...args)
AlgebraicVector7 const & vector() const
The full vector (7 elements)
AlgebraicVector7 par
double operator()(const int i) const
Allows to access directly one component of the vector (index between 0 and 6)
Global3DPoint GlobalPoint
Definition: GlobalPoint.h:10
double energy() const
T sqrt(T t)
Definition: SSEVec.h:18
ROOT::Math::SVector< double, 7 > AlgebraicVector7
volatile std::atomic< bool > shutdown_flag false
GlobalPoint position() const
Global3DVector GlobalVector
Definition: GlobalVector.h:10
GlobalVector momentum() const
KinematicParameters(const AlgebraicVector7 &pr)