CMS 3D CMS Logo

NavPropagator.h

Go to the documentation of this file.
00001 #ifndef NavPropagator_H_
00002 #define NavPropagator_H_
00003 
00004 #include "TrackingTools/GeomPropagators/interface/Propagator.h"
00005 #include "TrackingTools/TrajectoryState/interface/TrajectoryStateOnSurface.h"
00006 
00007 #include <map>
00008 
00009 class MagneticField; 
00010 class VolumeBasedMagneticField;
00011 class RKPropagatorInS;
00012 class NavVolume;
00013 class MagVolume;
00014 
00015 
00016 class NavPropagator : public Propagator {
00017 
00018 public:
00019 
00020   NavPropagator( const MagneticField* field,
00021                  PropagationDirection dir = alongMomentum);
00022 
00023   ~NavPropagator();
00024   //
00025   // use base class methods where necessary:
00026   // - propagation from TrajectoryStateOnSurface 
00027   //     (will use propagation from FreeTrajectoryState)
00028   // - propagation to general Surface
00029   //     (will use specialised methods for planes or cylinders)
00030   //
00031   using Propagator::propagate;
00032   using Propagator::propagateWithPath;
00033 
00035   TrajectoryStateOnSurface propagate(const TrajectoryStateOnSurface& ts, 
00036                                      const Plane& plane) const {
00037     return propagateWithPath(ts,plane).first;
00038   }
00040   std::pair<TrajectoryStateOnSurface,double> 
00041   propagateWithPath(const TrajectoryStateOnSurface& , 
00042                     const Plane& plane) const; 
00043   
00045   TrajectoryStateOnSurface propagate(const FreeTrajectoryState& ts, 
00046                                      const Plane& plane) const {
00047     return propagateWithPath(ts,plane).first;
00048   }
00050   std::pair<TrajectoryStateOnSurface,double> 
00051   propagateWithPath(const FreeTrajectoryState& , 
00052                     const Plane& plane) const; 
00053   
00055   TrajectoryStateOnSurface propagate(const FreeTrajectoryState& fts, 
00056                                      const Cylinder& cylinder) const {
00057     return propagateWithPath(fts,cylinder).first;
00058   }
00060   std::pair<TrajectoryStateOnSurface,double> 
00061   propagateWithPath(const FreeTrajectoryState& fts, 
00062                     const Cylinder& cylinder) const;
00063 
00064   virtual NavPropagator * clone() const {return new NavPropagator(*this);}
00065 
00066   virtual const MagneticField* magneticField() const;
00067 
00068 private:
00069 
00070   typedef std::pair<TrajectoryStateOnSurface,double> TsosWP;
00071   typedef RKPropagatorInS                            PropagatorType;
00072   typedef std::map<const MagVolume*, NavVolume*>     MagVolumeMap;
00073   typedef TrajectoryStateOnSurface                   TSOS;
00074 
00075 
00076   const VolumeBasedMagneticField*   theField;
00077   mutable MagVolumeMap              theNavVolumeMap;
00078   bool  isIronVolume[272];
00079 
00080 
00081   const NavVolume* findVolume( const TrajectoryStateOnSurface& inputState) const;
00082 
00083   const NavVolume* navVolume( const MagVolume* magVolume) const;
00084 
00085   bool destinationCrossed( const TSOS& startState,
00086                            const TSOS& endState, const Plane& plane) const;
00087 
00088   TrajectoryStateOnSurface noNextVolume( TrajectoryStateOnSurface startingState) const;
00089 
00090   std::pair<TrajectoryStateOnSurface,double> 
00091   propagateInVolume( const NavVolume* currentVolume, 
00092                      const TrajectoryStateOnSurface& startingState, 
00093                      const Plane& targetPlane) const;
00094 
00095 };
00096 
00097 #endif

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