Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 14:31:54

0001 #ifndef RKPropagatorInS_H
0002 #define RKPropagatorInS_H
0003 
0004 #include "TrackingTools/GeomPropagators/interface/Propagator.h"
0005 #include "TrackingTools/TrajectoryState/interface/TrajectoryStateOnSurface.h"
0006 #include "DataFormats/GeometryVector/interface/Basic3DVector.h"
0007 #include "DataFormats/GeometryVector/interface/GlobalPoint.h"
0008 #include "DataFormats/GeometryVector/interface/GlobalVector.h"
0009 #include "DataFormats/TrajectoryState/interface/TrackCharge.h"
0010 #include "MagneticField/VolumeGeometry/interface/MagVolume.h"
0011 #include "FWCore/Utilities/interface/Visibility.h"
0012 
0013 class GlobalTrajectoryParameters;
0014 class GlobalParametersWithPath;
0015 class MagVolume;
0016 class RKLocalFieldProvider;
0017 class CartesianStateAdaptor;
0018 
0019 class RKPropagatorInS final : public Propagator {
0020 public:
0021   // RKPropagatorInS( PropagationDirection dir = alongMomentum) : Propagator(dir), theVolume(0) {}
0022   // tolerance (see below) used to be 1.e-5 --> this was observed to cause problems with convergence
0023   // when propagating to cylinder with large radius (~10 meter) MM 22/6/07
0024 
0025   explicit RKPropagatorInS(const MagVolume& vol, PropagationDirection dir = alongMomentum, double tolerance = 5.e-5)
0026       : Propagator(dir), theVolume(&vol), theTolerance(tolerance) {}
0027 
0028   ~RKPropagatorInS() override {}
0029 
0030   using Propagator::propagate;
0031   using Propagator::propagateWithPath;
0032 
0033 private:
0034   std::pair<TrajectoryStateOnSurface, double> propagateWithPath(const FreeTrajectoryState&,
0035                                                                 const Plane&) const override;
0036 
0037   std::pair<TrajectoryStateOnSurface, double> propagateWithPath(const FreeTrajectoryState&,
0038                                                                 const Cylinder&) const override;
0039 
0040 public:
0041   Propagator* clone() const override;
0042 
0043   const MagneticField* magneticField() const override { return theVolume; }
0044 
0045 private:
0046   typedef std::pair<TrajectoryStateOnSurface, double> TsosWP;
0047 
0048   const MagVolume* theVolume;
0049   double theTolerance;
0050 
0051   GlobalTrajectoryParameters gtpFromLocal(const Basic3DVector<float>& lpos,
0052                                           const Basic3DVector<float>& lmom,
0053                                           TrackCharge ch,
0054                                           const Surface& surf) const dso_internal;
0055 
0056   GlobalTrajectoryParameters gtpFromVolumeLocal(const CartesianStateAdaptor& state,
0057                                                 TrackCharge charge) const dso_internal;
0058 
0059   RKLocalFieldProvider fieldProvider() const;
0060   RKLocalFieldProvider fieldProvider(const Cylinder& cyl) const dso_internal;
0061 
0062   PropagationDirection invertDirection(PropagationDirection dir) const dso_internal;
0063 
0064   Basic3DVector<double> rkPosition(const GlobalPoint& pos) const dso_internal;
0065   Basic3DVector<double> rkMomentum(const GlobalVector& mom) const dso_internal;
0066   GlobalPoint globalPosition(const Basic3DVector<float>& pos) const dso_internal;
0067   GlobalVector globalMomentum(const Basic3DVector<float>& mom) const dso_internal;
0068 
0069   GlobalParametersWithPath propagateParametersOnPlane(const FreeTrajectoryState& ts,
0070                                                       const Plane& plane) const dso_internal;
0071   GlobalParametersWithPath propagateParametersOnCylinder(const FreeTrajectoryState& ts,
0072                                                          const Cylinder& cyl) const dso_internal;
0073 };
0074 
0075 #endif