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 
33  const GlobalVector& aP,
34  TrackCharge aCharge,
35  const MagneticField* fieldProvider,
36  GlobalVector fieldValue);
37 
38 
45  const GlobalVector& direction,
46  float transverseCurvature, int,
47  const MagneticField* fieldProvider);
48 
49 
51  const GlobalVector& direction,
52  float transverseCurvature, int,
53  const MagneticField* fieldProvider,
54  GlobalVector fieldValue);
55 
56 
61  return theX;
62  }
63 
68  return theP;
69  }
70 
72  return theP.unit();
73  }
74 
78  TrackCharge charge() const {
79  return theCharge;
80  }
81 
85  float signedInverseMomentum() const {
86  return theCharge/theP.mag();
87  }
88 
93  return theCharge/theP.perp();
94  }
95 
101  float transverseCurvature() const {
102  return -2.99792458e-3f * signedInverseTransverseMomentum() * cachedMagneticField.z();
103  }
104 
110  //AlgebraicVector6 v;
111  //v[0] = theX.x();
112  //v[1] = theX.y();
113  //v[2] = theX.z();
114  //v[3] = theP.x();
115  //v[4] = theP.y();
116  //v[5] = theP.z();
117  return AlgebraicVector6(theX.x(),theX.y(),theX.z(),theP.x(),theP.y(),theP.z());
118  }
119 
120 
123  return 2.99792458e-3f * cachedMagneticField;
124  }
125 
127  return cachedMagneticField;
128  }
129 
130  const MagneticField& magneticField() const {return *theField;}
131 
132 
133 private:
138  signed char theCharge;
139 
140 };
141 
142 #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
GlobalVector magneticFieldInTesla() const
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
T x() const
Definition: PV3DBase.h:62
AlgebraicVector6 vector() const