File indexing completed on 2024-04-06 12:31:31
0001 #ifndef GsfPropagatorWithMaterial_h_
0002 #define GsfPropagatorWithMaterial_h_
0003
0004 #include "TrackingTools/GeomPropagators/interface/Propagator.h"
0005 #include "TrackingTools/GsfTools/interface/GsfPropagatorAdapter.h"
0006 #include "TrackingTools/GsfTracking/interface/GsfMaterialEffectsUpdator.h"
0007 #include "TrackingTools/GsfTracking/interface/FullConvolutionWithMaterial.h"
0008 #include "DataFormats/GeometryCommonDetAlgo/interface/DeepCopyPointerByClone.h"
0009
0010 class MagneticField;
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021
0022
0023 class GsfPropagatorWithMaterial : public Propagator {
0024 public:
0025
0026
0027
0028
0029 GsfPropagatorWithMaterial(const Propagator& Propagator, const GsfMaterialEffectsUpdator& MEUpdator);
0030
0031
0032 GsfPropagatorWithMaterial(const GsfPropagatorAdapter& Propagator, const FullConvolutionWithMaterial& Convolutor);
0033
0034 ~GsfPropagatorWithMaterial() override {}
0035
0036 using Propagator::propagate;
0037 using Propagator::propagateWithPath;
0038
0039
0040
0041 std::pair<TrajectoryStateOnSurface, double> propagateWithPath(const TrajectoryStateOnSurface&,
0042 const Plane&) const override;
0043
0044
0045
0046 std::pair<TrajectoryStateOnSurface, double> propagateWithPath(const TrajectoryStateOnSurface&,
0047 const Cylinder&) const override;
0048
0049
0050
0051
0052 std::pair<TrajectoryStateOnSurface, double> propagateWithPath(const FreeTrajectoryState&,
0053 const Plane&) const override;
0054
0055
0056
0057 std::pair<TrajectoryStateOnSurface, double> propagateWithPath(const FreeTrajectoryState&,
0058 const Cylinder&) const override;
0059
0060 bool setMaxDirectionChange(float phiMax) override { return theGeometricalPropagator->setMaxDirectionChange(phiMax); }
0061
0062 void setPropagationDirection(PropagationDirection dir) override;
0063
0064 enum MaterialLocation { atSource, atDestination, fromDirection };
0065
0066
0067
0068
0069
0070
0071
0072
0073 void setMaterialLocation(const MaterialLocation location) { theMaterialLocation = location; }
0074
0075 const Propagator& geometricalPropagator() const { return *theGeometricalPropagator; }
0076
0077 const FullConvolutionWithMaterial& convolutionWithMaterial() const { return *theConvolutor; }
0078
0079 GsfPropagatorWithMaterial* clone() const override {
0080 return new GsfPropagatorWithMaterial(*theGeometricalPropagator, *theConvolutor);
0081 }
0082
0083 const MagneticField* magneticField() const override { return theGeometricalPropagator->magneticField(); }
0084
0085 private:
0086
0087
0088
0089 std::pair<TrajectoryStateOnSurface, double> convoluteWithMaterial(
0090 const std::pair<TrajectoryStateOnSurface, double>&) const;
0091
0092 TrajectoryStateOnSurface convoluteStateWithMaterial(const TrajectoryStateOnSurface, const PropagationDirection) const;
0093
0094 bool materialAtSource() const;
0095
0096 private:
0097
0098 DeepCopyPointerByClone<GsfPropagatorAdapter> theGeometricalPropagator;
0099
0100 DeepCopyPointerByClone<FullConvolutionWithMaterial> theConvolutor;
0101
0102 MaterialLocation theMaterialLocation;
0103
0104 typedef std::pair<TrajectoryStateOnSurface, double> TsosWP;
0105 typedef std::vector<TrajectoryStateOnSurface> MultiTSOS;
0106
0107
0108
0109 };
0110
0111 #endif