Back to home page

Project CMSSW displayed by LXR

 
 

    


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

0001 #ifndef GeomPropagators_BeamHaloPropagator_H
0002 #define GeomPropagators_BeamHaloPropagator_H
0003 
0004 /** \class BeamHaloPropagator
0005  *
0006  * A propagator which use different algorithm to propagate
0007  * within an endcap or to cross over to the other endcap
0008  *
0009  * \author  Jean-Roch VLIMANT UCSB
0010 
0011  *
0012  */
0013 
0014 /* Collaborating Class Declarations */
0015 #include "TrackingTools/TrajectoryState/interface/FreeTrajectoryState.h"
0016 #include "TrackingTools/TrajectoryState/interface/TrajectoryStateOnSurface.h"
0017 #include "TrackingTools/GeomPropagators/interface/Propagator.h"
0018 #include "MagneticField/Engine/interface/MagneticField.h"
0019 #include "DataFormats/GeometrySurface/interface/ReferenceCounted.h"
0020 #include "DataFormats/TrajectorySeed/interface/PropagationDirection.h"
0021 
0022 /* Class BeamHaloPropagator Interface */
0023 
0024 class BeamHaloPropagator final : public Propagator {
0025 public:
0026   /* Constructor */
0027   ///Defines which propagator is used inside endcap and in barrel
0028   BeamHaloPropagator(const Propagator* aEndCapTkProp,
0029                      const Propagator* aCrossTkProp,
0030                      const MagneticField* field,
0031                      PropagationDirection dir = alongMomentum);
0032 
0033   ///Defines which propagator is used inside endcap and in barrel
0034   BeamHaloPropagator(const Propagator& aEndCapTkProp,
0035                      const Propagator& aCrossTkProp,
0036                      const MagneticField* field,
0037                      PropagationDirection dir = alongMomentum);
0038 
0039   ///Copy constructor
0040   BeamHaloPropagator(const BeamHaloPropagator&);
0041 
0042   /** virtual destructor */
0043   ~BeamHaloPropagator() override;
0044 
0045   ///Virtual constructor (using copy c'tor)
0046   BeamHaloPropagator* clone() const override {
0047     return new BeamHaloPropagator(
0048         getEndCapTkPropagator(), getCrossTkPropagator(), magneticField(), propagationDirection());
0049   }
0050 
0051   void setPropagationDirection(PropagationDirection dir) override {
0052     Propagator::setPropagationDirection(dir);
0053     theEndCapTkProp->setPropagationDirection(dir);
0054     theCrossTkProp->setPropagationDirection(dir);
0055   }
0056 
0057   using Propagator::propagate;
0058   using Propagator::propagateWithPath;
0059 
0060 private:
0061   std::pair<TrajectoryStateOnSurface, double> propagateWithPath(const FreeTrajectoryState& fts,
0062                                                                 const Plane& plane) const override;
0063 
0064   std::pair<TrajectoryStateOnSurface, double> propagateWithPath(const FreeTrajectoryState& fts,
0065                                                                 const Cylinder& cylinder) const override;
0066 
0067   ///true if the plane and the fts z position have different sign
0068   bool crossingTk(const FreeTrajectoryState& fts, const Plane& plane) const;
0069 
0070   ///return the propagator used in endcaps
0071   const Propagator* getEndCapTkPropagator() const;
0072   ///return the propagator used to cross the tracker
0073   const Propagator* getCrossTkPropagator() const;
0074   ///return the magneticField
0075   const MagneticField* magneticField() const override { return theField; }
0076 
0077 private:
0078   void directionCheck(PropagationDirection dir);
0079 
0080   Propagator* theEndCapTkProp;
0081   Propagator* theCrossTkProp;
0082   const MagneticField* theField;
0083 
0084 protected:
0085 };
0086 
0087 #endif