CMS 3D CMS Logo

ThirdHitPredictionFromInvLine.h
Go to the documentation of this file.
1 #ifndef ThirdHitPredictionFromInvLine_H
2 #define ThirdHitPredictionFromInvLine_H
6 
9 
15 
16 #include <cassert>
17 
19 public:
22 
24  const GlobalPoint& P2,
25  double errorRPhiP1 = 1.,
26  double errorRPhiP2 = 1.);
27 
28  int size() const { return nPoints; }
29 
30  void add(const GlobalPoint& p, double erroriRPhi = 1.);
31 
32  void remove(const GlobalPoint& p, double erroriRPhi = 1.);
33 
34  GlobalPoint crossing(double radius) const;
35 
36  double curvature() const {
38  return theCurvatureValue;
39  }
40 
41  double errorCurvature() const {
43  return theCurvatureError;
44  }
45 
46  double chi2() const {
48  return theChi2;
49  }
50 
51  void print() const;
52 
53 private:
54  template <class T>
55  class MappedPoint {
56  public:
57  MappedPoint() : theU(0), theV(0), pRot(0) {}
58  MappedPoint(const T& aU, const T& aV, const TkRotation<T>* aRot) : theU(aU), theV(aV), pRot(aRot) {}
59  MappedPoint(const Basic2DVector<T>& point, const TkRotation<T>* aRot) : pRot(aRot) {
60  T radius2 = point.mag2();
61  Basic3DVector<T> rotated = (*pRot) * point;
62  theU = rotated.x() / radius2;
63  theV = rotated.y() / radius2;
64  }
65  T u() const { return theU; }
66  T v() const { return theV; }
68  T invRadius2 = theU * theU + theV * theV;
69  Basic3DVector<T> tmp = (*pRot).multiplyInverse(Basic2DVector<T>(theU, theV));
70  return Basic2DVector<T>(tmp.x() / invRadius2, tmp.y() / invRadius2);
71  }
72 
73  private:
76  };
77 
78 private:
81  void check();
82 
83 private:
85  int nPoints;
89 };
90 
91 #endif
void add(const GlobalPoint &p, double erroriRPhi=1.)
T x() const
Cartesian x coordinate.
Definition: weight.py:1
T y() const
Cartesian y coordinate.
assert(be >=bs)
GlobalPoint crossing(double radius) const
MappedPoint(const Basic2DVector< T > &point, const TkRotation< T > *aRot)
MappedPoint(const T &aU, const T &aV, const TkRotation< T > *aRot)
ThirdHitPredictionFromInvLine(const GlobalPoint &P1, const GlobalPoint &P2, double errorRPhiP1=1., double errorRPhiP2=1.)
tmp
align.sh
Definition: createJobs.py:716
long double T
*vegas h *****************************************************used in the default bin number in original ***version of VEGAS is ***a higher bin number might help to derive a more precise ***grade subtle point
Definition: invegas.h:5