CMS 3D CMS Logo

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,
18  Effect effects[]) const {
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 }
size
Write out results.
PropagationDirection
assert(be >=bs)
GsfCombinedMaterialEffectsUpdator(GsfMaterialEffectsUpdator &msUpdator, GsfMaterialEffectsUpdator &elUpdator)
Constructor from multiple scattering and energy loss updator.
void compute(const TrajectoryStateOnSurface &, const PropagationDirection, Effect[]) const override
const T & data() const
Definition: ProxyBase11.h:51
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