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 
17 
28 public:
29  // construst
30  //default constructor - needed for Persistency
31 
33 
35  : theGlobalParameters(aGlobalParameters), theCurvilinearError(InvalidError()) {}
36 
38  const GlobalVector& aP,
39  TrackCharge aCharge,
40  const MagneticField* fieldProvider)
41  : theGlobalParameters(aX, aP, aCharge, fieldProvider), theCurvilinearError(InvalidError()) {}
42 
44  const GlobalVector& aP,
45  TrackCharge aCharge,
46  const MagneticField* fieldProvider,
47  GlobalVector fieldValue)
48  : theGlobalParameters(aX, aP, aCharge, fieldProvider, fieldValue), theCurvilinearError(InvalidError()) {}
49 
51  const CurvilinearTrajectoryError& aCurvilinearError)
52  : theGlobalParameters(aGlobalParameters), theCurvilinearError(aCurvilinearError) {}
53 
55  const CartesianTrajectoryError& aCartesianError)
56  : theGlobalParameters(aGlobalParameters) {
57  createCurvilinearError(aCartesianError);
58  }
59 
62  const CurvilinearTrajectoryError& aCurvilinearError)
63  : theGlobalParameters(aGlobalParameters), theCurvilinearError(aCurvilinearError) {}
64 
65  // access
66  // propagate access to parameters
72 
73  // direct access
74 
75  bool hasCurvilinearError() const { return theCurvilinearError.valid(); }
76 
77  bool hasError() const { return hasCurvilinearError(); }
78 
80 
82  if
84  CartesianTrajectoryError aCartesianError;
85  createCartesianError(aCartesianError);
86  return aCartesianError;
87  }
88 
90  if
92  return theCurvilinearError;
93  }
94 
95  void rescaleError(double factor);
96 
99 
101 
103  // void setCurvilinearError(const AlgebraicSymMatrix55 &err) {
104  // theCurvilinearError = CurvilinearTrajectoryError(err);
105  // }
106 
107 private:
108  void missingError() const; // dso_internal;
109 
110  // convert curvilinear errors to cartesian
111  void createCartesianError(CartesianTrajectoryError& aCartesianError) const; // dso_internal;
112 
113  // convert cartesian errors to curvilinear
114  void createCurvilinearError(CartesianTrajectoryError const& aCartesianError) const; // dso_internal;
115 
116 private:
119 };
120 
121 std::ostream& operator<<(std::ostream& os, const FreeTrajectoryState& fts);
122 
123 #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)
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
ROOT::Math::SMatrix< double, 6, 6, ROOT::Math::MatRepSym< double, 6 > > AlgebraicSymMatrix66
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