Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:31:34

0001 #ifndef _Tracker_TwoTrackMinimumDistanceHelixHelix_H_
0002 #define _Tracker_TwoTrackMinimumDistanceHelixHelix_H_
0003 
0004 #include "DataFormats/GeometryVector/interface/GlobalPoint.h"
0005 // #include <string>
0006 // #include <sstream>
0007 #include <utility>
0008 
0009 /** \class TwoTrackMinimumDistanceHelixHelix
0010  *  This is a helper class for TwoTrackMinimumDistance.
0011  *  No user should need direct access to this class.
0012  *  It actually implements a Newton-Kantorowitsch method
0013  *  for finding the minimum distance between two tracks.
0014  */
0015 
0016 class GlobalTrajectoryParameters;
0017 
0018 class TwoTrackMinimumDistanceHelixHelix {
0019 public:
0020   TwoTrackMinimumDistanceHelixHelix();
0021   ~TwoTrackMinimumDistanceHelixHelix();
0022 
0023   bool calculate(const GlobalTrajectoryParameters &,
0024                  const GlobalTrajectoryParameters &,
0025                  const float qual = .001);  // retval=true? error occured.
0026 
0027   std::pair<GlobalPoint, GlobalPoint> points() const { return std::pair<GlobalPoint, GlobalPoint>(pointG, pointH); }
0028 
0029   std::pair<double, double> pathLength() const { return std::pair<double, double>(pathG, pathH); }
0030 
0031   double firstAngle() const { return thepG; }
0032   double secondAngle() const { return thepH; }
0033 
0034 private:
0035   bool updateCoeffs(const GlobalPoint &, const GlobalPoint &);
0036   bool oneIteration(double &, double &);
0037 
0038   // bool parallelTracks () const;
0039   void finalPoints();
0040 
0041 private:
0042   GlobalTrajectoryParameters const *theH, *theG;
0043   // the 'GH-track data' (constants)
0044   double thea, theb, thec1, thec2, thed1, thed2, thee1, thee2, theg, theh;
0045   // double thelambdaG, thelambdaH;
0046   double thetanlambdaG, thetanlambdaH;
0047   double thesinpG0, thecospG0;
0048   double thesinpH0, thecospH0;
0049   double thepG0, thepH0;
0050 
0051   // the variable stuff
0052   // = the point we are currently looking at.
0053   double thepG, thepH;
0054   double thesinpG, thesinpH;
0055   double thecospG, thecospH;
0056   GlobalPoint pointG, pointH;
0057   double pathG, pathH;
0058   bool pointsUpdated;
0059 
0060   double themaxjump, thesingjacI;
0061   int themaxiter;
0062 };
0063 #endif