Go to the documentation of this file.00001 #ifndef _Tracker_TwoTrackMinimumDistanceHelixLine_H_
00002 #define _Tracker_TwoTrackMinimumDistanceHelixLine_H_
00003
00004 #include "DataFormats/GeometryVector/interface/GlobalPoint.h"
00005 #include "DataFormats/GeometryVector/interface/GlobalVector.h"
00006 #include <utility>
00015 class GlobalTrajectoryParameters;
00016
00017 class TwoTrackMinimumDistanceHelixLine {
00018
00019 public:
00020
00021 TwoTrackMinimumDistanceHelixLine(): theH(0), theL(0), themaxiter(12),
00022 pointsUpdated(false){}
00023 ~TwoTrackMinimumDistanceHelixLine() {}
00024
00025
00032 bool calculate( const GlobalTrajectoryParameters &,
00033 const GlobalTrajectoryParameters &,
00034 const float qual=.0001 );
00035
00041 std::pair <GlobalPoint, GlobalPoint> points() const;
00042 std::pair <double, double> pathLength() const;
00043
00044 double firstAngle() const;
00045 double secondAngle() const;
00046
00047 private:
00048 GlobalTrajectoryParameters *theH, *theL, *firstGTP, *secondGTP;
00049 GlobalVector posDiff;
00050 GlobalVector theLp;
00051 double X, Y, Z, px, py, pz, px2, py2, pz2, baseFct, baseDer;
00052 double theh, thePhiH0, thesinPhiH0, thecosPhiH0, thetanlambdaH;
00053 double thePhiH;
00054 double Hn, Ln;
00055 double aa,bb,cc,dd,ee,ff;
00056
00057 int themaxiter;
00058 bool updateCoeffs();
00059 void finalPoints() const;
00060 bool oneIteration(double & thePhiH, double & fct, double & derivative ) const;
00061 mutable GlobalPoint helixPoint, linePoint;
00062 mutable double tL, linePath, helixPath;
00063 mutable bool pointsUpdated;
00064
00065 };
00066 #endif