CMS 3D CMS Logo

ThirdHitZPrediction.h
Go to the documentation of this file.
1 #ifndef ThirdHitZPrediction_H
2 #define ThirdHitZPrediction_H
3 
6 #include <cmath>
7 
9 public:
12  float erroRPhi1,
13  float errorZ1,
14  const GlobalPoint& p2,
15  float erroRPhi2,
16  float errorZ2,
17  double curvature,
18  double nSigma = 3.)
19  : thePoint2(p2),
20  sqr_errorXY12(erroRPhi1 * erroRPhi1 + erroRPhi2 * erroRPhi2),
21  sqr_errorXY2(erroRPhi2 * erroRPhi2),
22  theErrorZ1(errorZ1),
23  theErrorZ2(errorZ2),
24  theCurvature(curvature),
25  theNSigma(nSigma) {
26  auto d = p2 - p1;
27  dR12 = d.perp();
28  if (dR12 < 1.e-5)
29  dR12 = 1.e-5;
30  dS12 = std::abs(0.5 * dR12 * theCurvature) < 1 ? std::asin(0.5 * dR12 * theCurvature) : 1.;
31  dZ12 = d.z();
32  }
33  Range operator()(const GlobalPoint& p3, float erroRPhi3) const;
34 
35 private:
37  double dR12, dZ12, dS12;
38  double sqr_errorXY12;
39  double sqr_errorXY2;
41  double theCurvature;
42  double theNSigma;
43 };
44 #endif
PixelRecoRange< float > Range
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
d
Definition: ztail.py:151
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