CMS 3D CMS Logo

List of all members | Public Types | Public Member Functions | Private Attributes
ThirdHitCorrection Class Reference

#include <ThirdHitCorrection.h>

Public Types

typedef PixelRecoRange< float > Range
 

Public Member Functions

void correctRPhiRange (Range &range) const
 
void correctRZRange (Range &range) const
 
void init (float pt, const DetLayer &layer1, const DetLayer &layer2, const DetLayer &layer3, bool useMultipleScattering, const MultipleScatteringParametrisationMaker *msmaker, bool useBendingCorrection, const MagneticField *bfield)
 
void init (float pt, const DetLayer &layer3, bool useMultipleScattering, const MultipleScatteringParametrisationMaker *msmaker, bool useBendingCorrection, const MagneticField *bfield)
 
void init (const PixelRecoLineRZ &line, const PixelRecoPointRZ &constraint, int ol)
 
 ThirdHitCorrection ()
 
 ThirdHitCorrection (float pt, const DetLayer *layer, const PixelRecoLineRZ &line, const PixelRecoPointRZ &constraint, int ol, bool useMultipleScattering, const MultipleScatteringParametrisationMaker *msmaker, bool useBendingCorrection, const MagneticField *bfield)
 

Private Attributes

std::optional< MultipleScatteringParametrisationsigmaRPhi
 
bool theBarrel
 
pixelrecoutilities::LongitudinalBendingCorrection theBendingCorrection
 
PixelRecoLineRZ theLine
 
float theMScoeff = 0
 
float theMultScattCorrRPhi = 0
 
float thePt
 
bool theUseBendingCorrection
 
bool theUseMultipleScattering
 

Detailed Description

Definition at line 17 of file ThirdHitCorrection.h.

Member Typedef Documentation

◆ Range

Definition at line 19 of file ThirdHitCorrection.h.

Constructor & Destructor Documentation

◆ ThirdHitCorrection() [1/2]

ThirdHitCorrection::ThirdHitCorrection ( )
inline

Definition at line 21 of file ThirdHitCorrection.h.

21 {}

◆ ThirdHitCorrection() [2/2]

ThirdHitCorrection::ThirdHitCorrection ( float  pt,
const DetLayer layer,
const PixelRecoLineRZ line,
const PixelRecoPointRZ constraint,
int  ol,
bool  useMultipleScattering,
const MultipleScatteringParametrisationMaker msmaker,
bool  useBendingCorrection,
const MagneticField bfield 
)
inline

Definition at line 39 of file ThirdHitCorrection.h.

References HLT_2023v12_cff::constraint, init(), nano_mu_digi_cff::layer, mps_splice::line, DiDispStaMuonMonitor_cfi::pt, HLT_2023v12_cff::useBendingCorrection, and highPtTripletStepTrackingRegions_cfi::useMultipleScattering.

47  {
49  init(line, constraint, ol);
50  }
void init(float pt, const DetLayer &layer1, const DetLayer &layer2, const DetLayer &layer3, bool useMultipleScattering, const MultipleScatteringParametrisationMaker *msmaker, bool useBendingCorrection, const MagneticField *bfield)

Member Function Documentation

◆ correctRPhiRange()

void ThirdHitCorrection::correctRPhiRange ( Range range) const
inline

◆ correctRZRange()

void ThirdHitCorrection::correctRZRange ( Range range) const

Definition at line 101 of file ThirdHitCorrection.cc.

References funct::abs(), alignCSCRings::corr, CosmicsPD_Skims::radius, FastTimerService_cff::range, and crabWrapper::theLine.

101  {
102  range.first -= theMScoeff;
103  range.second += theMScoeff;
104 
106  if (theBarrel) {
107  float cotTheta = theLine.cotLine();
108  if (cotTheta > 0) {
109  float radius = theLine.rAtZ(range.max());
110  float corr = theBendingCorrection(radius) * cotTheta;
111  range.second += corr;
112  } else {
113  float radius = theLine.rAtZ(range.min());
114  float corr = theBendingCorrection(radius) * std::abs(cotTheta);
115  range.first -= corr;
116  }
117  } else {
118  float radius = range.max();
120  range.first -= corr;
121  }
122  }
123 }
float cotLine() const
PixelRecoLineRZ theLine
dictionary corr
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
pixelrecoutilities::LongitudinalBendingCorrection theBendingCorrection
float rAtZ(float z) const

◆ init() [1/3]

void ThirdHitCorrection::init ( float  pt,
const DetLayer layer1,
const DetLayer layer2,
const DetLayer layer3,
bool  useMultipleScattering,
const MultipleScatteringParametrisationMaker msmaker,
bool  useBendingCorrection,
const MagneticField bfield 
)

Definition at line 40 of file ThirdHitCorrection.cc.

References Surface::bounds(), init, DetLayer::isBarrel(), Bounds::length(), mps_splice::line, GeometricSearchDet::position(), DiDispStaMuonMonitor_cfi::pt, DetLayer::seqNum(), BarrelDetLayer::specificSurface(), ForwardDetLayer::specificSurface(), GeometricSearchDet::surface(), HLT_2023v12_cff::useBendingCorrection, highPtTripletStepTrackingRegions_cfi::useMultipleScattering, PV3DBase< T, PVType, FrameType >::z(), SiPixelPI::zero, and SiStripMonitorCluster_cfi::zmax.

Referenced by ThirdHitCorrection().

47  {
48  init(pt, layer3, useMultipleScattering, msmaker, useBendingCorrection, bfield);
49 
51  return;
52 
53  auto point3 = [&]() -> PixelRecoPointRZ {
54  if (theBarrel) {
55  const BarrelDetLayer &bl = static_cast<const BarrelDetLayer &>(layer3);
56  float rLayer = bl.specificSurface().radius();
57  auto zmax = 0.5f * layer3.surface().bounds().length();
58  return PixelRecoPointRZ(rLayer, zmax);
59  } else {
60  const ForwardDetLayer &fl = static_cast<const ForwardDetLayer &>(layer3);
61  auto maxR = fl.specificSurface().outerRadius();
62  auto layerZ = layer3.position().z();
63  return PixelRecoPointRZ(maxR, layerZ);
64  }
65  };
66 
67  PixelRecoPointRZ zero(0., 0.);
68  SimpleLineRZ line(zero, point3());
69 
70  auto point2 = [&]() -> PixelRecoPointRZ {
71  if (layer2.isBarrel()) {
72  const BarrelDetLayer &bl = static_cast<const BarrelDetLayer &>(layer2);
73  float rLayer = bl.specificSurface().radius();
74  return PixelRecoPointRZ(rLayer, line.zAtR(rLayer));
75  } else {
76  auto layerZ = layer2.position().z();
77  return PixelRecoPointRZ(line.rAtZ(layerZ), layerZ);
78  }
79  };
80 
81  theMultScattCorrRPhi = 3.f * (*sigmaRPhi)(pt, line.cotLine(), point2(), layer2.seqNum());
82 }
virtual const BoundSurface & surface() const =0
The surface of the GeometricSearchDet.
virtual const Surface::PositionType & position() const
Returns position of the surface.
virtual float length() const =0
T z() const
Definition: PV3DBase.h:61
void init(float pt, const DetLayer &layer1, const DetLayer &layer2, const DetLayer &layer3, bool useMultipleScattering, const MultipleScatteringParametrisationMaker *msmaker, bool useBendingCorrection, const MagneticField *bfield)
int seqNum() const
Definition: DetLayer.h:35
virtual const BoundCylinder & specificSurface() const final
Extension of the interface.
virtual const BoundDisk & specificSurface() const final
bool isBarrel() const
Definition: DetLayer.h:31
const Bounds & bounds() const
Definition: Surface.h:87

◆ init() [2/3]

void ThirdHitCorrection::init ( float  pt,
const DetLayer layer3,
bool  useMultipleScattering,
const MultipleScatteringParametrisationMaker msmaker,
bool  useBendingCorrection,
const MagneticField bfield 
)

Definition at line 18 of file ThirdHitCorrection.cc.

References DetLayer::isBarrel(), MultipleScatteringParametrisationMaker::parametrisation(), DiDispStaMuonMonitor_cfi::pt, HLT_2023v12_cff::useBendingCorrection, and highPtTripletStepTrackingRegions_cfi::useMultipleScattering.

23  {
27  theBendingCorrection.init(pt, *bfield);
28  }
29 
31  theMScoeff = 0;
32 
33  theBarrel = layer3.isBarrel();
34  thePt = pt;
35 
37  sigmaRPhi = msmaker->parametrisation(&layer3);
38 }
std::optional< MultipleScatteringParametrisation > sigmaRPhi
MultipleScatteringParametrisation parametrisation(const DetLayer *layer, X0Source x0Source=X0Source::useX0AtEta) const
pixelrecoutilities::LongitudinalBendingCorrection theBendingCorrection
bool isBarrel() const
Definition: DetLayer.h:31

◆ init() [3/3]

void ThirdHitCorrection::init ( const PixelRecoLineRZ line,
const PixelRecoPointRZ constraint,
int  ol 
)

Definition at line 84 of file ThirdHitCorrection.cc.

References funct::abs(), HLT_2023v12_cff::constraint, MillePedeFileConverter_cfg::e, f, mps_splice::line, funct::sqr(), mathSSE::sqrt(), and crabWrapper::theLine.

84  {
85  theLine = line;
87  return;
88 
89  // auto newCorr = theMultScattCorrRPhi;
90  theMultScattCorrRPhi = 3.f * (*sigmaRPhi)(thePt, line.cotLine(), constraint, il);
91  // std::cout << "ThirdHitCorr " << (theBarrel ? "B " : "F " )<< theMultScattCorrRPhi << ' ' << newCorr << ' ' << newCorr/theMultScattCorrRPhi << std::endl;
92  float overSinTheta = std::sqrt(1.f + sqr(line.cotLine()));
93  if (theBarrel) {
94  theMScoeff = theMultScattCorrRPhi * overSinTheta;
95  } else {
96  float overCosTheta = std::abs(line.cotLine()) < 1.e-4f ? 1.e4f : overSinTheta / std::abs(line.cotLine());
97  theMScoeff = theMultScattCorrRPhi * overCosTheta;
98  }
99 }
PixelRecoLineRZ theLine
T sqrt(T t)
Definition: SSEVec.h:19
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
double f[11][100]
Square< F >::type sqr(const F &f)
Definition: Square.h:14

Member Data Documentation

◆ sigmaRPhi

std::optional<MultipleScatteringParametrisation> ThirdHitCorrection::sigmaRPhi
private

Definition at line 73 of file ThirdHitCorrection.h.

◆ theBarrel

bool ThirdHitCorrection::theBarrel
private

Definition at line 62 of file ThirdHitCorrection.h.

◆ theBendingCorrection

pixelrecoutilities::LongitudinalBendingCorrection ThirdHitCorrection::theBendingCorrection
private

Definition at line 72 of file ThirdHitCorrection.h.

◆ theLine

PixelRecoLineRZ ThirdHitCorrection::theLine
private

Definition at line 67 of file ThirdHitCorrection.h.

◆ theMScoeff

float ThirdHitCorrection::theMScoeff = 0
private

Definition at line 69 of file ThirdHitCorrection.h.

◆ theMultScattCorrRPhi

float ThirdHitCorrection::theMultScattCorrRPhi = 0
private

Definition at line 68 of file ThirdHitCorrection.h.

Referenced by correctRPhiRange().

◆ thePt

float ThirdHitCorrection::thePt
private

Definition at line 70 of file ThirdHitCorrection.h.

◆ theUseBendingCorrection

bool ThirdHitCorrection::theUseBendingCorrection
private

Definition at line 65 of file ThirdHitCorrection.h.

◆ theUseMultipleScattering

bool ThirdHitCorrection::theUseMultipleScattering
private

Definition at line 64 of file ThirdHitCorrection.h.