Go to the documentation of this file.00001 #ifndef _TRACKER_GLOBALTRAJECTORYPARAMETERS_H_
00002 #define _TRACKER_GLOBALTRAJECTORYPARAMETERS_H_
00003
00004 #include "DataFormats/GeometryVector/interface/GlobalPoint.h"
00005 #include "DataFormats/GeometryVector/interface/GlobalVector.h"
00006 #include "DataFormats/CLHEP/interface/AlgebraicObjects.h"
00007 #include "DataFormats/TrajectoryState/interface/TrackCharge.h"
00008
00009 class MagneticField;
00010
00016 class GlobalTrajectoryParameters {
00017 public:
00018
00019 GlobalTrajectoryParameters() :
00020 theX(), theP(), theCharge(0), theField(0),
00021 hasCurvature_(false), cachedCurvature_(1.0) {}
00022
00026 GlobalTrajectoryParameters(const GlobalPoint& aX,
00027 const GlobalVector& aP,
00028 TrackCharge aCharge,
00029 const MagneticField* fieldProvider) :
00030 theX(aX), theP(aP), theCharge(aCharge), theField(fieldProvider),
00031 hasCurvature_(false), cachedCurvature_(1.0) {}
00032
00039 GlobalTrajectoryParameters(const GlobalPoint& aX,
00040 const GlobalVector& direction,
00041 double transverseCurvature, int,
00042 const MagneticField* fieldProvider);
00043
00047 GlobalPoint position() const {
00048 return theX;
00049 }
00050
00054 GlobalVector momentum() const {
00055 return theP;
00056 }
00057
00061 TrackCharge charge() const {
00062 return theCharge;
00063 }
00064
00068 double signedInverseMomentum() const {
00069 return theCharge/theP.mag();
00070 }
00071
00075 double signedInverseTransverseMomentum() const {
00076 return theCharge/theP.perp();
00077 }
00078
00084 double transverseCurvature() const;
00085
00090 AlgebraicVector6 vector() const {
00091
00092
00093
00094
00095
00096
00097
00098 return AlgebraicVector6(theX.x(),theX.y(),theX.z(),theP.x(),theP.y(),theP.z());
00099 }
00100
00105 AlgebraicVector vector_old() const { return asHepVector(vector()); }
00106
00107 GlobalVector magneticFieldInInverseGeV( const GlobalPoint& x) const;
00108 const MagneticField& magneticField() const {return *theField;}
00109
00110 private:
00111 GlobalPoint theX;
00112 GlobalVector theP;
00113 TrackCharge theCharge;
00114 const MagneticField* theField;
00115 mutable bool hasCurvature_; mutable double cachedCurvature_;
00116
00117
00118 };
00119
00120 #endif