CMS 3D CMS Logo

GsfCombinedMaterialEffectsUpdator Class Reference

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

#include <TrackingTools/GsfTracking/interface/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().

00021                                        :
00022   GsfMaterialEffectsUpdator(msUpdator.mass()),
00023   theMSUpdator(msUpdator.clone()), 
00024   theELUpdator(elUpdator.clone()) {}


Member Function Documentation

virtual GsfCombinedMaterialEffectsUpdator* GsfCombinedMaterialEffectsUpdator::clone ( void   )  const [inline, virtual]

Implements GsfMaterialEffectsUpdator.

Definition at line 13 of file GsfCombinedMaterialEffectsUpdator.h.

References GsfCombinedMaterialEffectsUpdator().

00014   {
00015     return new GsfCombinedMaterialEffectsUpdator(*this);
00016   }

void GsfCombinedMaterialEffectsUpdator::compute ( const TrajectoryStateOnSurface TSoS,
const   PropagationDirection 
) const [private, virtual]

Implements GsfMaterialEffectsUpdator.

Definition at line 46 of file GsfCombinedMaterialEffectsUpdator.cc.

References GsfMaterialEffectsUpdator::theDeltaCovs, GsfMaterialEffectsUpdator::theDeltaPs, theELUpdator, theMSUpdator, and GsfMaterialEffectsUpdator::theWeights.

00048 {
00049   //
00050   // reset components
00051   //
00052   theWeights.clear();
00053   theDeltaPs.clear();
00054   theDeltaCovs.clear();
00055   //
00056   // get components from multiple scattering
00057   //
00058   std::vector<double> msWeights = theMSUpdator->weights(TSoS,propDir);
00059   std::vector<double> msDeltaPs = theMSUpdator->deltaPs(TSoS,propDir);
00060   std::vector<AlgebraicSymMatrix55> msDeltaCovs = theMSUpdator->deltaLocalErrors(TSoS,propDir);
00061   if ( msWeights.empty() ) {
00062     //
00063     // create one dummy component
00064     //
00065     msWeights.push_back(1.);
00066     msDeltaPs.push_back(0.);
00067     msDeltaCovs.push_back(AlgebraicSymMatrix55());
00068   }
00069   //
00070   // get components from energy loss
00071   //
00072   std::vector<double> elWeights = theELUpdator->weights(TSoS,propDir);
00073   std::vector<double> elDeltaPs = theELUpdator->deltaPs(TSoS,propDir);
00074   std::vector<AlgebraicSymMatrix55> elDeltaCovs = theELUpdator->deltaLocalErrors(TSoS,propDir);
00075   if ( elWeights.empty() ) {
00076     //
00077     // create one dummy component
00078     //
00079     elWeights.push_back(1.);
00080     elDeltaPs.push_back(0.);
00081     elDeltaCovs.push_back(AlgebraicSymMatrix55());
00082   }
00083   //
00084   // combine the two multi-updates
00085   //
00086   std::vector<double>::const_iterator iMsWgt(msWeights.begin());
00087   std::vector<double>::const_iterator iMsDp(msDeltaPs.begin());
00088   std::vector<AlgebraicSymMatrix55>::const_iterator iMsDc(msDeltaCovs.begin());
00089   for ( ; iMsWgt<msWeights.end(); iMsWgt++,iMsDp++,iMsDc++ ) {
00090 
00091     std::vector<double>::const_iterator iElWgt(elWeights.begin());
00092     std::vector<double>::const_iterator iElDp(elDeltaPs.begin());
00093     std::vector<AlgebraicSymMatrix55>::const_iterator iElDc(elDeltaCovs.begin());
00094     for ( ; iElWgt<elWeights.end(); iElWgt++,iElDp++,iElDc++ ) {
00095       theWeights.push_back((*iMsWgt)*(*iElWgt));
00096       theDeltaPs.push_back((*iMsDp)+(*iElDp));
00097       theDeltaCovs.push_back((*iMsDc)+(*iElDc));
00098     }
00099   }
00100 
00101 }


Member Data Documentation

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().


The documentation for this class was generated from the following files:
Generated on Tue Jun 9 18:23:16 2009 for CMSSW by  doxygen 1.5.4