CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
GlobalTrajectoryParameters.h
Go to the documentation of this file.
1 #ifndef _TRACKER_GLOBALTRAJECTORYPARAMETERS_H_
2 #define _TRACKER_GLOBALTRAJECTORYPARAMETERS_H_
3 
8 
9 class MagneticField;
16 public:
17 // construct
19  theField(0),
20  theX(), theP(),
21  theCharge(0)
22  {} // we must initialize cache to non-NAN to avoid FPE
23 
28  const GlobalVector& aP,
29  TrackCharge aCharge,
30  const MagneticField* fieldProvider);
31 
38  const GlobalVector& direction,
39  float transverseCurvature, int,
40  const MagneticField* fieldProvider);
41 
46  return theX;
47  }
48 
53  return theP;
54  }
55 
57  return theP.unit();
58  }
59 
63  TrackCharge charge() const {
64  return theCharge;
65  }
66 
70  float signedInverseMomentum() const {
71  return theCharge/theP.mag();
72  }
73 
78  return theCharge/theP.perp();
79  }
80 
86  float transverseCurvature() const {
87  return -2.99792458e-3f * signedInverseTransverseMomentum() * cachedMagneticField.z();
88  }
89 
95  //AlgebraicVector6 v;
96  //v[0] = theX.x();
97  //v[1] = theX.y();
98  //v[2] = theX.z();
99  //v[3] = theP.x();
100  //v[4] = theP.y();
101  //v[5] = theP.z();
102  return AlgebraicVector6(theX.x(),theX.y(),theX.z(),theP.x(),theP.y(),theP.z());
103  }
104 
105 
108  return 2.99792458e-3f * cachedMagneticField;
109  }
110 
111  const MagneticField& magneticField() const {return *theField;}
112 
113 
114 private:
119  signed char theCharge;
120 
121 };
122 
123 #endif
T perp() const
Definition: PV3DBase.h:72
T y() const
Definition: PV3DBase.h:63
ROOT::Math::SVector< double, 6 > AlgebraicVector6
int TrackCharge
Definition: TrackCharge.h:4
T mag() const
Definition: PV3DBase.h:67
T z() const
Definition: PV3DBase.h:64
GlobalVector magneticFieldInInverseGeV() const
double f[11][100]
Vector3DBase unit() const
Definition: Vector3DBase.h:57
const MagneticField & magneticField() const
Definition: DDAxes.h:10
T x() const
Definition: PV3DBase.h:62
AlgebraicVector6 vector() const