File indexing completed on 2024-04-06 12:28:31
0001 #ifndef RecoTracker_PixelSeeding_ThirdHitPredictionFromCircle_h
0002 #define RecoTracker_PixelSeeding_ThirdHitPredictionFromCircle_h
0003
0004 #include "DataFormats/GeometryVector/interface/Basic2DVector.h"
0005 #include "DataFormats/GeometryVector/interface/Basic3DVector.h"
0006
0007 #include "DataFormats/GeometryVector/interface/GlobalPoint.h"
0008 #include "RecoTracker/TkMSParametrization/interface/PixelRecoRange.h"
0009
0010 class ThirdHitPredictionFromCircle {
0011 public:
0012 using Scalar = double;
0013 typedef PixelRecoRange<float> Range;
0014 typedef Basic2DVector<Scalar> Vector2D;
0015 typedef Basic2DVector<float> VectorF2D;
0016
0017 ThirdHitPredictionFromCircle(const GlobalPoint &P1, const GlobalPoint &P2, float tolerance);
0018
0019 float phi(float curvature, float radius) const;
0020 float angle(float curvature, float radius) const;
0021
0022 Range operator()(Range curvature, float radius) const;
0023
0024 Range curvature(double transverseIP) const;
0025 double curvature(const Vector2D &thirdPoint) const;
0026 double transverseIP(const Vector2D &thirdPoint) const;
0027
0028
0029
0030 class HelixRZ {
0031 public:
0032 using Vector2D = ThirdHitPredictionFromCircle::Vector2D;
0033 using Scalar = ThirdHitPredictionFromCircle::Scalar;
0034
0035
0036
0037 HelixRZ() : circle(nullptr) {}
0038 HelixRZ(const ThirdHitPredictionFromCircle *icircle, double iz1, double z2, double curv);
0039
0040 Scalar zAtR(Scalar r) const;
0041 Scalar rAtZ(Scalar z) const;
0042
0043 static double maxCurvature(const ThirdHitPredictionFromCircle *circle, double z1, double z2, double z3);
0044
0045 private:
0046 const ThirdHitPredictionFromCircle *circle;
0047 Vector2D center;
0048 Scalar curvature, radius, z1, seg, dzdu;
0049 };
0050
0051 private:
0052 friend class HelixRZ;
0053
0054 Scalar invCenterOnAxis(const Vector2D &thirdPoint) const;
0055
0056 Vector2D p1, center, axis;
0057 Scalar delta, delta2;
0058 float theTolerance;
0059 };
0060
0061 #endif