Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:31:29

0001 #ifndef GsfPropagatorAdapter_h_
0002 #define GsfPropagatorAdapter_h_
0003 
0004 #include "TrackingTools/TrajectoryState/interface/TrajectoryStateOnSurface.h"
0005 #include "TrackingTools/GeomPropagators/interface/Propagator.h"
0006 #include "DataFormats/GeometryCommonDetAlgo/interface/DeepCopyPointerByClone.h"
0007 
0008 class MagneticField;
0009 
0010 /** \class GsfPropagatorAdapter
0011  * Propagation of multiple trajectory state by propagation of
0012  * components, using an specified single-state propagator.
0013  */
0014 class GsfPropagatorAdapter final : public Propagator {
0015 public:
0016   /// Constructor with explicit propagator
0017   GsfPropagatorAdapter(const Propagator& Propagator);
0018 
0019   ~GsfPropagatorAdapter() override {}
0020 
0021   using Propagator::propagate;
0022   using Propagator::propagateWithPath;
0023 
0024   std::pair<TrajectoryStateOnSurface, double> propagateWithPath(const TrajectoryStateOnSurface&,
0025                                                                 const Plane&) const override;
0026 
0027   /** Propagation to cylinder with path length calculation.
0028    */
0029   std::pair<TrajectoryStateOnSurface, double> propagateWithPath(const TrajectoryStateOnSurface&,
0030                                                                 const Cylinder&) const override;
0031 
0032   /** Propagation to plane with path length calculation.
0033    *  Use from FTS implies single state (better use PropagatorWithMaterial)!
0034    */
0035   std::pair<TrajectoryStateOnSurface, double> propagateWithPath(const FreeTrajectoryState&,
0036                                                                 const Plane&) const override;
0037 
0038   /** Propagation to cylinder with path length calculation.
0039    *  Use from FTS implies single state (better use PropagatorWithMaterial)!
0040    */
0041   std::pair<TrajectoryStateOnSurface, double> propagateWithPath(const FreeTrajectoryState&,
0042                                                                 const Cylinder&) const override;
0043 
0044 public:
0045   bool setMaxDirectionChange(float phiMax) override { return thePropagator->setMaxDirectionChange(phiMax); }
0046 
0047   void setPropagationDirection(PropagationDirection dir) override;
0048 
0049   /// access to single state propagator
0050   inline const Propagator& propagator() const { return *thePropagator; }
0051 
0052   GsfPropagatorAdapter* clone() const override { return new GsfPropagatorAdapter(*thePropagator); }
0053 
0054   const MagneticField* magneticField() const override { return thePropagator->magneticField(); }
0055 
0056 private:
0057   // Single state propagator
0058   DeepCopyPointerByClone<Propagator> thePropagator;
0059 };
0060 
0061 #endif