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
Vector3DBase
Definition: Vector3DBase.h:8
Likely.h
FreeTrajectoryState::momentum
GlobalVector momentum() const
Definition: FreeTrajectoryState.h:68
FreeTrajectoryState::FreeTrajectoryState
FreeTrajectoryState(const GlobalTrajectoryParameters &aGlobalParameters)
Definition: FreeTrajectoryState.h:34
Visibility.h
GlobalTrajectoryParameters.h
TrackCharge
int TrackCharge
Definition: TrackCharge.h:4
FreeTrajectoryState::createCartesianError
void createCartesianError(CartesianTrajectoryError &aCartesianError) const
Definition: FreeTrajectoryState.cc:31
FreeTrajectoryState::hasError
bool hasError() const
Definition: FreeTrajectoryState.h:77
CurvilinearTrajectoryError::valid
bool valid() const
Definition: CurvilinearTrajectoryError.h:49
GlobalTrajectoryParameters::position
GlobalPoint position() const
Definition: GlobalTrajectoryParameters.h:60
FreeTrajectoryState::charge
TrackCharge charge() const
Definition: FreeTrajectoryState.h:69
GlobalTrajectoryParameters::charge
TrackCharge charge() const
Definition: GlobalTrajectoryParameters.h:72
FreeTrajectoryState::createCurvilinearError
void createCurvilinearError(CartesianTrajectoryError const &aCartesianError) const
Definition: FreeTrajectoryState.cc:39
FreeTrajectoryState::signedInverseMomentum
double signedInverseMomentum() const
Definition: FreeTrajectoryState.h:70
FreeTrajectoryState::position
GlobalPoint position() const
Definition: FreeTrajectoryState.h:67
FreeTrajectoryState::missingError
void missingError() const
Definition: FreeTrajectoryState.cc:16
FreeTrajectoryState::FreeTrajectoryState
FreeTrajectoryState(const GlobalTrajectoryParameters &aGlobalParameters, const CartesianTrajectoryError &aCartesianError)
Definition: FreeTrajectoryState.h:54
FreeTrajectoryState::theGlobalParameters
GlobalTrajectoryParameters theGlobalParameters
Definition: FreeTrajectoryState.h:117
FreeTrajectoryState::setCartesianError
void setCartesianError(const AlgebraicSymMatrix66 &err)
Definition: FreeTrajectoryState.h:98
TrajectoryStateExceptions.h
UNLIKELY
#define UNLIKELY(x)
Definition: Likely.h:21
FreeTrajectoryState::setCurvilinearError
void setCurvilinearError(const CurvilinearTrajectoryError &err)
Definition: FreeTrajectoryState.h:102
FreeTrajectoryState::cartesianError
CartesianTrajectoryError cartesianError() const
Definition: FreeTrajectoryState.h:81
CurvilinearTrajectoryError
Definition: CurvilinearTrajectoryError.h:27
FreeTrajectoryState::FreeTrajectoryState
FreeTrajectoryState(const GlobalTrajectoryParameters &aGlobalParameters, const CurvilinearTrajectoryError &aCurvilinearError)
Definition: FreeTrajectoryState.h:50
CurvilinearTrajectoryError.h
FreeTrajectoryState::curvilinearError
const CurvilinearTrajectoryError & curvilinearError() const
Definition: FreeTrajectoryState.h:89
FreeTrajectoryState::FreeTrajectoryState
FreeTrajectoryState()
Definition: FreeTrajectoryState.h:32
TrackCharge.h
AlgebraicSymMatrix66
ROOT::Math::SMatrix< double, 6, 6, ROOT::Math::MatRepSym< double, 6 > > AlgebraicSymMatrix66
Definition: AlgebraicROOTObjects.h:24
CartesianTrajectoryError.h
DQMScaleToClient_cfi.factor
factor
Definition: DQMScaleToClient_cfi.py:8
GlobalTrajectoryParameters
Definition: GlobalTrajectoryParameters.h:15
Point3DBase< float, GlobalTag >
GlobalTrajectoryParameters::momentum
GlobalVector momentum() const
Definition: GlobalTrajectoryParameters.h:65
GlobalTrajectoryParameters::transverseCurvature
float transverseCurvature() const
Definition: GlobalTrajectoryParameters.h:89
runTheMatrix.err
err
Definition: runTheMatrix.py:288
FreeTrajectoryState::FreeTrajectoryState
FreeTrajectoryState(const GlobalPoint &aX, const GlobalVector &aP, TrackCharge aCharge, const MagneticField *fieldProvider, GlobalVector fieldValue)
Definition: FreeTrajectoryState.h:43
FreeTrajectoryState::parameters
const GlobalTrajectoryParameters & parameters() const
Definition: FreeTrajectoryState.h:79
FreeTrajectoryState::FreeTrajectoryState
FreeTrajectoryState(const GlobalTrajectoryParameters &aGlobalParameters, const CartesianTrajectoryError &, const CurvilinearTrajectoryError &aCurvilinearError)
Definition: FreeTrajectoryState.h:60
FreeTrajectoryState::FreeTrajectoryState
FreeTrajectoryState(const GlobalPoint &aX, const GlobalVector &aP, TrackCharge aCharge, const MagneticField *fieldProvider)
Definition: FreeTrajectoryState.h:37
FreeTrajectoryState::theCurvilinearError
CurvilinearTrajectoryError theCurvilinearError
Definition: FreeTrajectoryState.h:118
CartesianTrajectoryError
Definition: CartesianTrajectoryError.h:15
FreeTrajectoryState
Definition: FreeTrajectoryState.h:27
operator<<
std::ostream & operator<<(std::ostream &os, const FreeTrajectoryState &fts)
FreeTrajectoryState::setCurvilinearError
CurvilinearTrajectoryError & setCurvilinearError()
Definition: FreeTrajectoryState.h:100
GlobalTrajectoryParameters::signedInverseMomentum
float signedInverseMomentum() const
Definition: GlobalTrajectoryParameters.h:77
FreeTrajectoryState::hasCurvilinearError
bool hasCurvilinearError() const
Definition: FreeTrajectoryState.h:75
MagneticField
Definition: MagneticField.h:19
FreeTrajectoryState::setCartesianError
void setCartesianError(const CartesianTrajectoryError &err)
Definition: FreeTrajectoryState.h:97
FreeTrajectoryState::transverseCurvature
double transverseCurvature() const
Definition: FreeTrajectoryState.h:71
FreeTrajectoryState::rescaleError
void rescaleError(double factor)
Definition: FreeTrajectoryState.cc:46
InvalidError
Definition: TrivialError.h:8