test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
ThirdHitZPrediction.h
Go to the documentation of this file.
1 #ifndef ThirdHitZPrediction_H
2 #define ThirdHitZPrediction_H
3 
6 #include<cmath>
7 
8 
10 public:
12  ThirdHitZPrediction(const GlobalPoint& p1, float erroRPhi1, float errorZ1,
13  const GlobalPoint& p2, float erroRPhi2, float errorZ2,
14  double curvature, double nSigma = 3.) :
15  thePoint2(p2),
16  sqr_errorXY12(erroRPhi1*erroRPhi1+erroRPhi2*erroRPhi2),
17  sqr_errorXY2(erroRPhi2*erroRPhi2),
18  theErrorZ1(errorZ1),
19  theErrorZ2(errorZ2),
20  theCurvature(curvature), theNSigma(nSigma){
21  auto d = p2-p1;
22  dR12 = d.perp(); if (dR12 < 1.e-5) dR12 = 1.e-5;
23  dS12 = std::abs(0.5*dR12*theCurvature) <1 ? std::asin(0.5*dR12*theCurvature) : 1.;
24  dZ12 = d.z();
25  }
26  Range operator()(const GlobalPoint& p3, float erroRPhi3) const;
27 private:
29  double dR12, dZ12, dS12;
30  double sqr_errorXY12;
31  double sqr_errorXY2;
33  double theCurvature;
34  double theNSigma;
35 };
36 #endif
37 
PixelRecoRange< float > Range
tuple d
Definition: ztail.py:151
T curvature(T InversePt, const edm::EventSetup &iSetup)
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
Range operator()(const GlobalPoint &p3, float erroRPhi3) const
double p2[4]
Definition: TauolaWrapper.h:90
double p1[4]
Definition: TauolaWrapper.h:89
ThirdHitZPrediction(const GlobalPoint &p1, float erroRPhi1, float errorZ1, const GlobalPoint &p2, float erroRPhi2, float errorZ2, double curvature, double nSigma=3.)
double p3[4]
Definition: TauolaWrapper.h:91