CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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 *layer, const PixelRecoLineRZ &line, const PixelRecoPointRZ &constraint, int ol, bool useMultipleScattering, bool useBendingCorrection=false)
 
 ThirdHitCorrection ()
 
 ThirdHitCorrection (const edm::EventSetup &es, float pt, const DetLayer *layer, const PixelRecoLineRZ &line, const PixelRecoPointRZ &constraint, int ol, bool useMultipleScattering, bool useBendingCorrection=false)
 

Private Attributes

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

Detailed Description

Definition at line 13 of file ThirdHitCorrection.h.

Member Typedef Documentation

Definition at line 16 of file ThirdHitCorrection.h.

Constructor & Destructor Documentation

ThirdHitCorrection::ThirdHitCorrection ( )
inline

Definition at line 18 of file ThirdHitCorrection.h.

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

Definition at line 20 of file ThirdHitCorrection.h.

References init().

28  {
29  init(es, pt, layer, line, constraint, ol, useMultipleScattering, useBendingCorrection);
30  }
void init(const edm::EventSetup &es, float pt, const DetLayer *layer, const PixelRecoLineRZ &line, const PixelRecoPointRZ &constraint, int ol, bool useMultipleScattering, bool useBendingCorrection=false)

Member Function Documentation

void ThirdHitCorrection::correctRPhiRange ( Range range) const
inline

Definition at line 43 of file ThirdHitCorrection.h.

References theMultScattCorrRPhi.

43  {
44  range.first -= theMultScattCorrRPhi;
45  range.second += theMultScattCorrRPhi;
46  }
void ThirdHitCorrection::correctRZRange ( Range range) const

Definition at line 54 of file ThirdHitCorrection.cc.

References funct::abs(), corr, PixelRecoRange< T >::max(), PixelRecoRange< T >::min(), CosmicsPD_Skims::radius, and crabWrapper::theLine.

55 {
56  range.first -= theMScoeff;
57  range.second += theMScoeff;
58 
59 
61  if (theBarrel) {
62  float cotTheta = theLine.cotLine();
63  if (cotTheta > 0) {
64  float radius = theLine.rAtZ(range.max());
65  float corr = theBendingCorrection(radius) * cotTheta;
66  range.second += corr;
67  } else {
68  float radius = theLine.rAtZ(range.min());
69  float corr = theBendingCorrection(radius) * std::abs(cotTheta);
70  range.first -= corr;
71  }
72  }
73  else {
74  float radius = range.max();
75  float corr = theBendingCorrection(radius);
76  range.first -= corr;
77  }
78  }
79 }
PixelRecoLineRZ theLine
float cotLine() const
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
pixelrecoutilities::LongitudinalBendingCorrection theBendingCorrection
JetCorrectorParameters corr
Definition: classes.h:5
float rAtZ(float z) const
void ThirdHitCorrection::init ( const edm::EventSetup es,
float  pt,
const DetLayer layer,
const PixelRecoLineRZ line,
const PixelRecoPointRZ constraint,
int  ol,
bool  useMultipleScattering,
bool  useBendingCorrection = false 
)

Definition at line 19 of file ThirdHitCorrection.cc.

References funct::abs(), HLT_25ns14e33_v1_cff::constraint, PixelRecoLineRZ::cotLine(), alignCSCRings::e, f, DetLayer::isBarrel(), geometryCSVtoXML::line, funct::sqr(), mathSSE::sqrt(), and crabWrapper::theLine.

Referenced by ThirdHitCorrection().

25  {
26 
27  theUseMultipleScattering = useMultipleScattering;
28  theUseBendingCorrection = useBendingCorrection;
29  theLine = line;
31  theMScoeff=0;
32 
33  theBarrel = layer->isBarrel();
34 
36  MultipleScatteringParametrisation sigmaRPhi(layer, es);
37  theMultScattCorrRPhi = 3.f*sigmaRPhi(pt, line.cotLine(), constraint, il);
38  float overSinTheta = std::sqrt(1.f+sqr(line.cotLine()));
39  if (theBarrel) {
40  theMScoeff = theMultScattCorrRPhi*overSinTheta;
41  } else {
42  float overCosTheta = std::abs(line.cotLine()) < 1.e-4f ?
43  1.e4f : overSinTheta/std::abs(line.cotLine());
44  theMScoeff = theMultScattCorrRPhi*overCosTheta;
45 
46  }
47  }
48 
49  if (useBendingCorrection) theBendingCorrection.init(pt,es);
50 
51 }
PixelRecoLineRZ theLine
float cotLine() const
T sqrt(T t)
Definition: SSEVec.h:48
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
double f[11][100]
pixelrecoutilities::LongitudinalBendingCorrection theBendingCorrection
bool isBarrel() const
Definition: DetLayer.h:32
Square< F >::type sqr(const F &f)
Definition: Square.h:13

Member Data Documentation

bool ThirdHitCorrection::theBarrel
private

Definition at line 51 of file ThirdHitCorrection.h.

pixelrecoutilities::LongitudinalBendingCorrection ThirdHitCorrection::theBendingCorrection
private

Definition at line 60 of file ThirdHitCorrection.h.

PixelRecoLineRZ ThirdHitCorrection::theLine
private

Definition at line 56 of file ThirdHitCorrection.h.

float ThirdHitCorrection::theMScoeff =0
private

Definition at line 58 of file ThirdHitCorrection.h.

float ThirdHitCorrection::theMultScattCorrRPhi =0
private

Definition at line 57 of file ThirdHitCorrection.h.

Referenced by correctRPhiRange().

bool ThirdHitCorrection::theUseBendingCorrection
private

Definition at line 54 of file ThirdHitCorrection.h.

bool ThirdHitCorrection::theUseMultipleScattering
private

Definition at line 53 of file ThirdHitCorrection.h.