Back to home page

Project CMSSW displayed by LXR

 
 

    


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    Generation of track parameters at a vertex using two hits and a vertex.
0011    It is used e.g. by a seed generator.
0012 
0013    24.01.2012: introduced Maxpt cut. changed algo of "FastLine" to use vertex
0014    21.02.2001: Old FastHelix is now called FastHelixFit. Replace FastLineFit
0015                by FastLine (z0, dz/drphi calculated without vertex and errors)
0016    14.02.2001: Replace general Circle by FastCircle.
0017    13.02.2001: LinearFitErrorsInTwoCoordinates replaced by FastLineFit
0018    29.11.2000: (Pascal Vanlaer) Modification of calculation of sign of px,py
0019                and change in calculation of pz, z0.
0020    29.11.2000: (Matthias Winkler) Split stateAtVertex() in two parts (Circle 
0021                is valid or not): helixStateAtVertex() and 
0022                              straightLineStateAtVertex()
0023  */
0024 
0025 class MagneticField;
0026 class FastHelix {
0027 public:
0028   //Original constructor (no basis vertex)
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   //New constructor (with basis vertex)
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;  // 10Tev
0074 
0075   MagneticField const* bField;  // needed to construct GlobalTrajectoryParameters
0076   GlobalTrajectoryParameters atVertex;
0077   GlobalPoint basisVertex;
0078   FastCircle theCircle;
0079   float tesla0;
0080   float maxRho;
0081   bool useBasisVertex;
0082 };
0083 
0084 #endif  //TR_FastHelix_H_