CMS 3D CMS Logo

Public Member Functions | Private Member Functions | Private Attributes

GsfCombinedMaterialEffectsUpdator Class Reference

#include <GsfCombinedMaterialEffectsUpdator.h>

Inheritance diagram for GsfCombinedMaterialEffectsUpdator:
GsfMaterialEffectsUpdator

List of all members.

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

Detailed Description

Combines two GsfMaterialEffectsUpdators (for multiple scattering and energy loss).

Definition at line 10 of file GsfCombinedMaterialEffectsUpdator.h.


Constructor & Destructor Documentation

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()) {}

Member Function Documentation

virtual GsfCombinedMaterialEffectsUpdator* GsfCombinedMaterialEffectsUpdator::clone ( void  ) const [inline, virtual]
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));
    }
  }

}

Member Data Documentation

Definition at line 36 of file GsfCombinedMaterialEffectsUpdator.h.

Referenced by compute().

Definition at line 35 of file GsfCombinedMaterialEffectsUpdator.h.

Referenced by compute().