File indexing completed on 2024-04-06 12:31:33
0001 #ifndef _COMMONRECO_PROPAGATORWITHMATERIAL_H_
0002 #define _COMMONRECO_PROPAGATORWITHMATERIAL_H_
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018 #include "DataFormats/GeometryCommonDetAlgo/interface/DeepCopyPointerByClone.h"
0019 #include "TrackPropagation/RungeKutta/interface/defaultRKPropagator.h"
0020
0021 #include "TrackingTools/GeomPropagators/interface/Propagator.h"
0022 #include "TrackingTools/MaterialEffects/interface/MaterialEffectsUpdator.h"
0023
0024 class MagneticField;
0025 class PropagatorWithMaterial final : public Propagator {
0026 public:
0027
0028
0029
0030
0031
0032
0033
0034
0035
0036
0037 PropagatorWithMaterial(PropagationDirection dir,
0038 const float mass,
0039 const MagneticField* mf = nullptr,
0040 const float maxDPhi = 1.6,
0041 bool useRungeKutta = false,
0042 float ptMin = -1.,
0043 bool useOldGeoPropLogic = true);
0044
0045 ~PropagatorWithMaterial() override;
0046
0047 using Propagator::propagate;
0048 using Propagator::propagateWithPath;
0049
0050 private:
0051 std::pair<TrajectoryStateOnSurface, double> propagateWithPath(const TrajectoryStateOnSurface& tsos,
0052 const Plane& plane) const override;
0053
0054 std::pair<TrajectoryStateOnSurface, double> propagateWithPath(const FreeTrajectoryState& fts,
0055 const Plane& plane) const override;
0056
0057 std::pair<TrajectoryStateOnSurface, double> propagateWithPath(const TrajectoryStateOnSurface& tsos,
0058 const Cylinder& cylinder) const override;
0059
0060 std::pair<TrajectoryStateOnSurface, double> propagateWithPath(const FreeTrajectoryState& fts,
0061 const Cylinder& cylinder) const override;
0062
0063 public:
0064
0065 bool setMaxDirectionChange(float phiMax) override { return theGeometricalPropagator->setMaxDirectionChange(phiMax); }
0066
0067 void setPropagationDirection(PropagationDirection dir) override;
0068
0069 enum MaterialLocation { atSource, atDestination, fromDirection };
0070
0071
0072
0073
0074
0075
0076
0077
0078 void setMaterialLocation(const MaterialLocation location) { theMaterialLocation = location; }
0079
0080 const Propagator& geometricalPropagator() const { return *theGeometricalPropagator; }
0081
0082 const MaterialEffectsUpdator& materialEffectsUpdator() const { return *theMEUpdator; }
0083
0084 const MagneticField* magneticField() const override { return field; }
0085
0086 PropagatorWithMaterial* clone() const override { return new PropagatorWithMaterial(*this); }
0087
0088 private:
0089
0090 bool materialAtSource() const dso_internal;
0091
0092 private:
0093
0094
0095 defaultRKPropagator::Product rkProduct;
0096 DeepCopyPointerByClone<Propagator> theGeometricalPropagator;
0097
0098
0099 DeepCopyPointerByClone<MaterialEffectsUpdator> theMEUpdator;
0100 typedef std::pair<TrajectoryStateOnSurface, double> TsosWP;
0101
0102 MaterialLocation theMaterialLocation;
0103 const MagneticField* field;
0104 bool useRungeKutta_;
0105 };
0106
0107 #endif