File SurfaceMaterialMapper.hpp¶
-
namespace Acts
Note
This file is foreseen for the
Geometry
module to replaceExtent
Note
this is foreseen for the ‘Geometry’ module
-
struct MaterialSurface¶
- #include <Acts/Material/SurfaceMaterialMapper.hpp>
selector for finding surface
-
struct MaterialVolume¶
- #include <Acts/Material/SurfaceMaterialMapper.hpp>
selector for finding volume
Public Functions
-
inline bool operator()(const TrackingVolume &vf) const¶
-
inline bool operator()(const TrackingVolume &vf) const¶
-
class SurfaceMaterialMapper
- #include <Acts/Material/SurfaceMaterialMapper.hpp>
SurfaceMaterialMapper.
This is the main feature tool to map material information from a 3D geometry onto the TrackingGeometry with its surface material description.
The process runs as such:
1) TrackingGeometry is parsed and for each Surface with ProtoSurfaceMaterial a local store is initialized the identification is done hereby through the Surface::GeometryIdentifier
2) A Cache is generated that is used to keep the filling thread local, the filling is protected with std::mutex
3) A number of N material tracks is read in, each track has : origin, direction, material steps < position, step length, x0, l0, a, z, rho >
for each track: surfaces along the origin/direction path are collected the closest material steps are assigned
4) Each ‘hit’ bin per event is counted and averaged at the end of the run
Public Types
-
using StraightLinePropagator = Propagator<StraightLineStepper, Navigator>
Public Functions
-
SurfaceMaterialMapper() = delete
Delete the Default constructor.
-
SurfaceMaterialMapper(const Config &cfg, StraightLinePropagator propagator, std::unique_ptr<const Logger> slogger = getDefaultLogger("SurfaceMaterialMapper", Logging::INFO))
Constructor with config object.
- Parameters
cfg – Configuration struct
propagator – The straight line propagator
slogger – The logger
-
State createState(const GeometryContext &gctx, const MagneticFieldContext &mctx, const TrackingGeometry &tGeometry) const
helper method that creates the cache for the mapping
This method takes a TrackingGeometry, finds all surfaces with material proxis and returns you a Cache object tO be used
- Parameters
gctx – [in] The geometry context to use
mctx – [in] The magnetic field context to use
tGeometry – [in] The geometry which should be mapped
-
void finalizeMaps(State &mState) const
Method to finalize the maps.
It calls the final run averaging and then transforms the AccumulatedSurface material class to a surface material class type
- Parameters
mState –
-
void mapInteraction(State &mState, RecordedMaterialTrack &mTrack) const
Loop through all the material interactions and add them to the associated surface.
- Parameters
mState – The current state map
mTrack – The material track to be mapped
-
void mapMaterialTrack(State &mState, RecordedMaterialTrack &mTrack) const
Process/map a single track.
Note
the RecordedMaterialSlab of the track are assumed to be ordered from the starting position along the starting direction
- Parameters
mState – The current state map
mTrack – The material track to be mapped
-
void mapSurfaceInteraction(State &mState, std::vector<MaterialInteraction> &rMaterial) const
Loop through all the material interactions and add them to the associated surface.
Note
The material interactions are assumed to have an associated surface ID
- Parameters
mState – The current state map
rMaterial – Vector of all the material interactions that will be mapped
Private Functions
-
void checkAndInsert(State &mState, const Surface &surface) const¶
check and insert
- Parameters
mState – is the map to be filled
surface – is the surface to be checked for a Proxy
-
void collectMaterialVolumes(State &mState, const TrackingVolume &tVolume) const¶
check and insert
- Parameters
mState – is the map to be filled
tVolume – is the volume collect from
-
void resolveMaterialSurfaces(State &mState, const TrackingVolume &tVolume) const¶
finds all surfaces with ProtoSurfaceMaterial of a volume
- Parameters
mState – The state to be filled
tVolume – is current TrackingVolume
Private Members
-
StraightLinePropagator m_propagator¶
The straight line propagator.
-
struct Config
- #include <Acts/Material/SurfaceMaterialMapper.hpp>
Nested Configuration struct for the material mapper.
Public Members
-
bool computeVariance = false
Compute the variance of each material slab (only if using an input map)
-
bool emptyBinCorrection = true
Correct for empty bins (recommended)
-
std::array<double, 2> etaRange = {{-6., 6.}}
Mapping range.
-
bool mapperDebugOutput = false
Mapping output to debug stream.
-
bool computeVariance = false
-
struct State
- #include <Acts/Material/SurfaceMaterialMapper.hpp>
Nested State struct which is used for the mapping prococess.
Public Functions
-
inline State(const GeometryContext &gctx, const MagneticFieldContext &mctx)
- Parameters
gctx – [in] The geometry context to use
mctx – [in] The magnetic field context to use
Public Members
-
std::map<GeometryIdentifier, AccumulatedSurfaceMaterial> accumulatedMaterial
The accumulated material per geometry ID.
-
std::reference_wrapper<const GeometryContext> geoContext
Reference to the geometry context for the mapping.
-
std::map<GeometryIdentifier, std::shared_ptr<const ISurfaceMaterial>> inputSurfaceMaterial
The surface material of the input tracking geometry.
-
std::reference_wrapper<const MagneticFieldContext> magFieldContext
Reference to the magnetic field context.
-
std::map<GeometryIdentifier, std::unique_ptr<const ISurfaceMaterial>> surfaceMaterial
The created surface material from it.
-
std::map<GeometryIdentifier, std::shared_ptr<const IVolumeMaterial>> volumeMaterial
The volume material of the input tracking geometry.
-
inline State(const GeometryContext &gctx, const MagneticFieldContext &mctx)
-
using StraightLinePropagator = Propagator<StraightLineStepper, Navigator>
-
struct MaterialSurface¶