CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
GsfCombinedMaterialEffectsUpdator.cc
Go to the documentation of this file.
2 #include<cassert>
3 
4 #include<iostream>
5 
7  GsfMaterialEffectsUpdator& elUpdator) :
8  GsfMaterialEffectsUpdator(msUpdator.mass(),msUpdator.size()*elUpdator.size()),
9  theMSUpdator(msUpdator.clone()),
10  theELUpdator(elUpdator.clone()) {}
11 
12 //
13 // Computation: combine updates on momentum and cov. matrix from the multiple
14 // scattering and energy loss updators and store them in private data members
15 //
17  const PropagationDirection propDir, Effect effects[]) const
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 }
40 
assert(m_qm.get())
PropagationDirection
const T & data() const
Definition: ProxyBase11.h:66
virtual void compute(const TrajectoryStateOnSurface &, const PropagationDirection, Effect[]) const
GsfCombinedMaterialEffectsUpdator(GsfMaterialEffectsUpdator &msUpdator, GsfMaterialEffectsUpdator &elUpdator)
Constructor from multiple scattering and energy loss updator.
virtual void compute(const TrajectoryStateOnSurface &, const PropagationDirection, Effect effects[]) const =0
TEveGeoShape * clone(const TEveElement *element, TEveElement *parent)
Definition: eve_macros.cc:135
void combine(Effect const &e1, Effect const &e2)
DeepCopyPointerByClone< GsfMaterialEffectsUpdator > theMSUpdator
DeepCopyPointerByClone< GsfMaterialEffectsUpdator > theELUpdator
tuple size
Write out results.