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;
10 
17 public:
18 // construct
20  theField(0),
21  theX(), theP(),
22  cachedCurvature_(0.0),
23  theCharge(0),
24  hasCurvature_(false) {} // we must initialize cache to non-NAN to avoid FPE
25 
30  const GlobalVector& aP,
31  TrackCharge aCharge,
32  const MagneticField* fieldProvider) :
33  theField(fieldProvider),
34  theX(aX), theP(aP),
35  cachedCurvature_(aCharge),
36  theCharge(aCharge),
38  } // we must initialize cache to non-NAN to avoid FPE
39 
46  const GlobalVector& direction,
47  float transverseCurvature, int,
48  const MagneticField* fieldProvider);
49 
54  return theX;
55  }
56 
61  return theP;
62  }
63 
65  return theP.unit();
66  }
67 
71  TrackCharge charge() const {
72  return theCharge;
73  }
74 
78  float signedInverseMomentum() const {
79  return theCharge/theP.mag();
80  }
81 
86  return theCharge/theP.perp();
87  }
88 
94  float transverseCurvature() const;
95 
101  //AlgebraicVector6 v;
102  //v[0] = theX.x();
103  //v[1] = theX.y();
104  //v[2] = theX.z();
105  //v[3] = theP.x();
106  //v[4] = theP.y();
107  //v[5] = theP.z();
108  return AlgebraicVector6(theX.x(),theX.y(),theX.z(),theP.x(),theP.y(),theP.z());
109  }
110 
111 
113  const MagneticField& magneticField() const {return *theField;}
114 
115 
116 private:
120  mutable float cachedCurvature_;
121  signed char theCharge;
122  mutable bool hasCurvature_;
123  //mutable bool hasMagneticField_; mutable GlobalVector cachedMagneticField_; //
124 
125 };
126 
127 #endif
T perp() const
Definition: PV3DBase.h:71
T y() const
Definition: PV3DBase.h:62
GlobalVector magneticFieldInInverseGeV(const GlobalPoint &x) const
ROOT::Math::SVector< double, 6 > AlgebraicVector6
int TrackCharge
Definition: TrackCharge.h:4
T mag() const
Definition: PV3DBase.h:66
T z() const
Definition: PV3DBase.h:63
Vector3DBase unit() const
Definition: Vector3DBase.h:57
GlobalTrajectoryParameters(const GlobalPoint &aX, const GlobalVector &aP, TrackCharge aCharge, const MagneticField *fieldProvider)
const MagneticField & magneticField() const
Definition: DDAxes.h:10
T x() const
Definition: PV3DBase.h:61
AlgebraicVector6 vector() const