Back to home page

Project CMSSW displayed by LXR

 
 

    


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

0001 #ifndef _ClosestApproachOnHelices_H_
0002 #define _ClosestApproachOnHelices_H_
0003 
0004 #include "DataFormats/GeometryVector/interface/GlobalPoint.h"
0005 #include <utility>
0006 
0007 /** \class ClosestApproachOnHelices
0008  *  Abstract interface for classes which compute the points of closest 
0009  *  approach of 2 helices. <br>
0010  * For a pair of states, the calculate methods have to be called before any of
0011  * the other methods. This will do all calculations needed to get the result.
0012  * It returns a status which says whether the calculation was successful.
0013  * This should be checked before getting the result. If the status is false 
0014  * and the results querried, an exception will be thrown. 
0015  */
0016 
0017 class FreeTrajectoryState;
0018 class TrajectoryStateOnSurface;
0019 
0020 class ClosestApproachOnHelices {
0021 public:
0022   ClosestApproachOnHelices() {}
0023 
0024   virtual ~ClosestApproachOnHelices() {}
0025 
0026   virtual bool calculate(const TrajectoryStateOnSurface& sta, const TrajectoryStateOnSurface& stb) = 0;
0027 
0028   virtual bool calculate(const FreeTrajectoryState& sta, const FreeTrajectoryState& stb) = 0;
0029 
0030   virtual bool status() const = 0;
0031 
0032   /** Points of closest approach on the 2 helices */
0033   virtual std::pair<GlobalPoint, GlobalPoint> points() const = 0;
0034 
0035   /** Crossing point of the 2 helices, computed as an average 
0036    *  of the points of closest approach. 
0037    *  The average can be weighted or not, depending on the implementation. 
0038    */
0039   virtual GlobalPoint crossingPoint() const = 0;
0040 
0041   /** Distance between the points of closest approach */
0042   virtual float distance() const = 0;
0043 
0044   virtual ClosestApproachOnHelices* clone() const = 0;
0045 };
0046 
0047 #endif