Go to the documentation of this file.00001 #ifndef ThirdHitPredictionFromCircle_H
00002 #define ThirdHitPredictionFromCircle_H
00003
00004 #include "DataFormats/GeometryVector/interface/Basic2DVector.h"
00005 #include "DataFormats/GeometryVector/interface/Basic3DVector.h"
00006
00007 #include "DataFormats/GeometryVector/interface/GlobalPoint.h"
00008 #include "RecoTracker/TkMSParametrization/interface/PixelRecoRange.h"
00009
00010
00011 class ThirdHitPredictionFromCircle {
00012
00013 public:
00014 using Scalar = double;
00015 typedef PixelRecoRange<float> Range;
00016 typedef Basic2DVector<Scalar> Vector2D;
00017 typedef Basic2DVector<float> VectorF2D;
00018
00019 ThirdHitPredictionFromCircle(const GlobalPoint & P1, const GlobalPoint & P2,
00020 float tolerance);
00021
00022 float phi(float curvature, float radius) const;
00023 float angle(float curvature, float radius) const;
00024
00025 Range operator()(Range curvature, float radius) const;
00026
00027 Range curvature(double transverseIP) const;
00028 double curvature(const Vector2D &thirdPoint) const;
00029 double transverseIP(const Vector2D &thirdPoint) const;
00030
00031
00032
00033 class HelixRZ {
00034 public:
00035 using Vector2D=ThirdHitPredictionFromCircle::Vector2D;
00036 using Scalar=ThirdHitPredictionFromCircle::Scalar;
00037
00038
00039
00040 HelixRZ() : circle(0) {}
00041 HelixRZ(const ThirdHitPredictionFromCircle *icircle,
00042 double iz1, double z2, double curv);
00043
00044 Scalar zAtR(Scalar r) const;
00045 Scalar rAtZ(Scalar z) const;
00046
00047 static double maxCurvature(const ThirdHitPredictionFromCircle *circle,
00048 double z1, double z2, double z3);
00049
00050 private:
00051 const ThirdHitPredictionFromCircle *circle;
00052 Vector2D center;
00053 Scalar curvature, radius, z1, seg, dzdu;
00054 };
00055
00056 private:
00057 friend class HelixRZ;
00058
00059 Scalar invCenterOnAxis(const Vector2D &thirdPoint) const;
00060
00061 Vector2D p1, center, axis;
00062 Scalar delta, delta2;
00063 float theTolerance;
00064 };
00065
00066 #endif