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
TkRotation< double >
ThirdHitPredictionFromInvLine::MappedPoint
Definition: ThirdHitPredictionFromInvLine.h:55
ThirdHitPredictionFromInvLine::ThirdHitPredictionFromInvLine
ThirdHitPredictionFromInvLine(const GlobalPoint &P1, const GlobalPoint &P2, double errorRPhiP1=1., double errorRPhiP2=1.)
Definition: ThirdHitPredictionFromInvLine.cc:23
ThirdHitPredictionFromInvLine::theSumUV
long double theSumUV
Definition: ThirdHitPredictionFromInvLine.h:86
ThirdHitPredictionFromInvLine::add
void add(const GlobalPoint &p, double erroriRPhi=1.)
Definition: ThirdHitPredictionFromInvLine.cc:58
ThirdHitPredictionFromInvLine::theCurvatureValue
double theCurvatureValue
Definition: ThirdHitPredictionFromInvLine.h:88
ThirdHitPredictionFromInvLine::errorCurvature
double errorCurvature() const
Definition: ThirdHitPredictionFromInvLine.h:41
Basic3DVector.h
cms::cuda::assert
assert(be >=bs)
ThirdHitPredictionFromInvLine::curvature
double curvature() const
Definition: ThirdHitPredictionFromInvLine.h:36
ThirdHitPredictionFromInvLine::MappedPoint::u
T u() const
Definition: ThirdHitPredictionFromInvLine.h:65
ThirdHitPredictionFromInvLine::MappedPoint::MappedPoint
MappedPoint()
Definition: ThirdHitPredictionFromInvLine.h:57
ThirdHitPredictionFromInvLine::theCurvatureError
double theCurvatureError
Definition: ThirdHitPredictionFromInvLine.h:88
ThirdHitPredictionFromInvLine::theRotation
Rotation theRotation
Definition: ThirdHitPredictionFromInvLine.h:84
ThirdHitPredictionFromInvLine::MappedPoint::unmap
Basic2DVector< T > unmap() const
Definition: ThirdHitPredictionFromInvLine.h:67
createJobs.tmp
tmp
align.sh
Definition: createJobs.py:716
ThirdHitPredictionFromInvLine::print
void print() const
Definition: ThirdHitPredictionFromInvLine.cc:89
ThirdHitPredictionFromInvLine::crossing
GlobalPoint crossing(double radius) const
Definition: ThirdHitPredictionFromInvLine.cc:47
Basic3DVector::y
T y() const
Cartesian y coordinate.
Definition: extBasic3DVector.h:97
ThirdHitPredictionFromInvLine::theSumV
long double theSumV
Definition: ThirdHitPredictionFromInvLine.h:86
TkRotation.h
Point3DBase< float, GlobalTag >
ThirdHitPredictionFromInvLine::theSum
long double theSum
Definition: ThirdHitPredictionFromInvLine.h:86
Basic2DVector
Definition: extBasic2DVector.h:15
ThirdHitPredictionFromInvLine::size
int size() const
Definition: ThirdHitPredictionFromInvLine.h:28
PixelRecoRange< float >
AlCaHLTBitMon_ParallelJobs.p
def p
Definition: AlCaHLTBitMon_ParallelJobs.py:153
ThirdHitPredictionFromInvLine::theChi2
double theChi2
Definition: ThirdHitPredictionFromInvLine.h:88
ThirdHitPredictionFromInvLine::chi2
double chi2() const
Definition: ThirdHitPredictionFromInvLine.h:46
ThirdHitPredictionFromInvLine::MappedPoint::MappedPoint
MappedPoint(const T &aU, const T &aV, const TkRotation< T > *aRot)
Definition: ThirdHitPredictionFromInvLine.h:58
ThirdHitPredictionFromInvLine::MappedPoint::MappedPoint
MappedPoint(const Basic2DVector< T > &point, const TkRotation< T > *aRot)
Definition: ThirdHitPredictionFromInvLine.h:59
ThirdHitPredictionFromInvLine::check
void check()
Definition: ThirdHitPredictionFromInvLine.cc:94
ThirdHitPredictionFromInvLine::nPoints
int nPoints
Definition: ThirdHitPredictionFromInvLine.h:85
ThirdHitPredictionFromInvLine::MappedPoint::theU
T theU
Definition: ThirdHitPredictionFromInvLine.h:74
ThirdHitPredictionFromInvLine::theSumVV
long double theSumVV
Definition: ThirdHitPredictionFromInvLine.h:86
Basic2DVector.h
T
long double T
Definition: Basic3DVectorLD.h:48
ThirdHitPredictionFromInvLine::MappedPoint::v
T v() const
Definition: ThirdHitPredictionFromInvLine.h:66
ThirdHitPredictionFromInvLine
Definition: ThirdHitPredictionFromInvLine.h:18
CosmicsPD_Skims.radius
radius
Definition: CosmicsPD_Skims.py:135
Basic3DVector::x
T x() const
Cartesian x coordinate.
Definition: extBasic3DVector.h:94
ThirdHitPredictionFromInvLine::PointUV
MappedPoint< double > PointUV
Definition: ThirdHitPredictionFromInvLine.h:79
ThirdHitPredictionFromInvLine::MappedPoint::theV
T theV
Definition: ThirdHitPredictionFromInvLine.h:74
ThirdHitPredictionFromInvLine::Rotation
TkRotation< double > Rotation
Definition: ThirdHitPredictionFromInvLine.h:20
ThirdHitPredictionFromInvLine::MappedPoint::pRot
const TkRotation< T > * pRot
Definition: ThirdHitPredictionFromInvLine.h:75
point
*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
ThirdHitPredictionFromInvLine::theSumU
long double theSumU
Definition: ThirdHitPredictionFromInvLine.h:86
GlobalPoint.h
ThirdHitPredictionFromInvLine::remove
void remove(const GlobalPoint &p, double erroriRPhi=1.)
Definition: ThirdHitPredictionFromInvLine.cc:75
Basic3DVector
Definition: extBasic3DVector.h:30
weight
Definition: weight.py:1
ThirdHitPredictionFromInvLine::theSumUU
long double theSumUU
Definition: ThirdHitPredictionFromInvLine.h:86
PixelRecoRange.h
ThirdHitPredictionFromInvLine::Range
PixelRecoRange< float > Range
Definition: ThirdHitPredictionFromInvLine.h:21
ThirdHitPredictionFromInvLine::hasParameters
bool hasParameters
Definition: ThirdHitPredictionFromInvLine.h:87