#include <GsfCombinedMaterialEffectsUpdator.h>
Public Member Functions | |
virtual GsfCombinedMaterialEffectsUpdator * | clone () const |
GsfCombinedMaterialEffectsUpdator (GsfMaterialEffectsUpdator &msUpdator, GsfMaterialEffectsUpdator &elUpdator) | |
Constructor from multiple scattering and energy loss updator. | |
Private Member Functions | |
virtual void | compute (const TrajectoryStateOnSurface &, const PropagationDirection) const |
Private Attributes | |
DeepCopyPointerByClone < GsfMaterialEffectsUpdator > | theELUpdator |
DeepCopyPointerByClone < GsfMaterialEffectsUpdator > | theMSUpdator |
Combines two GsfMaterialEffectsUpdators (for multiple scattering and energy loss).
Definition at line 10 of file GsfCombinedMaterialEffectsUpdator.h.
GsfCombinedMaterialEffectsUpdator::GsfCombinedMaterialEffectsUpdator | ( | GsfMaterialEffectsUpdator & | msUpdator, |
GsfMaterialEffectsUpdator & | elUpdator | ||
) |
Constructor from multiple scattering and energy loss updator.
Definition at line 20 of file GsfCombinedMaterialEffectsUpdator.cc.
Referenced by clone().
: GsfMaterialEffectsUpdator(msUpdator.mass()), theMSUpdator(msUpdator.clone()), theELUpdator(elUpdator.clone()) {}
virtual GsfCombinedMaterialEffectsUpdator* GsfCombinedMaterialEffectsUpdator::clone | ( | void | ) | const [inline, virtual] |
Implements GsfMaterialEffectsUpdator.
Definition at line 13 of file GsfCombinedMaterialEffectsUpdator.h.
References GsfCombinedMaterialEffectsUpdator().
{ return new GsfCombinedMaterialEffectsUpdator(*this); }
void GsfCombinedMaterialEffectsUpdator::compute | ( | const TrajectoryStateOnSurface & | TSoS, |
const PropagationDirection | propDir | ||
) | const [private, virtual] |
Implements GsfMaterialEffectsUpdator.
Definition at line 46 of file GsfCombinedMaterialEffectsUpdator.cc.
References GsfMaterialEffectsUpdator::theDeltaCovs, GsfMaterialEffectsUpdator::theDeltaPs, theELUpdator, theMSUpdator, and GsfMaterialEffectsUpdator::theWeights.
{ // // reset components // theWeights.clear(); theDeltaPs.clear(); theDeltaCovs.clear(); // // get components from multiple scattering // std::vector<double> msWeights = theMSUpdator->weights(TSoS,propDir); std::vector<double> msDeltaPs = theMSUpdator->deltaPs(TSoS,propDir); std::vector<AlgebraicSymMatrix55> msDeltaCovs = theMSUpdator->deltaLocalErrors(TSoS,propDir); if ( msWeights.empty() ) { // // create one dummy component // msWeights.push_back(1.); msDeltaPs.push_back(0.); msDeltaCovs.push_back(AlgebraicSymMatrix55()); } // // get components from energy loss // std::vector<double> elWeights = theELUpdator->weights(TSoS,propDir); std::vector<double> elDeltaPs = theELUpdator->deltaPs(TSoS,propDir); std::vector<AlgebraicSymMatrix55> elDeltaCovs = theELUpdator->deltaLocalErrors(TSoS,propDir); if ( elWeights.empty() ) { // // create one dummy component // elWeights.push_back(1.); elDeltaPs.push_back(0.); elDeltaCovs.push_back(AlgebraicSymMatrix55()); } // // combine the two multi-updates // std::vector<double>::const_iterator iMsWgt(msWeights.begin()); std::vector<double>::const_iterator iMsDp(msDeltaPs.begin()); std::vector<AlgebraicSymMatrix55>::const_iterator iMsDc(msDeltaCovs.begin()); for ( ; iMsWgt<msWeights.end(); iMsWgt++,iMsDp++,iMsDc++ ) { std::vector<double>::const_iterator iElWgt(elWeights.begin()); std::vector<double>::const_iterator iElDp(elDeltaPs.begin()); std::vector<AlgebraicSymMatrix55>::const_iterator iElDc(elDeltaCovs.begin()); for ( ; iElWgt<elWeights.end(); iElWgt++,iElDp++,iElDc++ ) { theWeights.push_back((*iMsWgt)*(*iElWgt)); theDeltaPs.push_back((*iMsDp)+(*iElDp)); theDeltaCovs.push_back((*iMsDc)+(*iElDc)); } } }
DeepCopyPointerByClone<GsfMaterialEffectsUpdator> GsfCombinedMaterialEffectsUpdator::theELUpdator [private] |
Definition at line 36 of file GsfCombinedMaterialEffectsUpdator.h.
Referenced by compute().
DeepCopyPointerByClone<GsfMaterialEffectsUpdator> GsfCombinedMaterialEffectsUpdator::theMSUpdator [private] |
Definition at line 35 of file GsfCombinedMaterialEffectsUpdator.h.
Referenced by compute().