10 PropagatorWithMaterial::~PropagatorWithMaterial(){}
18 float ptMin,
bool useOldAnalPropLogic) :
21 theGeometricalPropagator(useRungeKutta ?
22 rkProduct.propagator.
clone() :
26 theMaterialLocation(atDestination), field(mf),useRungeKutta_(useRungeKutta) {
31 pair<TrajectoryStateOnSurface,double>
33 const Plane& plane)
const {
35 if ( (newTsosWP.first).isValid() && !materialAtSource() ) {
36 bool updateOk = theMEUpdator->updateStateInPlace(newTsosWP.first,
38 propagationDirection()));
44 pair<TrajectoryStateOnSurface,
double>
47 TsosWP newTsosWP = theGeometricalPropagator->propagateWithPath(fts,cylinder);
48 if ( (newTsosWP.first).isValid() && !materialAtSource() ) {
49 bool updateOk = theMEUpdator->updateStateInPlace(newTsosWP.first,
51 propagationDirection()));
52 if unlikely(!updateOk) newTsosWP.
first = TrajectoryStateOnSurface();
58 pair<TrajectoryStateOnSurface,
double>
64 TsosWP newTsosWP(tsos,0.);
65 if ( materialAtSource() ) {
66 bool updateOk = theMEUpdator->updateStateInPlace(newTsosWP.first,propagationDirection());
67 if unlikely(!updateOk) newTsosWP.
first = TrajectoryStateOnSurface();
73 newTsosWP = theGeometricalPropagator->propagateWithPath(newTsosWP.
first,plane);
74 if unlikely( !newTsosWP.first.isValid() || materialAtSource() )
return newTsosWP;
78 bool updateOk = theMEUpdator->updateStateInPlace(newTsosWP.first,
80 propagationDirection()));
81 if unlikely(!updateOk) newTsosWP.first = TrajectoryStateOnSurface();
85 pair<TrajectoryStateOnSurface,
double>
91 TsosWP newTsosWP(tsos,0.);
92 if ( materialAtSource() ) {
93 bool updateOk = theMEUpdator->updateStateInPlace(newTsosWP.first,propagationDirection());
94 if unlikely(!updateOk) newTsosWP.first = TrajectoryStateOnSurface();
100 newTsosWP = theGeometricalPropagator->propagateWithPath(newTsosWP.first,cylinder);
101 if unlikely( !(newTsosWP.first).isValid() || materialAtSource() )
return newTsosWP;
105 bool updateOk = theMEUpdator->updateStateInPlace(newTsosWP.first,
107 propagationDirection()));
108 if unlikely(!updateOk) newTsosWP.first = TrajectoryStateOnSurface();
113 theGeometricalPropagator->setPropagationDirection(dir);
118 PropagatorWithMaterial::materialAtSource()
const {
123 return theMaterialLocation==atSource || (theMaterialLocation==fromDirection&&
virtual void setPropagationDirection(PropagationDirection dir)
U second(std::pair< T, U > const &p)
virtual std::pair< TrajectoryStateOnSurface, double > propagateWithPath(const FreeTrajectoryState &, const Surface &) const final
TEveGeoShape * clone(const TEveElement *element, TEveElement *parent)
return(e1-e2)*(e1-e2)+dp *dp
static std::string const source
tuple AnalyticalPropagator