#include <MaterialEffectsUpdator.h>
Public Types | |
typedef materialEffect::Covariance | Covariance |
typedef materialEffect::CovIndex | CovIndex |
typedef materialEffect::Effect | Effect |
Public Member Functions | |
virtual MaterialEffectsUpdator * | clone () const =0 |
virtual void | compute (const TrajectoryStateOnSurface &, const PropagationDirection, Effect &effect) const =0 |
double | mass () const |
MaterialEffectsUpdator (double mass) | |
virtual TrajectoryStateOnSurface | updateState (const TrajectoryStateOnSurface &TSoS, const PropagationDirection propDir) const |
virtual bool | updateStateInPlace (TrajectoryStateOnSurface &TSoS, const PropagationDirection propDir) const |
virtual | ~MaterialEffectsUpdator () |
Private Attributes | |
double | theMass |
Interface for adding material effects during propagation. Updates to TrajectoryStateOnSurface are implemented in this class. Ported from ORCA.
Moved "state" into an independent struct "Effect"
Definition at line 56 of file MaterialEffectsUpdator.h.
Definition at line 58 of file MaterialEffectsUpdator.h.
Definition at line 60 of file MaterialEffectsUpdator.h.
Definition at line 59 of file MaterialEffectsUpdator.h.
MaterialEffectsUpdator::MaterialEffectsUpdator | ( | double | mass | ) |
Constructor with explicit mass hypothesis
Definition at line 9 of file MaterialEffectsUpdator.cc.
MaterialEffectsUpdator::~MaterialEffectsUpdator | ( | ) | [virtual] |
Definition at line 12 of file MaterialEffectsUpdator.cc.
{}
virtual MaterialEffectsUpdator* MaterialEffectsUpdator::clone | ( | ) | const [pure virtual] |
Implemented in GCC11_FINAL< T >, GCC11_FINAL< T >, GCC11_FINAL< T >, GCC11_FINAL< T >, GCC11_FINAL< T >, GCC11_FINAL< T >, GCC11_FINAL< T >, GCC11_FINAL< T >, GCC11_FINAL< T >, GCC11_FINAL< T >, GCC11_FINAL< T >, GCC11_FINAL< T >, GCC11_FINAL< T >, GCC11_FINAL< T >, GCC11_FINAL< T >, GCC11_FINAL< T >, GCC11_FINAL< T >, GCC11_FINAL< T >, GCC11_FINAL< T >, GCC11_FINAL< T >, GCC11_FINAL< T >, GCC11_FINAL< T >, GCC11_FINAL< T >, GCC11_FINAL< T >, GCC11_FINAL< T >, GCC11_FINAL< T >, GCC11_FINAL< T >, GCC11_FINAL< T >, GCC11_FINAL< T >, GCC11_FINAL< T >, GCC11_FINAL< T >, GCC11_FINAL< T >, GCC11_FINAL< T >, GCC11_FINAL< T >, GCC11_FINAL< T >, GCC11_FINAL< T >, GCC11_FINAL< T >, GCC11_FINAL< T >, GCC11_FINAL< T >, GCC11_FINAL< T >, GCC11_FINAL< T >, GCC11_FINAL< T >, GCC11_FINAL< T >, GCC11_FINAL< T >, GCC11_FINAL< T >, GCC11_FINAL< T >, GCC11_FINAL< T >, GCC11_FINAL< T >, GCC11_FINAL< T >, GCC11_FINAL< T >, GCC11_FINAL< T >, GCC11_FINAL< T >, GCC11_FINAL< T >, and GCC11_FINAL< T >.
virtual void MaterialEffectsUpdator::compute | ( | const TrajectoryStateOnSurface & | , |
const PropagationDirection | , | ||
Effect & | effect | ||
) | const [pure virtual] |
Implemented in GCC11_FINAL< T >, GCC11_FINAL< T >, and GCC11_FINAL< T >.
Referenced by updateStateInPlace().
double MaterialEffectsUpdator::mass | ( | ) | const [inline] |
Particle mass assigned at construction.
Definition at line 86 of file MaterialEffectsUpdator.h.
References theMass.
{ return theMass; }
TrajectoryStateOnSurface MaterialEffectsUpdator::updateState | ( | const TrajectoryStateOnSurface & | TSoS, |
const PropagationDirection | propDir | ||
) | const [virtual] |
Updates TrajectoryStateOnSurface with material effects (momentum and covariance matrix are potentially affected.
Definition at line 17 of file MaterialEffectsUpdator.cc.
References updateStateInPlace().
{ TrajectoryStateOnSurface shallowCopy = TSoS; // A TSOS is a proxy. Its contents will be really copied only if/when the updateStateInPlace attempts to change them return updateStateInPlace(shallowCopy, propDir) ? shallowCopy : TrajectoryStateOnSurface(); }
bool MaterialEffectsUpdator::updateStateInPlace | ( | TrajectoryStateOnSurface & | TSoS, |
const PropagationDirection | propDir | ||
) | const [virtual] |
Updates in place TrajectoryStateOnSurface with material effects (momentum and covariance matrix are potentially affected) Will return 'false' if the 'updateState' would have returned an invalid TSOS Note that the TSoS might be very well unchanged from this method (just like 'updateState' can return the same TSOS)
Definition at line 30 of file MaterialEffectsUpdator.cc.
References materialEffect::Covariance::add(), SurfaceSideDefinition::afterSurface, alongMomentum, anyDirection, SurfaceSideDefinition::atCenterOfSurface, SurfaceSideDefinition::beforeSurface, compute(), materialEffect::Effect::deltaCov, materialEffect::Effect::deltaP, TrajectoryStateOnSurface::globalParameters(), TrajectoryStateOnSurface::hasError(), TrajectoryStateOnSurface::localError(), TrajectoryStateOnSurface::localParameters(), GlobalTrajectoryParameters::magneticField(), LocalTrajectoryError::matrix(), Surface::mediumProperties(), oppositeToMomentum, TrajectoryStateOnSurface::surface(), TrajectoryStateOnSurface::surfaceSide(), TrajectoryStateOnSurface::update(), and LocalTrajectoryParameters::updateP().
Referenced by updateState().
{ // // Check if // - material is associated to surface // - propagation direction is not anyDirection // - side of surface is not atCenterOfSurface (could be handled with 50% material?) // const Surface& surface = TSoS.surface(); if ( !surface.mediumProperties() || propDir==anyDirection || TSoS.surfaceSide()==atCenterOfSurface ) return true; // // Check, if already on right side of surface // if ( (propDir==alongMomentum && TSoS.surfaceSide()==afterSurface ) || (propDir==oppositeToMomentum && TSoS.surfaceSide()==beforeSurface ) ) return true; // // Update momentum. In case of failure: return invalid state // LocalTrajectoryParameters lp = TSoS.localParameters(); Effect effect; compute (TSoS,propDir,effect); if ( !lp.updateP(effect.deltaP) ) return false; // // Update covariance matrix? // SurfaceSide side = propDir==alongMomentum ? afterSurface : beforeSurface; if ( TSoS.hasError() ) { AlgebraicSymMatrix55 eloc = TSoS.localError().matrix(); effect.deltaCov.add(eloc); //TSoS = TrajectoryStateOnSurface(lp,LocalTrajectoryError(eloc),surface, &(TSoS.globalParameters().magneticField()),side); TSoS.update(lp,LocalTrajectoryError(eloc),surface, &(TSoS.globalParameters().magneticField()),side); } else { TSoS.update(lp,surface,&(TSoS.globalParameters().magneticField()),side); //TSoS = TrajectoryStateOnSurface(lp,surface,&(TSoS.globalParameters().magneticField()),side); } return true; }
double MaterialEffectsUpdator::theMass [private] |
Definition at line 96 of file MaterialEffectsUpdator.h.
Referenced by mass().