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, bool useMultipleScattering, bool useBendingCorrection=false)
 
 ThirdHitCorrection ()
 
 ThirdHitCorrection (const edm::EventSetup &es, float pt, const DetLayer *layer, const PixelRecoLineRZ &line, const PixelRecoPointRZ &constraint, bool useMultipleScattering, bool useBendingCorrection=false)
 
 ~ThirdHitCorrection ()
 

Private Attributes

bool theBarrel
 
pixelrecoutilities::LongitudinalBendingCorrection theBendingCorrection
 
PixelRecoLineRZ theLine
 
float theMScoeff
 
float theMultScattCorrRPhi
 
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,
bool  useMultipleScattering,
bool  useBendingCorrection = false 
)
inline

Definition at line 20 of file ThirdHitCorrection.h.

References init().

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

Definition at line 42 of file ThirdHitCorrection.h.

42 {}

Member Function Documentation

void ThirdHitCorrection::correctRPhiRange ( Range range) const

Definition at line 54 of file ThirdHitCorrection.cc.

55 {
57  range.first -= theMultScattCorrRPhi;
58  range.second += theMultScattCorrRPhi;
59  }
60 }
void ThirdHitCorrection::correctRZRange ( Range range) const

Definition at line 61 of file ThirdHitCorrection.cc.

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

62 {
64  range.first -= theMScoeff;
65  range.second += theMScoeff;
66  }
67 
69  if (theBarrel) {
70  float cotTheta = theLine.cotLine();
71  if (cotTheta > 0) {
72  float radius = theLine.rAtZ(range.max());
73  float corr = theBendingCorrection(radius) * cotTheta;
74  range.second += corr;
75  } else {
76  float radius = theLine.rAtZ(range.min());
77  float corr = theBendingCorrection(radius) * std::abs(cotTheta);
78  range.first -= corr;
79  }
80  }
81  else {
82  float radius = range.max();
83  float corr = theBendingCorrection(radius);
84  range.first -= corr;
85  }
86  }
87 }
#define abs(x)
Definition: mlp_lapack.h:159
PixelRecoLineRZ theLine
float cotLine() const
pixelrecoutilities::LongitudinalBendingCorrection theBendingCorrection
JetCorrectorParameters corr
Definition: classes.h:9
float rAtZ(float z) const
void ThirdHitCorrection::init ( const edm::EventSetup es,
float  pt,
const DetLayer layer,
const PixelRecoLineRZ line,
const PixelRecoPointRZ constraint,
bool  useMultipleScattering,
bool  useBendingCorrection = false 
)

Definition at line 17 of file ThirdHitCorrection.cc.

References abs, GeomDetEnumerators::barrel, PixelRecoLineRZ::cotLine(), f, geometryCSVtoXML::line, DetLayer::location(), funct::sqr(), and mathSSE::sqrt().

Referenced by ThirdHitCorrection().

23  {
24 
25  theUseMultipleScattering = useMultipleScattering;
26  theUseBendingCorrection = useBendingCorrection;
27  theLine = line;
29  theMScoeff=0;
30 
32 
34 
36  MultipleScatteringParametrisation sigmaRPhi(layer, es);
37  theMultScattCorrRPhi = 3.f*sigmaRPhi(pt, line.cotLine(), constraint);
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 }
virtual Location location() const =0
Which part of the detector (barrel, endcap)
#define abs(x)
Definition: mlp_lapack.h:159
PixelRecoLineRZ theLine
float cotLine() const
T sqrt(T t)
Definition: SSEVec.h:28
double f[11][100]
pixelrecoutilities::LongitudinalBendingCorrection theBendingCorrection
Square< F >::type sqr(const F &f)
Definition: Square.h:13

Member Data Documentation

bool ThirdHitCorrection::theBarrel
private

Definition at line 48 of file ThirdHitCorrection.h.

pixelrecoutilities::LongitudinalBendingCorrection ThirdHitCorrection::theBendingCorrection
private

Definition at line 57 of file ThirdHitCorrection.h.

PixelRecoLineRZ ThirdHitCorrection::theLine
private

Definition at line 53 of file ThirdHitCorrection.h.

float ThirdHitCorrection::theMScoeff
private

Definition at line 55 of file ThirdHitCorrection.h.

float ThirdHitCorrection::theMultScattCorrRPhi
private

Definition at line 54 of file ThirdHitCorrection.h.

bool ThirdHitCorrection::theUseBendingCorrection
private

Definition at line 51 of file ThirdHitCorrection.h.

bool ThirdHitCorrection::theUseMultipleScattering
private

Definition at line 50 of file ThirdHitCorrection.h.