Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-09-23 22:53:22

0001 #ifndef RecoPixelVertexing_PixelTriplets_ThirdHitCorrection_H
0002 #define RecoPixelVertexing_PixelTriplets_ThirdHitCorrection_H
0003 
0004 #include "RecoTracker/TkMSParametrization/interface/LongitudinalBendingCorrection.h"
0005 #include "RecoTracker/TkMSParametrization/interface/MultipleScatteringParametrisation.h"
0006 
0007 class DetLayer;
0008 class MagneticField;
0009 class MultipleScatteringParametrisationMaker;
0010 
0011 #include "RecoTracker/TkMSParametrization/interface/PixelRecoRange.h"
0012 #include "RecoTracker/TkMSParametrization/interface/PixelRecoPointRZ.h"
0013 #include "RecoTracker/TkMSParametrization/interface/PixelRecoLineRZ.h"
0014 
0015 #include <optional>
0016 
0017 class ThirdHitCorrection {
0018 public:
0019   typedef PixelRecoRange<float> Range;
0020 
0021   ThirdHitCorrection() {}
0022 
0023   void init(float pt,
0024             const DetLayer &layer1,
0025             const DetLayer &layer2,
0026             const DetLayer &layer3,
0027             bool useMultipleScattering,
0028             const MultipleScatteringParametrisationMaker *msmaker,
0029             bool useBendingCorrection,
0030             const MagneticField *bfield);
0031 
0032   void init(float pt,
0033             const DetLayer &layer3,
0034             bool useMultipleScattering,
0035             const MultipleScatteringParametrisationMaker *msmaker,
0036             bool useBendingCorrection,
0037             const MagneticField *bfield);
0038 
0039   ThirdHitCorrection(float pt,
0040                      const DetLayer *layer,
0041                      const PixelRecoLineRZ &line,
0042                      const PixelRecoPointRZ &constraint,
0043                      int ol,
0044                      bool useMultipleScattering,
0045                      const MultipleScatteringParametrisationMaker *msmaker,
0046                      bool useBendingCorrection,
0047                      const MagneticField *bfield) {
0048     init(pt, *layer, useMultipleScattering, msmaker, useBendingCorrection, bfield);
0049     init(line, constraint, ol);
0050   }
0051 
0052   void init(const PixelRecoLineRZ &line, const PixelRecoPointRZ &constraint, int ol);
0053 
0054   void correctRPhiRange(Range &range) const {
0055     range.first -= theMultScattCorrRPhi;
0056     range.second += theMultScattCorrRPhi;
0057   }
0058 
0059   void correctRZRange(Range &range) const;
0060 
0061 private:
0062   bool theBarrel;
0063 
0064   bool theUseMultipleScattering;
0065   bool theUseBendingCorrection;
0066 
0067   PixelRecoLineRZ theLine;
0068   float theMultScattCorrRPhi = 0;
0069   float theMScoeff = 0;
0070   float thePt;
0071 
0072   pixelrecoutilities::LongitudinalBendingCorrection theBendingCorrection;
0073   std::optional<MultipleScatteringParametrisation> sigmaRPhi;
0074 };
0075 
0076 #endif