File VolumeMaterialMapper.hpp¶
-
namespace Acts
Note
This file is foreseen for the
Geometry
module to replaceExtent
-
class VolumeMaterialMapper
- #include <Acts/Material/VolumeMaterialMapper.hpp>
VolumeMaterialMapper.
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 Volume with ProtoVolumeMaterial a local store is initialized the identification is done hereby through the Volume::GeometryIdentifier
2) A number of N material tracks is read in, each track has : origin, direction, material steps (< position, step length, x0, l0, a, z, rho >, thichness)
for each track: volume along the origin/direction path are collected. the step are then associated to volume inside which they are. Additional step are created along the track direction.
3) Each ‘hit’ bin per event is counted and averaged at the end of the run
Public Types
-
using StraightLinePropagator = Propagator<StraightLineStepper, Navigator>
Public Functions
-
VolumeMaterialMapper() = delete
Delete the Default constructor.
-
VolumeMaterialMapper(const Config &cfg, StraightLinePropagator propagator, std::unique_ptr<const Logger> slogger = getDefaultLogger("VolumeMaterialMapper", 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 Homogeneous material into HomogeneousVolumeMaterial and the 2D and 3D grid into a InterpolatedMaterialMap
- Parameters
mState –
-
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
Private Functions
-
void checkAndInsert(State &mState, const TrackingVolume &volume) const¶
check and insert
- Parameters
mState – is the map to be filled
volume – is the surface to be checked for a Proxy
-
void collectMaterialSurfaces(State &mState, const TrackingVolume &tVolume) const¶
check and insert
- Parameters
mState – is the map to be filled
tVolume – is the surface to collect from
-
void createExtraHits(State &mState, std::pair<const GeometryIdentifier, BinUtility> ¤tBinning, Acts::MaterialSlab properties, const Vector3 &position, Vector3 direction) const¶
Create extra material point for the mapping and add them to the grid.
- Parameters
mState – The state to be filled
currentBinning – a pair containing the current geometry ID and the current binning
properties – material properties of the original hit
position – position of the original hit
direction – direction of the track
-
void resolveMaterialVolume(State &mState, const TrackingVolume &tVolume) const¶
finds all surfaces with ProtoVolumeMaterial of a volume
- Parameters
mState – The state to be filled
tVolume – is current TrackingVolume
Private Members
-
StraightLinePropagator m_propagator¶
The straight line propagator.
-
struct BoundSurfaceSelector¶
selector for finding surface
-
struct Config
- #include <Acts/Material/VolumeMaterialMapper.hpp>
Nested Configuration struct for the material mapper.
Public Members
-
float mappingStep = 1.
Size of the step for the step extrapolation.
-
float mappingStep = 1.
-
struct MaterialVolumeSelector¶
selector for finding
Public Functions
-
inline bool operator()(const TrackingVolume &vf) const¶
-
inline bool operator()(const TrackingVolume &vf) const¶
-
struct State
- #include <Acts/Material/VolumeMaterialMapper.hpp>
Nested State struct which is used for the mapping prococess.
Public Functions
-
inline State(const GeometryContext &gctx, const MagneticFieldContext &mctx)
Constructor of the Sate with contexts.
Public Members
-
std::reference_wrapper<const GeometryContext> geoContext
Reference to the geometry context for the mapping.
-
std::map<const GeometryIdentifier, Grid2D> grid2D
The 2D material grid for each geometry ID.
-
std::map<const GeometryIdentifier, Grid3D> grid3D
The 3D material grid for each geometry ID.
-
std::map<const GeometryIdentifier, Acts::AccumulatedVolumeMaterial> homogeneousGrid
The recorded material per geometry ID.
-
std::reference_wrapper<const MagneticFieldContext> magFieldContext
Reference to the magnetic field context.
-
std::map<const GeometryIdentifier, BinUtility> materialBin
The binning for each geometry ID.
-
std::map<GeometryIdentifier, std::shared_ptr<const ISurfaceMaterial>> surfaceMaterial
The surface material of the input tracking geometry.
-
std::map<const GeometryIdentifier, std::function<Acts::Vector2(Acts::Vector3)>> transform2D
The recorded 2D transform associated the grid for each geometry ID.
-
std::map<const GeometryIdentifier, std::function<Acts::Vector3(Acts::Vector3)>> transform3D
The recorded 3D transform associated the material grid for each geometry ID.
-
std::map<GeometryIdentifier, std::unique_ptr<const IVolumeMaterial>> volumeMaterial
The created volume material from it.
-
inline State(const GeometryContext &gctx, const MagneticFieldContext &mctx)
-
using StraightLinePropagator = Propagator<StraightLineStepper, Navigator>
-
class VolumeMaterialMapper