6 using namespace pixelrecoutilities;
9 template <
class T>
inline T sqr(
T t) {
return t*
t;}
24 bool useMultipleScattering,
25 bool useBendingCorrection) {
27 theUseMultipleScattering = useMultipleScattering;
28 theUseBendingCorrection = useBendingCorrection;
30 theMultScattCorrRPhi =0;
33 if (!theUseMultipleScattering && !theUseBendingCorrection)
return;
37 if (theUseMultipleScattering) {
39 theMultScattCorrRPhi = 3.f*sigmaRPhi(pt, line.
cotLine(), constraint);
42 theMScoeff = theMultScattCorrRPhi*overSinTheta;
46 theMScoeff = theMultScattCorrRPhi*overCosTheta;
51 if (useBendingCorrection) theBendingCorrection.init(pt,es);
58 if (theUseMultipleScattering) {
59 range.first -= theMultScattCorrRPhi;
60 range.second += theMultScattCorrRPhi;
65 if (theUseMultipleScattering) {
66 range.first -= theMScoeff;
67 range.second += theMScoeff;
70 if (theUseBendingCorrection) {
72 float cotTheta =
theLine.cotLine();
75 float corr = theBendingCorrection(radius) * cotTheta;
79 float corr = theBendingCorrection(radius) *
std::abs(cotTheta);
85 float corr = theBendingCorrection(radius);
virtual Location location() const =0
Which part of the detector (barrel, endcap)
void init(const edm::EventSetup &es, float pt, const DetLayer *layer, const PixelRecoLineRZ &line, const PixelRecoPointRZ &constraint, bool useMultipleScattering, bool useBendingCorrection=false)
void correctRPhiRange(Range &range) const
Square< F >::type sqr(const F &f)
void correctRZRange(Range &range) const