#include <GsfMaterialEffectsUpdator.h>
Public Member Functions | |
virtual GsfMaterialEffectsUpdator * | clone () const =0 |
virtual std::vector < AlgebraicSymMatrix55 > | deltaLocalErrors (const TrajectoryStateOnSurface &TSoS, const PropagationDirection propDir) const |
virtual std::vector< double > | deltaPs (const TrajectoryStateOnSurface &TSoS, const PropagationDirection propDir) const |
GsfMaterialEffectsUpdator (float mass) | |
float | mass () const |
virtual TrajectoryStateOnSurface | updateState (const TrajectoryStateOnSurface &TSoS, const PropagationDirection propDir) const |
virtual std::vector< double > | weights (const TrajectoryStateOnSurface &TSoS, const PropagationDirection propDir) const |
virtual | ~GsfMaterialEffectsUpdator () |
Protected Member Functions | |
virtual bool | newArguments (const TrajectoryStateOnSurface &, const PropagationDirection) const |
virtual void | storeArguments (const TrajectoryStateOnSurface &, const PropagationDirection) const |
Protected Attributes | |
std::vector< AlgebraicSymMatrix55 > | theDeltaCovs |
std::vector< double > | theDeltaPs |
std::vector< double > | theWeights |
Private Member Functions | |
virtual void | compute (const TrajectoryStateOnSurface &, const PropagationDirection) const =0 |
Private Attributes | |
float | theMass |
Interface for adding material effects during propagation as a Gaussian mixture. Similar to MaterialEffectsUpdator, but returns MultiTrajectoryState.
Definition at line 15 of file GsfMaterialEffectsUpdator.h.
GsfMaterialEffectsUpdator::GsfMaterialEffectsUpdator | ( | float | mass | ) | [inline] |
Constructor with explicit mass hypothesis
Definition at line 20 of file GsfMaterialEffectsUpdator.h.
virtual GsfMaterialEffectsUpdator::~GsfMaterialEffectsUpdator | ( | ) | [inline, virtual] |
Definition at line 23 of file GsfMaterialEffectsUpdator.h.
{}
virtual GsfMaterialEffectsUpdator* GsfMaterialEffectsUpdator::clone | ( | ) | const [pure virtual] |
virtual void GsfMaterialEffectsUpdator::compute | ( | const TrajectoryStateOnSurface & | , |
const PropagationDirection | |||
) | const [private, pure virtual] |
Implemented in GsfBetheHeitlerUpdator, GsfCombinedMaterialEffectsUpdator, GsfMaterialEffectsAdapter, and GsfMultipleScatteringUpdator.
Referenced by deltaLocalErrors(), deltaPs(), and weights().
virtual std::vector<AlgebraicSymMatrix55> GsfMaterialEffectsUpdator::deltaLocalErrors | ( | const TrajectoryStateOnSurface & | TSoS, |
const PropagationDirection | propDir | ||
) | const [inline, virtual] |
Contribution to covariance matrix (in local co-ordinates) from material effects.
Definition at line 52 of file GsfMaterialEffectsUpdator.h.
References compute(), Surface::mediumProperties(), newArguments(), TrajectoryStateOnSurface::surface(), and theDeltaCovs.
{ // check for material if ( !TSoS.surface().mediumProperties() ) return std::vector<AlgebraicSymMatrix55>(); // check for change (avoid using compute method if possible) if ( newArguments(TSoS,propDir) ) compute(TSoS,propDir); return theDeltaCovs; }
virtual std::vector<double> GsfMaterialEffectsUpdator::deltaPs | ( | const TrajectoryStateOnSurface & | TSoS, |
const PropagationDirection | propDir | ||
) | const [inline, virtual] |
Change in |p| from material effects.
Definition at line 42 of file GsfMaterialEffectsUpdator.h.
References compute(), Surface::mediumProperties(), newArguments(), TrajectoryStateOnSurface::surface(), and theDeltaPs.
{ // check for material if ( !TSoS.surface().mediumProperties() ) return std::vector<double>(); // check for change (avoid using compute method if possible) if ( newArguments(TSoS,propDir) ) compute(TSoS,propDir); return theDeltaPs; }
float GsfMaterialEffectsUpdator::mass | ( | ) | const [inline] |
Particle mass assigned at construction.
Definition at line 62 of file GsfMaterialEffectsUpdator.h.
References theMass.
Referenced by GsfMultipleScatteringUpdator::compute().
{ return theMass; }
virtual bool GsfMaterialEffectsUpdator::newArguments | ( | const TrajectoryStateOnSurface & | , |
const PropagationDirection | |||
) | const [inline, protected, virtual] |
Reimplemented in GsfBetheHeitlerUpdator, GsfMaterialEffectsAdapter, and GsfMultipleScatteringUpdator.
Definition at line 74 of file GsfMaterialEffectsUpdator.h.
Referenced by deltaLocalErrors(), deltaPs(), and weights().
{ return true; }
virtual void GsfMaterialEffectsUpdator::storeArguments | ( | const TrajectoryStateOnSurface & | , |
const PropagationDirection | |||
) | const [inline, protected, virtual] |
Reimplemented in GsfBetheHeitlerUpdator, GsfMaterialEffectsAdapter, and GsfMultipleScatteringUpdator.
Definition at line 78 of file GsfMaterialEffectsUpdator.h.
{ }
TrajectoryStateOnSurface GsfMaterialEffectsUpdator::updateState | ( | const TrajectoryStateOnSurface & | TSoS, |
const PropagationDirection | propDir | ||
) | const [virtual] |
Updates TrajectoryStateOnSurface with material effects (momentum and covariance matrix are potentially affected.
Definition at line 15 of file GsfMaterialEffectsUpdator.cc.
References MultiTrajectoryStateAssembler::addState(), SurfaceSideDefinition::afterSurface, alongMomentum, SurfaceSideDefinition::beforeSurface, MultiTrajectoryStateAssembler::combinedState(), TrajectoryStateOnSurface::components(), TrajectoryStateOnSurface::globalParameters(), TrajectoryStateOnSurface::hasError(), TrajectoryStateOnSurface::localError(), TrajectoryStateOnSurface::localParameters(), GlobalTrajectoryParameters::magneticField(), LocalTrajectoryError::matrix(), Surface::mediumProperties(), query::result, TrajectoryStateOnSurface::surface(), LocalTrajectoryParameters::updateP(), CommonMethods::weight(), and TrajectoryStateOnSurface::weight().
{ // // get components of input state and check if material is associated to surface // const Surface& surface = TSoS.surface(); if ( !surface.mediumProperties() ) return TSoS; SurfaceSide side = propDir==alongMomentum ? afterSurface : beforeSurface; // single input state? if ( TSoS.components().size()>1 ) throw cms::Exception("LogicError") << "GsfMaterialEffectsUpdator::updateState used with MultiTSOS"; double weight = TSoS.weight(); // // Get components (will force recalculation, if necessary) // std::vector<double> Ws = weights(TSoS,propDir); if ( Ws.empty() ) return TrajectoryStateOnSurface(); std::vector<double> dPs = deltaPs(TSoS,propDir); if ( dPs.size()!=Ws.size() ) throw cms::Exception("LogicError") << "GsfMaterialEffectsUpdator: inconsistency in number of components"; std::vector<AlgebraicSymMatrix55> deltaErrors; if ( TSoS.hasError() ) deltaErrors = deltaLocalErrors(TSoS,propDir); // // prepare output vector // MultiTrajectoryStateAssembler result; // // loop over components // // edm::LogDebug("GsfMaterialEffectsUpdator") << "found " << Ws.size() << " components\n" // << " input state has weight " << TSoS.weight(); for ( unsigned int ic=0; ic<Ws.size(); ic++ ) { // edm::LogDebug("GsfMaterialEffectsUpdator") << "w, dp, sigp = " // << Ws[ic] << ", " // << dPs[ic] << ", " // << sqrt((deltaErrors[ic])[0][0]); // // Update momentum. In case of failure: return invalid state. // Use deltaP method to ensure update of cache, if necessary! // LocalTrajectoryParameters lp = TSoS.localParameters(); if ( !lp.updateP(dPs[ic]) ) return TrajectoryStateOnSurface(); // // Update covariance matrix? // if ( TSoS.hasError() ) { AlgebraicSymMatrix55 eloc = TSoS.localError().matrix(); eloc += deltaErrors[ic]; result.addState(TrajectoryStateOnSurface(lp, LocalTrajectoryError(eloc), surface, &(TSoS.globalParameters().magneticField()), side, weight*Ws[ic])); // edm::LogDebug("GsfMaterialEffectsUpdator") // << "adding state with weight " << weight*Ws[ic]; } else { result.addState(TrajectoryStateOnSurface(lp,surface, &(TSoS.globalParameters().magneticField()), side)); } } // edm::LogDebug("GsfMaterialEffectsUpdator") // << " output state has weight " << result.combinedState().weight(); return result.combinedState(); }
virtual std::vector<double> GsfMaterialEffectsUpdator::weights | ( | const TrajectoryStateOnSurface & | TSoS, |
const PropagationDirection | propDir | ||
) | const [inline, virtual] |
Weights of components.
Definition at line 32 of file GsfMaterialEffectsUpdator.h.
References compute(), Surface::mediumProperties(), newArguments(), TrajectoryStateOnSurface::surface(), and theWeights.
{ // check for material if ( !TSoS.surface().mediumProperties() ) return std::vector<double>(); // check for change (avoid using compute method if possible) if ( newArguments(TSoS,propDir) ) compute(TSoS,propDir); return theWeights; }
std::vector<AlgebraicSymMatrix55> GsfMaterialEffectsUpdator::theDeltaCovs [mutable, protected] |
Definition at line 88 of file GsfMaterialEffectsUpdator.h.
Referenced by GsfBetheHeitlerUpdator::compute(), GsfMaterialEffectsAdapter::compute(), GsfMultipleScatteringUpdator::compute(), GsfCombinedMaterialEffectsUpdator::compute(), and deltaLocalErrors().
std::vector<double> GsfMaterialEffectsUpdator::theDeltaPs [mutable, protected] |
Definition at line 87 of file GsfMaterialEffectsUpdator.h.
Referenced by GsfBetheHeitlerUpdator::compute(), GsfMaterialEffectsAdapter::compute(), GsfMultipleScatteringUpdator::compute(), GsfCombinedMaterialEffectsUpdator::compute(), and deltaPs().
float GsfMaterialEffectsUpdator::theMass [private] |
Definition at line 82 of file GsfMaterialEffectsUpdator.h.
Referenced by mass().
std::vector<double> GsfMaterialEffectsUpdator::theWeights [mutable, protected] |
Definition at line 86 of file GsfMaterialEffectsUpdator.h.
Referenced by GsfBetheHeitlerUpdator::compute(), GsfMultipleScatteringUpdator::compute(), GsfCombinedMaterialEffectsUpdator::compute(), GsfMaterialEffectsAdapter::GsfMaterialEffectsAdapter(), and weights().