CMS 3D CMS Logo

GsfPropagatorAdapter.h

Go to the documentation of this file.
00001 #ifndef GsfPropagatorAdapter_h_
00002 #define GsfPropagatorAdapter_h_
00003 
00004 #include "TrackingTools/TrajectoryState/interface/TrajectoryStateOnSurface.h"
00005 #include "TrackingTools/GeomPropagators/interface/Propagator.h"
00006 #include "DataFormats/GeometryCommonDetAlgo/interface/DeepCopyPointerByClone.h"
00007 
00008 class MagneticField;
00009 
00014 class GsfPropagatorAdapter : public Propagator {
00015 
00016 public:
00018   GsfPropagatorAdapter (const Propagator& Propagator);
00019 
00020   ~GsfPropagatorAdapter() {}
00021 
00024   virtual TrajectoryStateOnSurface propagate (const TrajectoryStateOnSurface& tsos, 
00025                                               const Surface& surface) const
00026   {
00027     return Propagator::propagate(tsos,surface);
00028   }
00032   virtual TrajectoryStateOnSurface propagate (const TrajectoryStateOnSurface& tsos, 
00033                                               const Plane& plane) const
00034   {
00035     return propagateWithPath(tsos,plane).first;
00036   }
00040   virtual TrajectoryStateOnSurface propagate (const TrajectoryStateOnSurface& tsos, 
00041                                               const Cylinder& cylinder) const
00042   {
00043     return propagateWithPath(tsos,cylinder).first;
00044   }
00045 
00049   virtual std::pair<TrajectoryStateOnSurface,double> 
00050   propagateWithPath (const TrajectoryStateOnSurface& tsos, 
00051                      const Surface& surface) const
00052   {
00053     return Propagator::propagateWithPath(tsos,surface);
00054   }
00057   virtual std::pair<TrajectoryStateOnSurface,double> 
00058   propagateWithPath (const TrajectoryStateOnSurface&, 
00059                      const Plane&) const;
00062   virtual std::pair<TrajectoryStateOnSurface,double> 
00063   propagateWithPath (const TrajectoryStateOnSurface&, 
00064                      const Cylinder&) const;
00065 
00069   virtual TrajectoryStateOnSurface propagate (const FreeTrajectoryState& fts, 
00070                                               const Surface& surface) const
00071   {
00072     return Propagator::propagate(fts,surface);
00073   }
00078   virtual TrajectoryStateOnSurface propagate (const FreeTrajectoryState& fts, 
00079                                               const Plane& plane) const
00080   {
00081     return propagateWithPath(fts,plane).first;
00082   }
00087   virtual TrajectoryStateOnSurface propagate (const FreeTrajectoryState& fts, 
00088                                               const Cylinder& cylinder) const
00089   {
00090     return propagateWithPath(fts,cylinder).first;
00091   }
00092 
00097   virtual std::pair<TrajectoryStateOnSurface,double> propagateWithPath (const FreeTrajectoryState& fts, 
00098                                                                         const Surface& surface) const
00099   {
00100     return Propagator::propagateWithPath(fts,surface);
00101   }
00105   virtual std::pair<TrajectoryStateOnSurface,double> propagateWithPath (const FreeTrajectoryState&, 
00106                                                                         const Plane&) const;
00110   virtual std::pair<TrajectoryStateOnSurface,double> propagateWithPath (const FreeTrajectoryState&, 
00111                                                                         const Cylinder&) const;
00112 
00113   virtual bool setMaxDirectionChange( float phiMax) { 
00114     return thePropagator->setMaxDirectionChange(phiMax);
00115   }
00116   virtual void setPropagationDirection (PropagationDirection dir);
00117 
00119   inline const Propagator& propagator () const
00120   {
00121     return *thePropagator;
00122   }
00123 
00124   virtual GsfPropagatorAdapter* clone() const
00125   {
00126     return new GsfPropagatorAdapter(*thePropagator);
00127   }
00128 
00129   virtual const MagneticField* magneticField() const {
00130     return thePropagator->magneticField();
00131   }
00132 
00133 private:
00134   // Single state propagator
00135   DeepCopyPointerByClone<Propagator> thePropagator;
00136 };
00137 
00138 #endif

Generated on Tue Jun 9 17:48:18 2009 for CMSSW by  doxygen 1.5.4