Go to the documentation of this file.00001 #ifndef RKPropagatorInS_H
00002 #define RKPropagatorInS_H
00003
00004 #include "TrackingTools/GeomPropagators/interface/Propagator.h"
00005 #include "TrackingTools/TrajectoryState/interface/TrajectoryStateOnSurface.h"
00006 #include "DataFormats/GeometryVector/interface/Basic3DVector.h"
00007 #include "DataFormats/GeometryVector/interface/GlobalPoint.h"
00008 #include "DataFormats/GeometryVector/interface/GlobalVector.h"
00009 #include "DataFormats/TrajectoryState/interface/TrackCharge.h"
00010 #include "MagneticField/VolumeGeometry/interface/MagVolume.h"
00011
00012
00013 class GlobalTrajectoryParameters;
00014 class GlobalParametersWithPath;
00015 class MagVolume;
00016 class RKLocalFieldProvider;
00017 class CartesianStateAdaptor;
00018
00019 class RKPropagatorInS : public Propagator {
00020 public:
00021
00022
00023
00024
00025
00026 explicit RKPropagatorInS( const MagVolume& vol, PropagationDirection dir = alongMomentum,
00027 double tolerance = 5.e-5) :
00028 Propagator(dir), theVolume( &vol), theTolerance( tolerance) {}
00029
00030 ~RKPropagatorInS() {}
00031
00032 using Propagator::propagate;
00033 using Propagator::propagateWithPath;
00034
00035 virtual TrajectoryStateOnSurface
00036 propagate (const FreeTrajectoryState&, const Plane&) const;
00037
00038 virtual TrajectoryStateOnSurface
00039 propagate (const FreeTrajectoryState&, const Cylinder&) const;
00040
00041 virtual std::pair< TrajectoryStateOnSurface, double>
00042 propagateWithPath (const FreeTrajectoryState&, const Plane&) const;
00043
00044 virtual std::pair< TrajectoryStateOnSurface, double>
00045 propagateWithPath (const FreeTrajectoryState&, const Cylinder&) const;
00046
00047 TrajectoryStateOnSurface propagate(const TrajectoryStateOnSurface& ts,
00048 const Plane& plane) const {
00049 return propagateWithPath( *ts.freeState(),plane).first;
00050 }
00051
00052
00053
00054 virtual Propagator * clone() const;
00055
00056 virtual const MagneticField* magneticField() const {return theVolume;}
00057
00058 private:
00059
00060 typedef std::pair<TrajectoryStateOnSurface,double> TsosWP;
00061
00062 const MagVolume* theVolume;
00063 double theTolerance;
00064
00065 GlobalTrajectoryParameters gtpFromLocal( const Basic3DVector<double>& lpos,
00066 const Basic3DVector<double>& lmom,
00067 TrackCharge ch, const Surface& surf) const;
00068 GlobalTrajectoryParameters gtpFromVolumeLocal( const CartesianStateAdaptor& state,
00069 TrackCharge charge) const;
00070
00071 RKLocalFieldProvider fieldProvider() const;
00072 RKLocalFieldProvider fieldProvider( const Cylinder& cyl) const;
00073
00074 PropagationDirection invertDirection( PropagationDirection dir) const;
00075
00076 Basic3DVector<double> rkPosition( const GlobalPoint& pos) const;
00077 Basic3DVector<double> rkMomentum( const GlobalVector& mom) const;
00078 GlobalPoint globalPosition( const Basic3DVector<double>& pos) const;
00079 GlobalVector globalMomentum( const Basic3DVector<double>& mom) const;
00080
00081 GlobalParametersWithPath propagateParametersOnPlane( const FreeTrajectoryState& ts,
00082 const Plane& plane) const;
00083 GlobalParametersWithPath propagateParametersOnCylinder( const FreeTrajectoryState& ts,
00084 const Cylinder& cyl) const;
00085
00086 };
00087
00088 #endif