CMS 3D CMS Logo

ThirdHitPredictionFromInvLine.h
Go to the documentation of this file.
1 #ifndef ThirdHitPredictionFromInvLine_H
2 #define ThirdHitPredictionFromInvLine_H
6 
9 
10 
16 
17 #include <cassert>
18 
20 
21 public:
22 
25 
26  ThirdHitPredictionFromInvLine(const GlobalPoint & P1, const GlobalPoint & P2, double errorRPhiP1 = 1., 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 { assert(hasParameters); return theCurvatureValue; }
37 
38  double errorCurvature() const { assert(hasParameters); return theCurvatureError; }
39 
40  double chi2() const { assert(hasParameters); return theChi2; }
41 
42  void print() const;
43 private:
44 
45  template <class T> class MappedPoint {
46  public:
47  MappedPoint() : theU(0), theV(0), pRot(0) { }
48  MappedPoint(const T & aU, const T & aV, const TkRotation<T> * aRot)
49  : theU(aU), theV(aV), pRot(aRot) { }
51  : pRot(aRot) {
52  T radius2 = point.mag2();
53  Basic3DVector<T> rotated = (*pRot) * point;
54  theU = rotated.x() / radius2;
55  theV = rotated.y() / radius2;
56  }
57  T u() const {return theU; }
58  T v() const {return theV; }
60  T invRadius2 = theU*theU+theV*theV;
62  = (*pRot).multiplyInverse(Basic2DVector<T>(theU,theV));
63  return Basic2DVector<T>( tmp.x()/invRadius2, tmp.y()/invRadius2);
64  }
65  private:
68  };
69 
70 private:
73  void check();
74 
75 private:
76  Rotation theRotation;
77  int nPoints;
81 };
82 
83 
84 #endif
void add(const GlobalPoint &p, double erroriRPhi=1.)
T y() const
Cartesian y coordinate.
T x() const
Cartesian x coordinate.
Definition: weight.py:1
MappedPoint(const Basic2DVector< T > &point, const TkRotation< T > *aRot)
MappedPoint(const T &aU, const T &aV, const TkRotation< T > *aRot)
T mag2() const
The vector magnitude squared. Equivalent to vec.dot(vec)
std::vector< std::vector< double > > tmp
Definition: MVATrainer.cc:100
ThirdHitPredictionFromInvLine(const GlobalPoint &P1, const GlobalPoint &P2, double errorRPhiP1=1., double errorRPhiP2=1.)
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
GlobalPoint crossing(double radius) const