CMS 3D CMS Logo

FastHelix.h
Go to the documentation of this file.
1 #ifndef TR_FastHelix_H_
2 #define TR_FastHelix_H_
4 
8 
25 class MagneticField;
26 class FastHelix {
27 public:
28  //Original constructor (no basis vertex)
29  FastHelix(const GlobalPoint& oHit,
30  const GlobalPoint& mHit,
31  const GlobalPoint& aVertex,
32  double nomField,
33  MagneticField const* ibField)
34  : bField(ibField), theCircle(oHit, mHit, aVertex) {
35  tesla0 = 0.1 * nomField;
36  maxRho = maxPt / (0.01 * 0.3 * tesla0);
37  useBasisVertex = false;
38  compute();
39  }
40 
41  //New constructor (with basis vertex)
42  FastHelix(const GlobalPoint& oHit,
43  const GlobalPoint& mHit,
44  const GlobalPoint& aVertex,
45  double nomField,
46  MagneticField const* ibField,
47  const GlobalPoint& bVertex)
48  : bField(ibField), basisVertex(bVertex), theCircle(oHit, mHit, aVertex) {
49  tesla0 = 0.1 * nomField;
50  maxRho = maxPt / (0.01 * 0.3 * tesla0);
51  useBasisVertex = true;
52  compute();
53  }
54 
56 
57  bool isValid() const { return theCircle.isValid(); }
58 
60 
61  const FastCircle& circle() const { return theCircle; }
62 
63 private:
64  GlobalPoint const& outerHit() const { return theCircle.outerPoint(); }
65  GlobalPoint const& middleHit() const { return theCircle.innerPoint(); }
66  GlobalPoint const& vertex() const { return theCircle.vertexPoint(); }
67 
68  void compute();
71 
72 private:
73  static constexpr float maxPt = 10000; // 10Tev
74 
75  MagneticField const* bField; // needed to construct GlobalTrajectoryParameters
79  float tesla0;
80  float maxRho;
82 };
83 
84 #endif //TR_FastHelix_H_
GlobalTrajectoryParameters stateAtVertex() const
Definition: FastHelix.h:59
FastHelix(const GlobalPoint &oHit, const GlobalPoint &mHit, const GlobalPoint &aVertex, double nomField, MagneticField const *ibField, const GlobalPoint &bVertex)
Definition: FastHelix.h:42
float tesla0
Definition: FastHelix.h:79
~FastHelix()
Definition: FastHelix.h:55
GlobalPoint const & vertexPoint() const
Definition: FastCircle.h:63
MagneticField const * bField
Definition: FastHelix.h:75
GlobalPoint basisVertex
Definition: FastHelix.h:77
bool isValid() const
Definition: FastHelix.h:57
GlobalPoint const & innerPoint() const
Definition: FastCircle.h:62
const FastCircle & circle() const
Definition: FastHelix.h:61
void straightLineStateAtVertex()
Definition: FastHelix.cc:85
static constexpr float maxPt
Definition: FastHelix.h:73
FastCircle theCircle
Definition: FastHelix.h:78
GlobalPoint const & outerHit() const
Definition: FastHelix.h:64
bool isValid() const
Definition: FastCircle.h:49
void helixStateAtVertex()
Definition: FastHelix.cc:11
FastHelix(const GlobalPoint &oHit, const GlobalPoint &mHit, const GlobalPoint &aVertex, double nomField, MagneticField const *ibField)
Definition: FastHelix.h:29
#define dso_hidden
Definition: Visibility.h:12
GlobalPoint const & vertex() const
Definition: FastHelix.h:66
GlobalTrajectoryParameters atVertex
Definition: FastHelix.h:76
GlobalPoint const & middleHit() const
Definition: FastHelix.h:65
GlobalPoint const & outerPoint() const
Definition: FastCircle.h:61
void compute()
Definition: FastHelix.cc:4
float maxRho
Definition: FastHelix.h:80
bool useBasisVertex
Definition: FastHelix.h:81