Back to home page

Project CMSSW displayed by LXR

 
 

    


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

0001 #ifndef _Tracker_TwoTrackMinimumDistanceLineLine_H_
0002 #define _Tracker_TwoTrackMinimumDistanceLineLine_H_
0003 
0004 #include "DataFormats/GeometryVector/interface/GlobalPoint.h"
0005 #include <string>
0006 #include <sstream>
0007 #include <utility>
0008 
0009 /** \class TwoTrackMinimumDistanceLineLine
0010  *  This is a helper class for TwoTrackMinimumDistance.
0011  *  No user should need direct access to this class.
0012  *  Exact solution.
0013  */
0014 
0015 class GlobalTrajectoryParameters;
0016 
0017 class TwoTrackMinimumDistanceLineLine {
0018 public:
0019   /**
0020    * Calculates the point of closest approach on the two tracks.
0021    * \return false in case of success<br>
0022    * true in case of failure. Possible failures:<br>
0023    *   - Either of the Trajectories are charged
0024    *   - Either of the Trajectories is of zero momentum
0025    *   - Trajectories are parallel
0026    */
0027 
0028   bool calculate(const GlobalTrajectoryParameters &,
0029                  const GlobalTrajectoryParameters &);  // retval=true? error occured.
0030 
0031   std::pair<GlobalPoint, GlobalPoint> points() const;
0032   std::pair<double, double> pathLength() const;
0033 
0034   double firstAngle() const { return phiG; }
0035   double secondAngle() const { return phiH; }
0036 
0037 private:
0038   double phiH, phiG;
0039   double pathG, pathH;
0040   GlobalPoint gPos, hPos;
0041 };
0042 #endif