CMS 3D CMS Logo

/data/doxygen/doxygen-1.7.3/gen/CMSSW_4_2_8/src/TrackingTools/GeomPropagators/interface/SmartPropagator.h

Go to the documentation of this file.
00001 #ifndef GeomPropagators_SmartPropagator_H
00002 #define GeomPropagators_SmartPropagator_H
00003 
00023 /* Collaborating Class Declarations */
00024 #include "TrackingTools/TrajectoryState/interface/FreeTrajectoryState.h"
00025 #include "TrackingTools/TrajectoryState/interface/TrajectoryStateOnSurface.h"
00026 #include "TrackingTools/GeomPropagators/interface/Propagator.h"
00027 #include "MagneticField/Engine/interface/MagneticField.h"
00028 #include "DataFormats/GeometrySurface/interface/ReferenceCounted.h"
00029 #include "DataFormats/TrajectorySeed/interface/PropagationDirection.h"
00030 
00031 class BoundCylinder;
00032 class BoundPlane;
00033 
00034 
00035 /* Class SmartPropagator Interface */
00036 
00037 class SmartPropagator : public Propagator {
00038 
00039   public:
00040 
00041     /* Constructor */ 
00043     SmartPropagator(Propagator* aTkProp, Propagator* aGenProp, const MagneticField* field,
00044         PropagationDirection dir = alongMomentum, float epsilon = 5) ;
00045 
00047     SmartPropagator(const Propagator& aTkProp, const Propagator& aGenProp,const MagneticField* field,
00048         PropagationDirection dir = alongMomentum, float epsilon = 5) ;
00049 
00051     SmartPropagator( const SmartPropagator& );
00052 
00054     virtual ~SmartPropagator() ;
00055 
00057     virtual SmartPropagator* clone() const {
00058       return new SmartPropagator(getTkPropagator(),getGenPropagator(),magneticField());
00059     }
00060 
00062     void setPropagationDirection (PropagationDirection dir) const
00063     {
00064       Propagator::setPropagationDirection (dir);
00065       getTkPropagator()->setPropagationDirection(dir);
00066       getGenPropagator()->setPropagationDirection(dir);
00067     }
00068 
00069 
00070     /* Operations as propagator*/ 
00071     TrajectoryStateOnSurface propagate(const FreeTrajectoryState& fts, 
00072                                        const Surface& surface) const;
00073 
00074     TrajectoryStateOnSurface propagate(const TrajectoryStateOnSurface& tsos, 
00075                                        const Surface& surface) const {
00076       return Propagator::propagate(tsos,surface);
00077     }
00078 
00079     TrajectoryStateOnSurface propagate(const FreeTrajectoryState& fts,
00080                                        const Plane& plane) const;
00081 
00082     TrajectoryStateOnSurface propagate(const TrajectoryStateOnSurface& tsos,
00083                                        const Plane& plane) const {
00084       return Propagator::propagate(tsos, plane);
00085     }
00086 
00087     TrajectoryStateOnSurface propagate(const FreeTrajectoryState& fts, 
00088                                        const Cylinder& cylinder) const;
00089 
00090     TrajectoryStateOnSurface propagate(const TrajectoryStateOnSurface& tsos, 
00091                                        const Cylinder& cylinder) const {
00092       return Propagator::propagate(tsos, cylinder);
00093     }
00094 
00095     std::pair<TrajectoryStateOnSurface,double> 
00096       propagateWithPath(const FreeTrajectoryState& fts, 
00097                         const Surface& surface) const {
00098         return Propagator::propagateWithPath(fts,surface);
00099       }
00100 
00101     std::pair<TrajectoryStateOnSurface,double> 
00102       propagateWithPath(const TrajectoryStateOnSurface& tsos, 
00103                         const Surface& surface) const {
00104         return Propagator::propagateWithPath(tsos,surface);
00105       }
00106 
00107     std::pair<TrajectoryStateOnSurface,double> 
00108       propagateWithPath(const FreeTrajectoryState& fts, 
00109                         const Plane& plane) const;
00110 
00111     std::pair<TrajectoryStateOnSurface,double> 
00112       propagateWithPath(const TrajectoryStateOnSurface& tsos, 
00113                         const Plane& plane) const {
00114         return Propagator::propagateWithPath(tsos, plane);
00115       }
00116 
00117     std::pair<TrajectoryStateOnSurface,double> 
00118       propagateWithPath(const FreeTrajectoryState& fts, 
00119                         const Cylinder& cylinder) const;
00120 
00121     std::pair<TrajectoryStateOnSurface,double> 
00122       propagateWithPath(const TrajectoryStateOnSurface& tsos, 
00123                         const Cylinder& cylinder) const {
00124         return Propagator::propagateWithPath(tsos, cylinder);
00125       }
00126 
00128     bool insideTkVol(const FreeTrajectoryState& fts) const ;
00130     bool insideTkVol(const Surface& surface) const ;
00132     bool insideTkVol(const BoundCylinder& cylin)  const ;
00134     bool insideTkVol(const Plane& plane)  const ;
00135 
00137     Propagator* getTkPropagator() const ;
00139     Propagator* getGenPropagator() const ;
00141     virtual const MagneticField* magneticField() const {return theField;}
00142 
00143   private:
00145   static void initTkVolume(float epsilon);
00146 
00147     mutable Propagator* theTkProp;
00148     mutable Propagator* theGenProp;
00149     const MagneticField* theField;
00150     static ReferenceCountingPointer<BoundCylinder> & theTkVolume();
00151 
00152   protected:
00153 
00154 };
00155 
00156 #endif // SMARTPROPAGATOR_H
00157 
00158