CMS 3D CMS Logo

/afs/cern.ch/work/a/aaltunda/public/www/CMSSW_6_2_7/src/TrackingTools/MaterialEffects/interface/PropagatorWithMaterial.h

Go to the documentation of this file.
00001 #ifndef _COMMONRECO_PROPAGATORWITHMATERIAL_H_
00002 #define _COMMONRECO_PROPAGATORWITHMATERIAL_H_
00003 
00020 #include "DataFormats/GeometryCommonDetAlgo/interface/DeepCopyPointerByClone.h"
00021 #include "TrackPropagation/RungeKutta/interface/defaultRKPropagator.h"
00022 
00023 #include "TrackingTools/GeomPropagators/interface/Propagator.h"
00024 #include "TrackingTools/MaterialEffects/interface/MaterialEffectsUpdator.h"
00025 #include "MagneticField/Engine/interface/MagneticField.h"
00026 
00027 class PropagatorWithMaterial GCC11_FINAL : public Propagator {
00028   
00029 public:
00040   PropagatorWithMaterial (PropagationDirection dir, const float mass,  
00041                           const MagneticField * mf=0,const float maxDPhi=1.6,
00042                           bool useRungeKutta=false, float ptMin=-1.,bool useOldGeoPropLogic=true);
00043 
00044   virtual ~PropagatorWithMaterial();
00045 
00046   virtual TrajectoryStateOnSurface propagate (const TrajectoryStateOnSurface& tsos, 
00047                                               const Plane& plane) const
00048   {
00049     // should be implemented (in case underlying propagator has an independent
00050     // implementation)
00051     return propagateWithPath(tsos,plane).first;
00052   }
00053 
00054   virtual TrajectoryStateOnSurface propagate (const FreeTrajectoryState& fts, 
00055                                               const Plane& plane) const
00056   {
00057     // should be implemented (in case underlying propagator has an independent
00058     // implementation)
00059     return propagateWithPath(fts,plane).first;
00060   }
00061 
00062   virtual std::pair<TrajectoryStateOnSurface,double> propagateWithPath (const TrajectoryStateOnSurface& tsos, 
00063                                                                         const Plane& plane) const;
00064 
00065   virtual std::pair<TrajectoryStateOnSurface,double> propagateWithPath (const FreeTrajectoryState& fts, 
00066                                                                         const Plane& plane) const;
00067 
00068   virtual TrajectoryStateOnSurface propagate (const TrajectoryStateOnSurface& tsos, 
00069                                               const Cylinder& cylinder) const
00070   {
00071     // should be implemented (in case underlying propagator has an independent
00072     // implementation)
00073     return propagateWithPath(tsos,cylinder).first;
00074   }
00075 
00076   virtual TrajectoryStateOnSurface propagate (const FreeTrajectoryState& fts, 
00077                                               const Cylinder& cylinder) const
00078   {
00079     // should be implemented (in case underlying propagator has an independent
00080     // implementation)
00081     return propagateWithPath(fts,cylinder).first;
00082   }
00083 
00084   virtual std::pair<TrajectoryStateOnSurface,double> propagateWithPath (const TrajectoryStateOnSurface& tsos, 
00085                                                                         const Cylinder& cylinder) const;
00086 
00087   virtual std::pair<TrajectoryStateOnSurface,double> propagateWithPath (const FreeTrajectoryState& fts, 
00088                                                                         const Cylinder& cylinder) const;
00089 
00091   virtual bool setMaxDirectionChange( float phiMax) { 
00092     return theGeometricalPropagator->setMaxDirectionChange(phiMax);
00093   }
00095   virtual void setPropagationDirection (PropagationDirection dir) const;
00096 
00097   enum MaterialLocation {atSource, atDestination, fromDirection};
00106   void setMaterialLocation (const MaterialLocation location) {
00107     theMaterialLocation = location;
00108   }
00110   const Propagator& geometricalPropagator() const {
00111     return *theGeometricalPropagator;
00112   }
00114   const MaterialEffectsUpdator& materialEffectsUpdator() const {
00115     return *theMEUpdator;
00116   }
00117 
00118   virtual const MagneticField* magneticField() const {return field;}
00119 
00120 
00121   virtual PropagatorWithMaterial* clone() const
00122     {
00123       return new PropagatorWithMaterial(*this);
00124     }
00125 
00126 private:
00128   bool materialAtSource() const dso_internal;
00129 
00130 private:
00131   // Geometrical propagator
00132 
00133   defaultRKPropagator::Product rkProduct;
00134   DeepCopyPointerByClone<Propagator> theGeometricalPropagator;
00135 
00136 
00137   // Material effects
00138   DeepCopyPointerByClone<MaterialEffectsUpdator> theMEUpdator;
00139   typedef std::pair<TrajectoryStateOnSurface,double> TsosWP;
00140   // Use material at source?
00141   MaterialLocation theMaterialLocation;
00142   const MagneticField * field;
00143   bool useRungeKutta_;
00144 };
00145 
00146 #endif
00147 
00148