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  theX(), theP(), theCharge(0), theField(0),
21  hasCurvature_(false), cachedCurvature_(1.0) {} // we must initialize cache to non-NAN to avoid FPE
22 
27  const GlobalVector& aP,
28  TrackCharge aCharge,
29  const MagneticField* fieldProvider) :
30  theX(aX), theP(aP), theCharge(aCharge), theField(fieldProvider),
31  hasCurvature_(false), cachedCurvature_(1.0) {} // we must initialize cache to non-NAN to avoid FPE
32 
40  const GlobalVector& direction,
41  double transverseCurvature, int,
42  const MagneticField* fieldProvider);
43 
48  return theX;
49  }
50 
55  return theP;
56  }
57 
61  TrackCharge charge() const {
62  return theCharge;
63  }
64 
68  double signedInverseMomentum() const {
69  return theCharge/theP.mag();
70  }
71 
76  return theCharge/theP.perp();
77  }
78 
84  double transverseCurvature() const;
85 
91  //AlgebraicVector6 v;
92  //v[0] = theX.x();
93  //v[1] = theX.y();
94  //v[2] = theX.z();
95  //v[3] = theP.x();
96  //v[4] = theP.y();
97  //v[5] = theP.z();
98  return AlgebraicVector6(theX.x(),theX.y(),theX.z(),theP.x(),theP.y(),theP.z());
99  }
100 
106 
108  const MagneticField& magneticField() const {return *theField;}
109 
110 private:
115  mutable bool hasCurvature_; mutable double cachedCurvature_;
116  //mutable bool hasMagneticField_; mutable GlobalVector cachedMagneticField_; //
117 
118 };
119 
120 #endif
T perp() const
Definition: PV3DBase.h:66
T y() const
Definition: PV3DBase.h:57
GlobalVector magneticFieldInInverseGeV(const GlobalPoint &x) const
ROOT::Math::SVector< double, 6 > AlgebraicVector6
int TrackCharge
Definition: TrackCharge.h:4
T mag() const
Definition: PV3DBase.h:61
T z() const
Definition: PV3DBase.h:58
CLHEP::HepVector AlgebraicVector
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:56
CLHEP::HepVector asHepVector(const ROOT::Math::SVector< double, N > &v)
Definition: Migration.h:43
AlgebraicVector6 vector() const
AlgebraicVector vector_old() const