CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_4_1_8_patch9/src/TrackingTools/PatternTools/interface/TrajectoryStateClosestToPointBuilder.h

Go to the documentation of this file.
00001 #ifndef TrajectoryStateClosestToPointBuilder_H
00002 #define TrajectoryStateClosestToPointBuilder_H
00003 
00004 #include "TrackingTools/TrajectoryState/interface/TrajectoryStateOnSurface.h"
00005 #include "TrackingTools/TrajectoryState/interface/TrajectoryStateClosestToPoint.h"
00006 
00014 class TrajectoryStateClosestToPointBuilder
00015 {
00016 public: 
00017   typedef TrajectoryStateOnSurface      TSOS;
00018   typedef FreeTrajectoryState           FTS;
00019 
00020   virtual ~TrajectoryStateClosestToPointBuilder(){}
00021 
00022   virtual TrajectoryStateClosestToPoint operator() (const FTS& originalFTS, 
00023     const GlobalPoint& referencePoint) const = 0;
00024 
00025   virtual TrajectoryStateClosestToPoint operator() (const TSOS& originalTSOS, 
00026     const GlobalPoint& referencePoint) const = 0;
00027 
00028   bool positionEqual(const GlobalPoint& ptB, const GlobalPoint& ptA) const 
00029   {
00030     if ((ptA.x() == ptB.x()) && (ptA.y() == ptB.y()) && (ptA.z() == ptB.z()))
00031       return true;
00032     else return false;
00033   }
00034 
00035 protected:
00036 
00037   TrajectoryStateClosestToPoint constructTSCP(const FTS& originalFTS, 
00038     const GlobalPoint& referencePoint) const
00039     {return TrajectoryStateClosestToPoint(originalFTS, referencePoint);}
00040 
00041 
00042 };
00043 #endif