CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
GsfCombinedMaterialEffectsUpdator Class Referencefinal

#include <GsfCombinedMaterialEffectsUpdator.h>

Inheritance diagram for GsfCombinedMaterialEffectsUpdator:
GsfMaterialEffectsUpdator

Public Member Functions

GsfCombinedMaterialEffectsUpdatorclone () const override
 
void compute (const TrajectoryStateOnSurface &, const PropagationDirection, Effect[]) const override
 
 GsfCombinedMaterialEffectsUpdator (GsfMaterialEffectsUpdator &msUpdator, GsfMaterialEffectsUpdator &elUpdator)
 Constructor from multiple scattering and energy loss updator. More...
 
- Public Member Functions inherited from GsfMaterialEffectsUpdator
 GsfMaterialEffectsUpdator (float mass, uint32_t is)
 
float mass () const
 
size_t size () const
 
virtual TrajectoryStateOnSurface updateState (const TrajectoryStateOnSurface &TSoS, const PropagationDirection propDir) const
 
virtual ~GsfMaterialEffectsUpdator ()
 

Private Attributes

DeepCopyPointerByClone< GsfMaterialEffectsUpdatortheELUpdator
 
DeepCopyPointerByClone< GsfMaterialEffectsUpdatortheMSUpdator
 

Additional Inherited Members

- Public Types inherited from GsfMaterialEffectsUpdator
typedef materialEffect::Covariance Covariance
 
typedef materialEffect::CovIndex CovIndex
 
typedef materialEffect::Effect Effect
 
- Protected Member Functions inherited from GsfMaterialEffectsUpdator
void resize (size_t is)
 

Detailed Description

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

Definition at line 10 of file GsfCombinedMaterialEffectsUpdator.h.

Constructor & Destructor Documentation

◆ GsfCombinedMaterialEffectsUpdator()

GsfCombinedMaterialEffectsUpdator::GsfCombinedMaterialEffectsUpdator ( GsfMaterialEffectsUpdator msUpdator,
GsfMaterialEffectsUpdator elUpdator 
)

Constructor from multiple scattering and energy loss updator.

Definition at line 6 of file GsfCombinedMaterialEffectsUpdator.cc.

Referenced by clone().

8  : GsfMaterialEffectsUpdator(msUpdator.mass(), msUpdator.size() * elUpdator.size()),
9  theMSUpdator(msUpdator.clone()),
10  theELUpdator(elUpdator.clone()) {}
GsfMaterialEffectsUpdator(float mass, uint32_t is)
virtual GsfMaterialEffectsUpdator * clone() const =0
DeepCopyPointerByClone< GsfMaterialEffectsUpdator > theMSUpdator
DeepCopyPointerByClone< GsfMaterialEffectsUpdator > theELUpdator

Member Function Documentation

◆ clone()

GsfCombinedMaterialEffectsUpdator* GsfCombinedMaterialEffectsUpdator::clone ( void  ) const
inlineoverridevirtual

Implements GsfMaterialEffectsUpdator.

Definition at line 12 of file GsfCombinedMaterialEffectsUpdator.h.

References GsfCombinedMaterialEffectsUpdator().

12 { return new GsfCombinedMaterialEffectsUpdator(*this); }
GsfCombinedMaterialEffectsUpdator(GsfMaterialEffectsUpdator &msUpdator, GsfMaterialEffectsUpdator &elUpdator)
Constructor from multiple scattering and energy loss updator.

◆ compute()

void GsfCombinedMaterialEffectsUpdator::compute ( const TrajectoryStateOnSurface TSoS,
const PropagationDirection  propDir,
Effect  effects[] 
) const
overridevirtual

Implements GsfMaterialEffectsUpdator.

Definition at line 16 of file GsfCombinedMaterialEffectsUpdator.cc.

References cms::cuda::assert(), materialEffect::Effect::combine(), GsfMaterialEffectsUpdator::compute(), ProxyBase11< T >::data(), dqmdumpme::k, GsfMaterialEffectsUpdator::size(), theELUpdator, and theMSUpdator.

18  {
19 #if __clang__
20  std::vector<Effect> msEffects(theMSUpdator->size());
21  theMSUpdator->compute(TSoS, propDir, msEffects.data());
22  std::vector<Effect> elEffects(theELUpdator->size());
23  theELUpdator->compute(TSoS, propDir, elEffects.data());
24 #else
25  Effect msEffects[theMSUpdator->size()];
26  theMSUpdator->compute(TSoS, propDir, msEffects);
27  Effect elEffects[theELUpdator->size()];
28  theELUpdator->compute(TSoS, propDir, elEffects);
29 #endif
30 
31  //
32  // combine the two multi-updates
33  //
34  uint32_t k = 0;
35  for (auto const& mse : msEffects)
36  for (auto const& ele : elEffects)
37  effects[k++].combine(mse, ele);
38  assert(k == size());
39 }
assert(be >=bs)
virtual void compute(const TrajectoryStateOnSurface &, const PropagationDirection, Effect effects[]) const =0
DeepCopyPointerByClone< GsfMaterialEffectsUpdator > theMSUpdator
DeepCopyPointerByClone< GsfMaterialEffectsUpdator > theELUpdator

Member Data Documentation

◆ theELUpdator

DeepCopyPointerByClone<GsfMaterialEffectsUpdator> GsfCombinedMaterialEffectsUpdator::theELUpdator
private

Definition at line 24 of file GsfCombinedMaterialEffectsUpdator.h.

Referenced by compute().

◆ theMSUpdator

DeepCopyPointerByClone<GsfMaterialEffectsUpdator> GsfCombinedMaterialEffectsUpdator::theMSUpdator
private

Definition at line 23 of file GsfCombinedMaterialEffectsUpdator.h.

Referenced by compute().