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 (const edm::EventSetup &es, float pt, const DetLayer &layer1, const DetLayer &layer2, const DetLayer &layer3, bool useMultipleScattering, bool useBendingCorrection)
 
void init (const edm::EventSetup &es, float pt, const DetLayer &layer3, bool useMultipleScattering, bool useBendingCorrection)
 
void init (const PixelRecoLineRZ &line, const PixelRecoPointRZ &constraint, int ol)
 
 ThirdHitCorrection ()
 
 ThirdHitCorrection (const edm::EventSetup &es, float pt, const DetLayer *layer, const PixelRecoLineRZ &line, const PixelRecoPointRZ &constraint, int ol, bool useMultipleScattering, bool useBendingCorrection)
 

Private Attributes

MultipleScatteringParametrisation sigmaRPhi
 
bool theBarrel
 
pixelrecoutilities::LongitudinalBendingCorrection theBendingCorrection
 
PixelRecoLineRZ theLine
 
float theMScoeff = 0
 
float theMultScattCorrRPhi = 0
 
float thePt
 
bool theUseBendingCorrection
 
bool theUseMultipleScattering
 

Detailed Description

Definition at line 16 of file ThirdHitCorrection.h.

Member Typedef Documentation

◆ Range

Definition at line 18 of file ThirdHitCorrection.h.

Constructor & Destructor Documentation

◆ ThirdHitCorrection() [1/2]

ThirdHitCorrection::ThirdHitCorrection ( )
inline

Definition at line 20 of file ThirdHitCorrection.h.

20 {}

◆ ThirdHitCorrection() [2/2]

ThirdHitCorrection::ThirdHitCorrection ( const edm::EventSetup es,
float  pt,
const DetLayer layer,
const PixelRecoLineRZ line,
const PixelRecoPointRZ constraint,
int  ol,
bool  useMultipleScattering,
bool  useBendingCorrection 
)
inline

Member Function Documentation

◆ correctRPhiRange()

void ThirdHitCorrection::correctRPhiRange ( Range range) const
inline

Definition at line 50 of file ThirdHitCorrection.h.

50  {
51  range.first -= theMultScattCorrRPhi;
52  range.second += theMultScattCorrRPhi;
53  }

References FastTimerService_cff::range, and theMultScattCorrRPhi.

◆ correctRZRange()

void ThirdHitCorrection::correctRZRange ( Range range) const

Definition at line 97 of file ThirdHitCorrection.cc.

97  {
98  range.first -= theMScoeff;
99  range.second += theMScoeff;
100 
102  if (theBarrel) {
103  float cotTheta = theLine.cotLine();
104  if (cotTheta > 0) {
105  float radius = theLine.rAtZ(range.max());
106  float corr = theBendingCorrection(radius) * cotTheta;
107  range.second += corr;
108  } else {
109  float radius = theLine.rAtZ(range.min());
110  float corr = theBendingCorrection(radius) * std::abs(cotTheta);
111  range.first -= corr;
112  }
113  } else {
114  float radius = range.max();
116  range.first -= corr;
117  }
118  }
119 }

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

◆ init() [1/3]

void ThirdHitCorrection::init ( const edm::EventSetup es,
float  pt,
const DetLayer layer1,
const DetLayer layer2,
const DetLayer layer3,
bool  useMultipleScattering,
bool  useBendingCorrection 
)

Definition at line 37 of file ThirdHitCorrection.cc.

43  {
45 
47  return;
48 
49  auto point3 = [&]() -> PixelRecoPointRZ {
50  if (theBarrel) {
51  const BarrelDetLayer &bl = static_cast<const BarrelDetLayer &>(layer3);
52  float rLayer = bl.specificSurface().radius();
53  auto zmax = 0.5f * layer3.surface().bounds().length();
54  return PixelRecoPointRZ(rLayer, zmax);
55  } else {
56  const ForwardDetLayer &fl = static_cast<const ForwardDetLayer &>(layer3);
57  auto maxR = fl.specificSurface().outerRadius();
58  auto layerZ = layer3.position().z();
59  return PixelRecoPointRZ(maxR, layerZ);
60  }
61  };
62 
63  PixelRecoPointRZ zero(0., 0.);
64  SimpleLineRZ line(zero, point3());
65 
66  auto point2 = [&]() -> PixelRecoPointRZ {
67  if (layer2.isBarrel()) {
68  const BarrelDetLayer &bl = static_cast<const BarrelDetLayer &>(layer2);
69  float rLayer = bl.specificSurface().radius();
70  return PixelRecoPointRZ(rLayer, line.zAtR(rLayer));
71  } else {
72  auto layerZ = layer2.position().z();
73  return PixelRecoPointRZ(line.rAtZ(layerZ), layerZ);
74  }
75  };
76 
77  theMultScattCorrRPhi = 3.f * sigmaRPhi(pt, line.cotLine(), point2(), layer2.seqNum());
78 }

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_FULL_cff::useBendingCorrection, HLT_FULL_cff::useMultipleScattering, PV3DBase< T, PVType, FrameType >::z(), SiPixelPI::zero, and SiStripMonitorCluster_cfi::zmax.

Referenced by ThirdHitCorrection().

◆ init() [2/3]

void ThirdHitCorrection::init ( const edm::EventSetup es,
float  pt,
const DetLayer layer3,
bool  useMultipleScattering,
bool  useBendingCorrection 
)

◆ init() [3/3]

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

Definition at line 80 of file ThirdHitCorrection.cc.

80  {
81  theLine = line;
83  return;
84 
85  // auto newCorr = theMultScattCorrRPhi;
86  theMultScattCorrRPhi = 3.f * sigmaRPhi(thePt, line.cotLine(), constraint, il);
87  // std::cout << "ThirdHitCorr " << (theBarrel ? "B " : "F " )<< theMultScattCorrRPhi << ' ' << newCorr << ' ' << newCorr/theMultScattCorrRPhi << std::endl;
88  float overSinTheta = std::sqrt(1.f + sqr(line.cotLine()));
89  if (theBarrel) {
90  theMScoeff = theMultScattCorrRPhi * overSinTheta;
91  } else {
92  float overCosTheta = std::abs(line.cotLine()) < 1.e-4f ? 1.e4f : overSinTheta / std::abs(line.cotLine());
93  theMScoeff = theMultScattCorrRPhi * overCosTheta;
94  }
95 }

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

Member Data Documentation

◆ sigmaRPhi

MultipleScatteringParametrisation ThirdHitCorrection::sigmaRPhi
private

Definition at line 69 of file ThirdHitCorrection.h.

◆ theBarrel

bool ThirdHitCorrection::theBarrel
private

Definition at line 58 of file ThirdHitCorrection.h.

◆ theBendingCorrection

pixelrecoutilities::LongitudinalBendingCorrection ThirdHitCorrection::theBendingCorrection
private

Definition at line 68 of file ThirdHitCorrection.h.

◆ theLine

PixelRecoLineRZ ThirdHitCorrection::theLine
private

Definition at line 63 of file ThirdHitCorrection.h.

◆ theMScoeff

float ThirdHitCorrection::theMScoeff = 0
private

Definition at line 65 of file ThirdHitCorrection.h.

◆ theMultScattCorrRPhi

float ThirdHitCorrection::theMultScattCorrRPhi = 0
private

Definition at line 64 of file ThirdHitCorrection.h.

Referenced by correctRPhiRange().

◆ thePt

float ThirdHitCorrection::thePt
private

Definition at line 66 of file ThirdHitCorrection.h.

◆ theUseBendingCorrection

bool ThirdHitCorrection::theUseBendingCorrection
private

Definition at line 61 of file ThirdHitCorrection.h.

◆ theUseMultipleScattering

bool ThirdHitCorrection::theUseMultipleScattering
private

Definition at line 60 of file ThirdHitCorrection.h.

FastTimerService_cff.range
range
Definition: FastTimerService_cff.py:34
pixelrecoutilities::LongitudinalBendingCorrection::init
void init(float pt, const edm::EventSetup &es)
Definition: LongitudinalBendingCorrection.h:10
ThirdHitCorrection::theBendingCorrection
pixelrecoutilities::LongitudinalBendingCorrection theBendingCorrection
Definition: ThirdHitCorrection.h:68
HLT_FULL_cff.constraint
constraint
Definition: HLT_FULL_cff.py:52003
ThirdHitCorrection::thePt
float thePt
Definition: ThirdHitCorrection.h:66
f
double f[11][100]
Definition: MuScleFitUtils.cc:78
HLT_FULL_cff.useMultipleScattering
useMultipleScattering
Definition: HLT_FULL_cff.py:11995
DiDispStaMuonMonitor_cfi.pt
pt
Definition: DiDispStaMuonMonitor_cfi.py:39
ThirdHitCorrection::theLine
PixelRecoLineRZ theLine
Definition: ThirdHitCorrection.h:63
sqr
int sqr(const T &t)
Definition: pfalgo_common_ref.h:9
ThirdHitCorrection::theMScoeff
float theMScoeff
Definition: ThirdHitCorrection.h:65
SiPixelPI::zero
Definition: SiPixelPayloadInspectorHelper.h:39
GeometricSearchDet::position
virtual const Surface::PositionType & position() const
Returns position of the surface.
Definition: GeometricSearchDet.h:31
Bounds::length
virtual float length() const =0
PV3DBase::z
T z() const
Definition: PV3DBase.h:61
ThirdHitCorrection::init
void init(const edm::EventSetup &es, float pt, const DetLayer &layer1, const DetLayer &layer2, const DetLayer &layer3, bool useMultipleScattering, bool useBendingCorrection)
Definition: ThirdHitCorrection.cc:37
SiStripMonitorCluster_cfi.zmax
zmax
Definition: SiStripMonitorCluster_cfi.py:201
alignCSCRings.corr
dictionary corr
Definition: alignCSCRings.py:124
mathSSE::sqrt
T sqrt(T t)
Definition: SSEVec.h:19
Surface::bounds
const Bounds & bounds() const
Definition: Surface.h:87
ThirdHitCorrection::sigmaRPhi
MultipleScatteringParametrisation sigmaRPhi
Definition: ThirdHitCorrection.h:69
DetLayer::seqNum
int seqNum() const
Definition: DetLayer.h:35
phase1PixelTopology::layer
constexpr std::array< uint8_t, layerIndexSize > layer
Definition: phase1PixelTopology.h:99
HLT_FULL_cff.useBendingCorrection
useBendingCorrection
Definition: HLT_FULL_cff.py:9886
BarrelDetLayer
Definition: BarrelDetLayer.h:22
PixelRecoPointRZ
Definition: PixelRecoPointRZ.h:6
SimpleLineRZ
Definition: PixelRecoLineRZ.h:63
ThirdHitCorrection::theUseBendingCorrection
bool theUseBendingCorrection
Definition: ThirdHitCorrection.h:61
ThirdHitCorrection::theUseMultipleScattering
bool theUseMultipleScattering
Definition: ThirdHitCorrection.h:60
ForwardDetLayer
Definition: ForwardDetLayer.h:22
PixelRecoLineRZ::cotLine
float cotLine() const
Definition: PixelRecoLineRZ.h:31
ThirdHitCorrection::theBarrel
bool theBarrel
Definition: ThirdHitCorrection.h:58
CosmicsPD_Skims.radius
radius
Definition: CosmicsPD_Skims.py:135
MultipleScatteringParametrisation::init
void init(const DetLayer *layer, const edm::EventSetup &iSetup, X0Source x0source=useX0AtEta)
Definition: MultipleScatteringParametrisation.cc:57
GeometricSearchDet::surface
virtual const BoundSurface & surface() const =0
The surface of the GeometricSearchDet.
funct::abs
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
PixelRecoLineRZ::rAtZ
float rAtZ(float z) const
Definition: PixelRecoLineRZ.h:37
ThirdHitCorrection::theMultScattCorrRPhi
float theMultScattCorrRPhi
Definition: ThirdHitCorrection.h:64
mps_splice.line
line
Definition: mps_splice.py:76
BarrelDetLayer::specificSurface
virtual const BoundCylinder & specificSurface() const final
Extension of the interface.
Definition: BarrelDetLayer.h:39
DetLayer::isBarrel
bool isBarrel() const
Definition: DetLayer.h:31
ForwardDetLayer::specificSurface
virtual const BoundDisk & specificSurface() const final
Definition: ForwardDetLayer.h:39
MillePedeFileConverter_cfg.e
e
Definition: MillePedeFileConverter_cfg.py:37