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/TrajectoryState/interface/TrackCharge.h"
00007 #include "DataFormats/Math/interface/AlgebraicROOTObjects.h"
00008
00009 class MagneticField;
00010
00016 class GlobalTrajectoryParameters {
00017 public:
00018
00019 GlobalTrajectoryParameters() :
00020 theField(0),
00021 theX(), theP(),
00022 cachedCurvature_(0.0),
00023 theCharge(0),
00024 hasCurvature_(false) {}
00025
00029 GlobalTrajectoryParameters(const GlobalPoint& aX,
00030 const GlobalVector& aP,
00031 TrackCharge aCharge,
00032 const MagneticField* fieldProvider) :
00033 theField(fieldProvider),
00034 theX(aX), theP(aP),
00035 cachedCurvature_(aCharge),
00036 theCharge(aCharge),
00037 hasCurvature_(false) {
00038 }
00039
00045 GlobalTrajectoryParameters(const GlobalPoint& aX,
00046 const GlobalVector& direction,
00047 float transverseCurvature, int,
00048 const MagneticField* fieldProvider);
00049
00053 GlobalPoint position() const {
00054 return theX;
00055 }
00056
00060 GlobalVector momentum() const {
00061 return theP;
00062 }
00063
00067 TrackCharge charge() const {
00068 return theCharge;
00069 }
00070
00074 float signedInverseMomentum() const {
00075 return theCharge/theP.mag();
00076 }
00077
00081 float signedInverseTransverseMomentum() const {
00082 return theCharge/theP.perp();
00083 }
00084
00090 float transverseCurvature() const;
00091
00096 AlgebraicVector6 vector() const {
00097
00098
00099
00100
00101
00102
00103
00104 return AlgebraicVector6(theX.x(),theX.y(),theX.z(),theP.x(),theP.y(),theP.z());
00105 }
00106
00107
00108 GlobalVector magneticFieldInInverseGeV( const GlobalPoint& x) const;
00109 const MagneticField& magneticField() const {return *theField;}
00110
00111
00112 private:
00113 const MagneticField* theField;
00114 GlobalPoint theX;
00115 GlobalVector theP;
00116 mutable float cachedCurvature_;
00117 signed char theCharge;
00118 mutable bool hasCurvature_;
00119
00120
00121 };
00122
00123 #endif