File indexing completed on 2024-04-06 12:31:29
0001 #include "TrackingTools/GeomPropagators/interface/Propagator.h"
0002 #include "TrackingTools/TrajectoryState/interface/FreeTrajectoryState.h"
0003 #include "TrackingTools/TrajectoryState/interface/TrajectoryStateOnSurface.h"
0004 #include "TrackingTools/GeomPropagators/interface/PropagationExceptions.h"
0005 #include "DataFormats/GeometrySurface/interface/Cylinder.h"
0006 #include "DataFormats/GeometrySurface/interface/Plane.h"
0007
0008 Propagator::~Propagator() {}
0009
0010 std::pair<TrajectoryStateOnSurface, double> Propagator::propagateWithPath(const FreeTrajectoryState& state,
0011 const Surface& sur) const {
0012
0013 const Plane* bp = dynamic_cast<const Plane*>(&sur);
0014 if (bp != nullptr)
0015 return propagateWithPath(state, *bp);
0016
0017
0018 const Cylinder* bc = dynamic_cast<const Cylinder*>(&sur);
0019 if (bc != nullptr)
0020 return propagateWithPath(state, *bc);
0021
0022
0023 throw PropagationException("The surface is neither Cylinder nor Plane");
0024 }
0025
0026 std::pair<TrajectoryStateOnSurface, double> Propagator::propagateWithPath(const TrajectoryStateOnSurface& state,
0027 const Surface& sur) const {
0028
0029 const Plane* bp = dynamic_cast<const Plane*>(&sur);
0030 if (bp != nullptr)
0031 return propagateWithPath(state, *bp);
0032
0033
0034 const Cylinder* bc = dynamic_cast<const Cylinder*>(&sur);
0035 if (bc != nullptr)
0036 return propagateWithPath(state, *bc);
0037
0038
0039 throw PropagationException("The surface is neither Cylinder nor Plane");
0040 }
0041
0042 std::pair<FreeTrajectoryState, double> Propagator::propagateWithPath(const FreeTrajectoryState&,
0043 const GlobalPoint&) const {
0044 throw cms::Exception("Propagator::propagate(FTS,GlobalPoint) not implemented");
0045 return std::pair<FreeTrajectoryState, double>();
0046 }
0047 std::pair<FreeTrajectoryState, double> Propagator::propagateWithPath(const FreeTrajectoryState&,
0048 const GlobalPoint&,
0049 const GlobalPoint&) const {
0050 throw cms::Exception("Propagator::propagate(FTS,GlobalPoint,GlobalPoint) not implemented");
0051 return std::pair<FreeTrajectoryState, double>();
0052 }
0053 std::pair<FreeTrajectoryState, double> Propagator::propagateWithPath(const FreeTrajectoryState& ftsStart,
0054 const reco::BeamSpot& beamSpot) const {
0055 throw cms::Exception("Propagator::propagate(FTS,beamSpot) not implemented");
0056 return std::pair<FreeTrajectoryState, double>();
0057 }