Back to home page

Project CMSSW displayed by LXR

 
 

    


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

0001 #ifndef TrajectoryStateClosestToPointBuilder_H
0002 #define TrajectoryStateClosestToPointBuilder_H
0003 
0004 #include "TrackingTools/TrajectoryState/interface/TrajectoryStateOnSurface.h"
0005 #include "TrackingTools/TrajectoryState/interface/TrajectoryStateClosestToPoint.h"
0006 
0007 /**
0008  * This class builds a TrajectoryStateClosestToPoint given an original 
0009  * TrajectoryStateOnSurface or FreeTrajectoryState. This new state is then 
0010  * defined at the point of closest approach to the reference point.
0011  * In case the propagation was not successful, this state can be invalid.
0012  */
0013 
0014 class TrajectoryStateClosestToPointBuilder {
0015 public:
0016   typedef TrajectoryStateOnSurface TSOS;
0017   typedef FreeTrajectoryState FTS;
0018 
0019   virtual ~TrajectoryStateClosestToPointBuilder() {}
0020 
0021   virtual TrajectoryStateClosestToPoint operator()(const FTS& originalFTS, const GlobalPoint& referencePoint) const = 0;
0022 
0023   virtual TrajectoryStateClosestToPoint operator()(const TSOS& originalTSOS,
0024                                                    const GlobalPoint& referencePoint) const = 0;
0025 
0026   static bool positionEqual(const GlobalPoint& ptB, const GlobalPoint& ptA) { return ptA == ptB; }
0027 
0028 protected:
0029   static TrajectoryStateClosestToPoint constructTSCP(const FTS& originalFTS, const GlobalPoint& referencePoint) {
0030     return TrajectoryStateClosestToPoint(originalFTS, referencePoint);
0031   }
0032 };
0033 #endif