File indexing completed on 2024-04-06 12:31:34
0001 #ifndef _Tracker_TwoTrackMinimumDistanceHelixLine_H_
0002 #define _Tracker_TwoTrackMinimumDistanceHelixLine_H_
0003
0004 #include "DataFormats/GeometryVector/interface/GlobalPoint.h"
0005 #include "DataFormats/GeometryVector/interface/GlobalVector.h"
0006 #include <utility>
0007
0008
0009
0010
0011
0012
0013
0014
0015 class GlobalTrajectoryParameters;
0016
0017 class TwoTrackMinimumDistanceHelixLine {
0018 public:
0019 TwoTrackMinimumDistanceHelixLine() : theH(nullptr), theL(nullptr), themaxiter(12), pointsUpdated(false) {}
0020 ~TwoTrackMinimumDistanceHelixLine() {}
0021
0022
0023
0024
0025
0026
0027
0028 bool calculate(const GlobalTrajectoryParameters &,
0029 const GlobalTrajectoryParameters &,
0030 const float qual = .0001);
0031
0032
0033
0034
0035
0036
0037 std::pair<GlobalPoint, GlobalPoint> points() const;
0038 std::pair<double, double> pathLength() const;
0039
0040 double firstAngle() const;
0041 double secondAngle() const;
0042
0043 private:
0044 const GlobalTrajectoryParameters *theH, *theL, *firstGTP, *secondGTP;
0045 GlobalVector posDiff;
0046 GlobalVector theLp;
0047 double X, Y, Z, px, py, pz, px2, py2, pz2, baseFct, baseDer;
0048 double theh, thePhiH0, thesinPhiH0, thecosPhiH0, thetanlambdaH;
0049 double thePhiH;
0050 double Hn, Ln;
0051 double aa, bb, cc, dd, ee, ff;
0052
0053 int themaxiter;
0054 bool updateCoeffs();
0055 void finalPoints();
0056 bool oneIteration(double &thePhiH, double &fct, double &derivative) const;
0057 GlobalPoint helixPoint, linePoint;
0058 double tL, linePath, helixPath;
0059 bool pointsUpdated;
0060 };
0061 #endif