CMS 3D CMS Logo

CMSSW_4_4_3_patch1/src/TrackingTools/PatternTools/interface/TwoTrackMinimumDistanceHelixHelix.h

Go to the documentation of this file.
00001 #ifndef _Tracker_TwoTrackMinimumDistanceHelixHelix_H_
00002 #define _Tracker_TwoTrackMinimumDistanceHelixHelix_H_
00003 
00004 #include "DataFormats/GeometryVector/interface/GlobalPoint.h"
00005 // #include <string>
00006 // #include <sstream>
00007 #include <utility>
00008 
00016 class GlobalTrajectoryParameters;
00017 
00018 class TwoTrackMinimumDistanceHelixHelix {
00019 
00020 public:
00021   TwoTrackMinimumDistanceHelixHelix();
00022   ~TwoTrackMinimumDistanceHelixHelix();
00023 
00024   bool calculate( const GlobalTrajectoryParameters &,
00025       const GlobalTrajectoryParameters &,
00026       const float qual=.001 ); // retval=true? error occured.
00027 
00028   std::pair <GlobalPoint, GlobalPoint> points() const {
00029     if (!pointsUpdated) finalPoints();
00030     return std::pair<GlobalPoint, GlobalPoint> (pointG, pointH);
00031   }
00032 
00033   std::pair <double, double> pathLength() const {
00034     if (!pointsUpdated) finalPoints();
00035     return std::pair <double, double> ( pathG, pathH);
00036   }
00037 
00038 
00039 
00040   double firstAngle() const {return thepG;}
00041   double secondAngle() const {return thepH;}
00042 
00043 private:
00044   bool updateCoeffs( const GlobalPoint & , const GlobalPoint & );
00045   bool oneIteration ( double &, double & ) const;
00046 
00047 // bool parallelTracks () const;
00048   void finalPoints() const;
00049 
00050 private:
00051   GlobalTrajectoryParameters const *theH, *theG;
00052   // the 'GH-track data' (constants)
00053   double thea, theb, thec1, thec2, thed1, thed2, thee1, thee2, theg, theh;
00054   // double thelambdaG, thelambdaH;
00055   double thetanlambdaG, thetanlambdaH;
00056   double thesinpG0, thecospG0;
00057   double thesinpH0, thecospH0;
00058   double thepG0, thepH0;
00059 
00060   // the variable stuff
00061   // = the point we are currently looking at.
00062   mutable double thepG, thepH;
00063   mutable double thesinpG, thesinpH;
00064   mutable double thecospG, thecospH;
00065   mutable GlobalPoint pointG, pointH;
00066   mutable double pathG, pathH;
00067   mutable bool pointsUpdated;
00068 
00069   double themaxjump, thesingjacI;
00070   int themaxiter;
00071 
00072 };
00073 #endif