Analysis Software
Documentation for sPHENIX simulation software
|
SurfaceMaterialMapper. More...
#include <acts/blob/sPHENIX/Core/include/Acts/Material/SurfaceMaterialMapper.hpp>
Classes | |
struct | Config |
struct | State |
Public Types | |
using | StraightLinePropagator = Propagator< StraightLineStepper, Navigator > |
Public Member Functions | |
SurfaceMaterialMapper ()=delete | |
Delete the Default constructor. | |
SurfaceMaterialMapper (const Config &cfg, StraightLinePropagator propagator, std::unique_ptr< const Logger > slogger=getDefaultLogger("SurfaceMaterialMapper", Logging::INFO)) | |
State | createState (const GeometryContext &gctx, const MagneticFieldContext &mctx, const TrackingGeometry &tGeometry) const |
helper method that creates the cache for the mapping | |
void | finalizeMaps (State &mState) const |
Method to finalize the maps. | |
void | mapMaterialTrack (State &mState, RecordedMaterialTrack &mTrack) const |
void | mapInteraction (State &mState, RecordedMaterialTrack &mTrack) const |
void | mapSurfaceInteraction (State &mState, std::vector< MaterialInteraction > &rMaterial) const |
Private Member Functions | |
void | resolveMaterialSurfaces (State &mState, const TrackingVolume &tVolume) const |
finds all surfaces with ProtoSurfaceMaterial of a volume | |
void | checkAndInsert (State &mState, const Surface &surface) const |
check and insert | |
void | collectMaterialVolumes (State &mState, const TrackingVolume &tVolume) const |
check and insert | |
const Logger & | logger () const |
Standard logger method. | |
Private Attributes | |
Config | m_cfg |
The configuration object. | |
StraightLinePropagator | m_propagator |
The straight line propagator. | |
std::unique_ptr< const Logger > | m_logger |
The logging instance. | |
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
Definition at line 83 of file SurfaceMaterialMapper.hpp.
View newest version in sPHENIX GitHub at line 83 of file SurfaceMaterialMapper.hpp
using Acts::SurfaceMaterialMapper::StraightLinePropagator = Propagator<StraightLineStepper, Navigator> |
Definition at line 85 of file SurfaceMaterialMapper.hpp.
View newest version in sPHENIX GitHub at line 85 of file SurfaceMaterialMapper.hpp
|
delete |
Delete the Default constructor.
Acts::SurfaceMaterialMapper::SurfaceMaterialMapper | ( | const Config & | cfg, |
StraightLinePropagator | propagator, | ||
std::unique_ptr< const Logger > | slogger = getDefaultLogger("SurfaceMaterialMapper", Logging::INFO) |
||
) |
Constructor with config object
cfg | Configuration struct |
propagator | The straight line propagator |
slogger | The logger |
Definition at line 47 of file SurfaceMaterialMapper.cpp.
View newest version in sPHENIX GitHub at line 47 of file SurfaceMaterialMapper.cpp
|
private |
check and insert
mState | is the map to be filled |
surface | is the surface to be checked for a Proxy |
Definition at line 122 of file SurfaceMaterialMapper.cpp.
View newest version in sPHENIX GitHub at line 122 of file SurfaceMaterialMapper.cpp
References Acts::SurfaceMaterialMapper::State::accumulatedMaterial, ACTS_DEBUG, Acts::adjustBinUtility(), Acts::SurfaceMaterialMapper::State::geoContext, Acts::GeometryObject::geometryId(), Acts::SurfaceMaterialMapper::State::inputSurfaceMaterial, m_cfg(), Acts::Surface::surfaceMaterial(), Acts::Surface::surfaceMaterialSharedPtr(), and Acts::GeometryIdentifier::volume().
|
private |
check and insert
mState | is the map to be filled |
tVolume | is the volume collect from |
Definition at line 170 of file SurfaceMaterialMapper.cpp.
View newest version in sPHENIX GitHub at line 170 of file SurfaceMaterialMapper.cpp
References Acts::ACTS_VERBOSE(), Acts::TrackingVolume::confinedVolumes(), Acts::TrackingVolume::denseVolumes(), Acts::GeometryObject::geometryId(), Acts::SurfaceMaterialMapper::State::volumeMaterial, Acts::TrackingVolume::volumeMaterial(), Acts::TrackingVolume::volumeMaterialSharedPtr(), and Acts::TrackingVolume::volumeName().
Acts::SurfaceMaterialMapper::State Acts::SurfaceMaterialMapper::createState | ( | const GeometryContext & | gctx, |
const MagneticFieldContext & | mctx, | ||
const TrackingGeometry & | tGeometry | ||
) | const |
helper method that creates the cache for the mapping
[in] | gctx | The geometry context to use |
[in] | mctx | The magnetic field context to use |
[in] | tGeometry | The geometry which should be mapped |
This method takes a TrackingGeometry, finds all surfaces with material proxis and returns you a Cache object tO be used
Definition at line 54 of file SurfaceMaterialMapper.cpp.
View newest version in sPHENIX GitHub at line 54 of file SurfaceMaterialMapper.cpp
References Acts::SurfaceMaterialMapper::State::accumulatedMaterial, ACTS_DEBUG, Acts::ACTS_VERBOSE(), and Acts::TrackingGeometry::highestTrackingVolume().
Referenced by Acts::Test::BOOST_AUTO_TEST_CASE().
void Acts::SurfaceMaterialMapper::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
mState |
Definition at line 196 of file SurfaceMaterialMapper.cpp.
View newest version in sPHENIX GitHub at line 196 of file SurfaceMaterialMapper.cpp
References Acts::SurfaceMaterialMapper::State::accumulatedMaterial, ACTS_DEBUG, and Acts::SurfaceMaterialMapper::State::surfaceMaterial.
|
inlineprivate |
Standard logger method.
Definition at line 217 of file SurfaceMaterialMapper.hpp.
View newest version in sPHENIX GitHub at line 217 of file SurfaceMaterialMapper.hpp
References m_logger.
void Acts::SurfaceMaterialMapper::mapInteraction | ( | State & | mState, |
RecordedMaterialTrack & | mTrack | ||
) | const |
Loop through all the material interactions and add them to the associated surface
mState | The current state map |
mTrack | The material track to be mapped |
check if we are inside a material volume
Definition at line 228 of file SurfaceMaterialMapper.cpp.
View newest version in sPHENIX GitHub at line 228 of file SurfaceMaterialMapper.cpp
References Acts::SurfaceMaterialMapper::State::accumulatedMaterial, ACTS_ERROR, Acts::ACTS_VERBOSE(), ACTS_WARNING, Acts::Default, Acts::SurfaceMaterialMapper::State::geoContext, Acts::SurfaceMaterialMapper::State::inputSurfaceMaterial, Acts::MaterialInteraction::intersection, Acts::MaterialInteraction::intersectionID, m_cfg(), Acts::SurfaceMaterialMapper::State::magFieldContext, Acts::VectorHelpers::makeVector4(), Acts::Test::mSurface, norm, ckf::options, position, Acts::PostMapping, Acts::PreMapping, Acts::s_epsilon, Acts::Sensor, start, writeMapConfig::surface, Acts::MaterialInteraction::surface, and value.
void Acts::SurfaceMaterialMapper::mapMaterialTrack | ( | State & | mState, |
RecordedMaterialTrack & | mTrack | ||
) | const |
Process/map a single track
mState | The current state map |
mTrack | The material track to be mapped |
Definition at line 205 of file SurfaceMaterialMapper.cpp.
View newest version in sPHENIX GitHub at line 205 of file SurfaceMaterialMapper.cpp
References Acts::ACTS_VERBOSE().
void Acts::SurfaceMaterialMapper::mapSurfaceInteraction | ( | State & | mState, |
std::vector< MaterialInteraction > & | rMaterial | ||
) | const |
Loop through all the material interactions and add them to the associated surface
mState | The current state map |
rMaterial | Vector of all the material interactions that will be mapped |
Definition at line 464 of file SurfaceMaterialMapper.cpp.
View newest version in sPHENIX GitHub at line 464 of file SurfaceMaterialMapper.cpp
References Acts::SurfaceMaterialMapper::State::accumulatedMaterial, Acts::SurfaceMaterialMapper::State::inputSurfaceMaterial, and m_cfg().
|
private |
finds all surfaces with ProtoSurfaceMaterial of a volume
mState | The state to be filled |
tVolume | is current TrackingVolume |
Definition at line 73 of file SurfaceMaterialMapper.cpp.
View newest version in sPHENIX GitHub at line 73 of file SurfaceMaterialMapper.cpp
References Acts::ACTS_VERBOSE(), Acts::BinnedArray< T >::arrayObjects(), Acts::TrackingVolume::boundarySurfaces(), Acts::TrackingVolume::confinedLayers(), Acts::TrackingVolume::confinedVolumes(), Acts::navigation, and Acts::TrackingVolume::volumeName().
|
private |
The configuration object.
Definition at line 220 of file SurfaceMaterialMapper.hpp.
View newest version in sPHENIX GitHub at line 220 of file SurfaceMaterialMapper.hpp
|
private |
The logging instance.
Definition at line 226 of file SurfaceMaterialMapper.hpp.
View newest version in sPHENIX GitHub at line 226 of file SurfaceMaterialMapper.hpp
Referenced by logger().
|
private |
The straight line propagator.
Definition at line 223 of file SurfaceMaterialMapper.hpp.
View newest version in sPHENIX GitHub at line 223 of file SurfaceMaterialMapper.hpp