File indexing completed on 2024-04-06 12:28:53
0001 #ifndef TR_FastHelix_H_
0002 #define TR_FastHelix_H_
0003 #include "FWCore/Utilities/interface/Visibility.h"
0004
0005 #include "DataFormats/GeometryVector/interface/GlobalPoint.h"
0006 #include "RecoTracker/TkSeedGenerator/interface/FastCircle.h"
0007 #include "TrackingTools/TrajectoryParametrization/interface/GlobalTrajectoryParameters.h"
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021
0022
0023
0024
0025 class MagneticField;
0026 class FastHelix {
0027 public:
0028
0029 FastHelix(const GlobalPoint& oHit,
0030 const GlobalPoint& mHit,
0031 const GlobalPoint& aVertex,
0032 double nomField,
0033 MagneticField const* ibField)
0034 : bField(ibField), theCircle(oHit, mHit, aVertex) {
0035 tesla0 = 0.1 * nomField;
0036 maxRho = maxPt / (0.01 * 0.3 * tesla0);
0037 useBasisVertex = false;
0038 compute();
0039 }
0040
0041
0042 FastHelix(const GlobalPoint& oHit,
0043 const GlobalPoint& mHit,
0044 const GlobalPoint& aVertex,
0045 double nomField,
0046 MagneticField const* ibField,
0047 const GlobalPoint& bVertex)
0048 : bField(ibField), basisVertex(bVertex), theCircle(oHit, mHit, aVertex) {
0049 tesla0 = 0.1 * nomField;
0050 maxRho = maxPt / (0.01 * 0.3 * tesla0);
0051 useBasisVertex = true;
0052 compute();
0053 }
0054
0055 ~FastHelix() {}
0056
0057 bool isValid() const { return theCircle.isValid(); }
0058
0059 GlobalTrajectoryParameters stateAtVertex() const { return atVertex; }
0060
0061 const FastCircle& circle() const { return theCircle; }
0062
0063 private:
0064 GlobalPoint const& outerHit() const { return theCircle.outerPoint(); }
0065 GlobalPoint const& middleHit() const { return theCircle.innerPoint(); }
0066 GlobalPoint const& vertex() const { return theCircle.vertexPoint(); }
0067
0068 void compute();
0069 void helixStateAtVertex() dso_hidden;
0070 void straightLineStateAtVertex() dso_hidden;
0071
0072 private:
0073 static constexpr float maxPt = 10000;
0074
0075 MagneticField const* bField;
0076 GlobalTrajectoryParameters atVertex;
0077 GlobalPoint basisVertex;
0078 FastCircle theCircle;
0079 float tesla0;
0080 float maxRho;
0081 bool useBasisVertex;
0082 };
0083
0084 #endif