CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
ThirdHitPredictionFromInvLine.h
Go to the documentation of this file.
1 #ifndef ThirdHitPredictionFromInvLine_H
2 #define ThirdHitPredictionFromInvLine_H
6 
9 
10 
16 
18 
19 public:
20 
23 
24  ThirdHitPredictionFromInvLine(const GlobalPoint & P1, const GlobalPoint & P2, double errorRPhiP1 = 1., double errorRPhiP2 = 1. );
25 
26  int size() const { return nPoints;}
27 
28  void add(const GlobalPoint& p, double erroriRPhi =1.);
29 
30  void remove(const GlobalPoint& p, double erroriRPhi =1.);
31 
32  GlobalPoint crossing(double radius) const;
33 
34  double curvature() const { check(); return theCurvatureValue; }
35 
36  double errorCurvature() const { check(); return theCurvatureError; }
37 
38  double chi2() const { check(); return theChi2; }
39 
40  void print() const;
41 private:
42 
43  template <class T> class MappedPoint {
44  public:
45  MappedPoint() : theU(0), theV(0), pRot(0) { }
46  MappedPoint(const T & aU, const T & aV, const TkRotation<T> * aRot)
47  : theU(aU), theV(aV), pRot(aRot) { }
49  : pRot(aRot) {
50  T radius2 = point.mag2();
51  Basic3DVector<T> rotated = (*pRot) * point;
52  theU = rotated.x() / radius2;
53  theV = rotated.y() / radius2;
54  }
55  T u() const {return theU; }
56  T v() const {return theV; }
58  T invRadius2 = theU*theU+theV*theV;
60  = (*pRot).multiplyInverse(Basic2DVector<T>(theU,theV));
61  return Basic2DVector<T>( tmp.x()/invRadius2, tmp.y()/invRadius2);
62  }
63  private:
66  };
67 
68 private:
71  void check() const;
72 
73 private:
75  int nPoints;
77  mutable bool hasParameters;
79 };
80 
81 
82 #endif
void add(const GlobalPoint &p, double erroriRPhi=1.)
T y() const
Cartesian y coordinate.
T x() const
Cartesian x coordinate.
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