CMS 3D CMS Logo

FreeTrajectoryState.h
Go to the documentation of this file.
1 #ifndef _TRACKER_FREETRAJECTORYSTATE_H_
2 #define _TRACKER_FREETRAJECTORYSTATE_H_
3 
4 // base trajectory state class
5 // track parameters and error covariance matrix
6 
12 
13 #include <iosfwd>
14 
15 
18 
19 
30 public:
31 // construst
32 //default constructor - needed for Persistency
33 
36 
37  FreeTrajectoryState(const GlobalTrajectoryParameters& aGlobalParameters) :
38  theGlobalParameters(aGlobalParameters),
40  {}
41 
43  const GlobalVector& aP,
44  TrackCharge aCharge,
45  const MagneticField* fieldProvider) :
46  theGlobalParameters(aX, aP, aCharge, fieldProvider),
48  {}
49 
50 
52  const GlobalVector& aP,
53  TrackCharge aCharge,
54  const MagneticField* fieldProvider,
55  GlobalVector fieldValue) :
56  theGlobalParameters(aX, aP, aCharge, fieldProvider,fieldValue),
58  {}
59 
60 
61 
63  const CurvilinearTrajectoryError& aCurvilinearError) :
64  theGlobalParameters(aGlobalParameters),
65  theCurvilinearError(aCurvilinearError)
66  {}
67 
68 
69 
71  const CartesianTrajectoryError& aCartesianError) :
72  theGlobalParameters(aGlobalParameters)
73  { createCurvilinearError(aCartesianError); }
74 
77  const CurvilinearTrajectoryError& aCurvilinearError) :
78  theGlobalParameters(aGlobalParameters),
79  theCurvilinearError(aCurvilinearError)
80  {}
81 
82 // access
83 // propagate access to parameters
86  }
89  }
90  TrackCharge charge() const {
91  return theGlobalParameters.charge();
92  }
93  double signedInverseMomentum() const {
95  }
96  double transverseCurvature() const {
98  }
99 
100 // direct access
101 
103 
104  bool hasError() const {
105  return hasCurvilinearError();
106  }
107 
108 
110  return theGlobalParameters;
111  }
112 
113 
115  if UNLIKELY(!hasError()) missingError();
116  CartesianTrajectoryError aCartesianError;
117  createCartesianError(aCartesianError);
118  return aCartesianError;
119  }
120 
122  if UNLIKELY(!hasError()) missingError();
123  return theCurvilinearError;
124  }
125 
126  void rescaleError(double factor);
127 
128 
131  }
134  }
135 
137  return theCurvilinearError;
138  }
139 
141  theCurvilinearError = err;
142  }
143 // void setCurvilinearError(const AlgebraicSymMatrix55 &err) {
144 // theCurvilinearError = CurvilinearTrajectoryError(err);
145 // }
146 
147 private:
148 
149 
150  void missingError() const; // dso_internal;
151 
152 // convert curvilinear errors to cartesian
153  void createCartesianError(CartesianTrajectoryError & aCartesianError) const; // dso_internal;
154 
155 
156 // convert cartesian errors to curvilinear
157  void createCurvilinearError(CartesianTrajectoryError const & aCartesianError) const; // dso_internal;
158 
159 private:
160 
163 
164 };
165 
166 std::ostream& operator<<(std::ostream& os, const FreeTrajectoryState& fts);
167 
168 #endif
std::ostream & operator<<(std::ostream &os, const FreeTrajectoryState &fts)
CartesianTrajectoryError cartesianError() const
const GlobalTrajectoryParameters & parameters() const
bool hasCurvilinearError() const
void setCartesianError(const AlgebraicSymMatrix66 &err)
ROOT::Math::SMatrix< double, 6, 6, ROOT::Math::MatRepSym< double, 6 > > AlgebraicSymMatrix66
CurvilinearTrajectoryError theCurvilinearError
TrackCharge charge() const
const CurvilinearTrajectoryError & curvilinearError() const
FreeTrajectoryState(const GlobalTrajectoryParameters &aGlobalParameters, const CartesianTrajectoryError &, const CurvilinearTrajectoryError &aCurvilinearError)
FreeTrajectoryState(const GlobalTrajectoryParameters &aGlobalParameters, const CartesianTrajectoryError &aCartesianError)
FreeTrajectoryState(const GlobalPoint &aX, const GlobalVector &aP, TrackCharge aCharge, const MagneticField *fieldProvider)
GlobalTrajectoryParameters theGlobalParameters
int TrackCharge
Definition: TrackCharge.h:4
void createCurvilinearError(CartesianTrajectoryError const &aCartesianError) const
FreeTrajectoryState(const GlobalTrajectoryParameters &aGlobalParameters, const CurvilinearTrajectoryError &aCurvilinearError)
GlobalVector momentum() const
void setCurvilinearError(const CurvilinearTrajectoryError &err)
void setCartesianError(const CartesianTrajectoryError &err)
GlobalPoint position() const
void rescaleError(double factor)
void createCartesianError(CartesianTrajectoryError &aCartesianError) const
CurvilinearTrajectoryError & setCurvilinearError()
FreeTrajectoryState(const GlobalTrajectoryParameters &aGlobalParameters)
double transverseCurvature() const
#define UNLIKELY(x)
Definition: Likely.h:21
FreeTrajectoryState(const GlobalPoint &aX, const GlobalVector &aP, TrackCharge aCharge, const MagneticField *fieldProvider, GlobalVector fieldValue)
double signedInverseMomentum() const