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 }
GsfMaterialEffectsUpdator::compute
virtual void compute(const TrajectoryStateOnSurface &, const PropagationDirection, Effect effects[]) const =0
materialEffect::Effect
Definition: MaterialEffectsUpdator.h:40
GsfCombinedMaterialEffectsUpdator::theMSUpdator
DeepCopyPointerByClone< GsfMaterialEffectsUpdator > theMSUpdator
Definition: GsfCombinedMaterialEffectsUpdator.h:23
cms::cuda::assert
assert(be >=bs)
GsfCombinedMaterialEffectsUpdator::theELUpdator
DeepCopyPointerByClone< GsfMaterialEffectsUpdator > theELUpdator
Definition: GsfCombinedMaterialEffectsUpdator.h:24
TrajectoryStateOnSurface
Definition: TrajectoryStateOnSurface.h:16
clone
TEveGeoShape * clone(const TEveElement *element, TEveElement *parent)
Definition: eve_macros.cc:135
dqmdumpme.k
k
Definition: dqmdumpme.py:60
materialEffect::Effect::combine
void combine(Effect const &e1, Effect const &e2)
Definition: MaterialEffectsUpdator.h:46
GsfCombinedMaterialEffectsUpdator.h
GsfCombinedMaterialEffectsUpdator::GsfCombinedMaterialEffectsUpdator
GsfCombinedMaterialEffectsUpdator(GsfMaterialEffectsUpdator &msUpdator, GsfMaterialEffectsUpdator &elUpdator)
Constructor from multiple scattering and energy loss updator.
Definition: GsfCombinedMaterialEffectsUpdator.cc:6
GsfMaterialEffectsUpdator
Definition: GsfMaterialEffectsUpdator.h:15
GsfMaterialEffectsUpdator::size
size_t size() const
Definition: GsfMaterialEffectsUpdator.h:42
PropagationDirection
PropagationDirection
Definition: PropagationDirection.h:4
EgHLTOffHistBins_cfi.mass
mass
Definition: EgHLTOffHistBins_cfi.py:34
ProxyBase11::data
const T & data() const
Definition: ProxyBase11.h:51
GsfCombinedMaterialEffectsUpdator::compute
void compute(const TrajectoryStateOnSurface &, const PropagationDirection, Effect[]) const override
Definition: GsfCombinedMaterialEffectsUpdator.cc:16
findQualityFiles.size
size
Write out results.
Definition: findQualityFiles.py:443