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;
35 if (theUseMultipleScattering) {
40 theMScoeff = theMultScattCorrRPhi*overSinTheta;
44 theMScoeff = theMultScattCorrRPhi*overCosTheta;
49 if (useBendingCorrection) theBendingCorrection.init(pt,es);
56 range.first -= theMScoeff;
57 range.second += theMScoeff;
60 if (theUseBendingCorrection) {
62 float cotTheta =
theLine.cotLine();
65 float corr = theBendingCorrection(radius) * cotTheta;
69 float corr = theBendingCorrection(radius) *
std::abs(cotTheta);
75 float corr = theBendingCorrection(radius);
Abs< T >::type abs(const T &t)
Square< F >::type sqr(const F &f)
void init(const edm::EventSetup &es, float pt, const DetLayer *layer, const PixelRecoLineRZ &line, const PixelRecoPointRZ &constraint, int ol, bool useMultipleScattering, bool useBendingCorrection=false)
void correctRZRange(Range &range) const