Class AccumulatedMaterialSlab¶
Defined in File AccumulatedMaterialSlab.hpp
Class Documentation¶
-
class
Acts
::
AccumulatedMaterialSlab
¶ Accumulate material properties from multiple hits/track and multiple tracks.
This is a helper class for the
SurfaceMaterialMapper
to handle material accumulation and averaging for one surface bin. The accumulation procedure is done in two steps:The per-track store accumulates material steps from one track/particle. Multiple material steps can be assigned to the same bin time by one particle, e.g. if the simulation has created more than one step in the material or if several components are compressed into one description. Multiple steps are treated as if they are passed one after the other.
The total store averages the accumulated material properties over all tracks. Each track contributes equally.
Public Functions
-
void
accumulate
(MaterialSlab slabAlongTrack, float pathCorrection = 1)¶ Add the material to the current per-track store.
The recoded material slab is assumed to be defined along the track direction. The track can have non-perpendicular incidence on the surface and the recorded slab has to be projected along the surface normal. The path correction gives the scaling factor from normal incidence to the recorded incidence as provided by the
Surface
interface.- Parameters
slabAlongTrack
: Recorded equivalent material slab for this steppathCorrection
: Correction factor due to non-perpendicular incident
Vacuum steps with a non-zero thickness can be added to account for holes in material structures.
-
std::pair<MaterialSlab, unsigned int>
totalAverage
() const¶ Return the average material properties from all accumulated tracks.
Only contains the information up to the last
.trackAverage(...)
call. If there have been additional calls to.accumulate(...)
afterwards, the information is not part of the total average. The thickness corresponds to the average thickness seen by the tracks.- Return
Average material properties and the number of contributing tracks
-
void
trackAverage
(bool useEmptyTrack = false)¶ Add the accumulated material for the current track to the total average.
This finishes the material accumulation for the current track and resets the per-track store. Subsequent calls to
.accumulate(...)
will start accumulating material for a new track.- Parameters
useEmptyTrack
: indicate whether to consider an empty track store
Each track contributes equally to the total average regardless of its measured path within the material. An empty per-track store, i.e. vanishing per-track material thickness, does not contribute to the total unless explicitely requested.