Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Acts::SurfaceMaterialMapper Class Reference

SurfaceMaterialMapper. More...

#include <acts/blob/sPHENIX/Core/include/Acts/Material/SurfaceMaterialMapper.hpp>

+ Collaboration diagram for Acts::SurfaceMaterialMapper:

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 Loggerlogger () const
 Standard logger method.
 

Private Attributes

Config m_cfg
 The configuration object.
 
StraightLinePropagator m_propagator
 The straight line propagator.
 
std::unique_ptr< const Loggerm_logger
 The logging instance.
 

Detailed Description

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

Definition at line 83 of file SurfaceMaterialMapper.hpp.

View newest version in sPHENIX GitHub at line 83 of file SurfaceMaterialMapper.hpp

Member Typedef Documentation

Definition at line 85 of file SurfaceMaterialMapper.hpp.

View newest version in sPHENIX GitHub at line 85 of file SurfaceMaterialMapper.hpp

Constructor & Destructor Documentation

Acts::SurfaceMaterialMapper::SurfaceMaterialMapper ( )
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

Parameters
cfgConfiguration struct
propagatorThe straight line propagator
sloggerThe logger

Definition at line 47 of file SurfaceMaterialMapper.cpp.

View newest version in sPHENIX GitHub at line 47 of file SurfaceMaterialMapper.cpp

Member Function Documentation

void Acts::SurfaceMaterialMapper::checkAndInsert ( State mState,
const Surface surface 
) const
private

check and insert

Parameters
mStateis the map to be filled
surfaceis 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().

+ Here is the call graph for this function:

void Acts::SurfaceMaterialMapper::collectMaterialVolumes ( State mState,
const TrackingVolume tVolume 
) const
private

check and insert

Parameters
mStateis the map to be filled
tVolumeis 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().

+ Here is the call graph for this function:

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

Parameters
[in]gctxThe geometry context to use
[in]mctxThe magnetic field context to use
[in]tGeometryThe 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().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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

Parameters
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.

const Logger& Acts::SurfaceMaterialMapper::logger ( ) const
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

Parameters
mStateThe current state map
mTrackThe 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.

+ Here is the call graph for this function:

void Acts::SurfaceMaterialMapper::mapMaterialTrack ( State mState,
RecordedMaterialTrack mTrack 
) const

Process/map a single track

Parameters
mStateThe current state map
mTrackThe material track to be mapped
Note
the RecordedMaterialSlab of the track are assumed to be ordered from the starting position along the starting direction

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().

+ Here is the call graph for this function:

void Acts::SurfaceMaterialMapper::mapSurfaceInteraction ( State mState,
std::vector< MaterialInteraction > &  rMaterial 
) const

Loop through all the material interactions and add them to the associated surface

Parameters
mStateThe current state map
rMaterialVector of all the material interactions that will be mapped
Note
The material interactions are assumed to have an associated surface ID

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().

+ Here is the call graph for this function:

void Acts::SurfaceMaterialMapper::resolveMaterialSurfaces ( State mState,
const TrackingVolume tVolume 
) const
private

finds all surfaces with ProtoSurfaceMaterial of a volume

Parameters
mStateThe state to be filled
tVolumeis 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().

+ Here is the call graph for this function:

Member Data Documentation

Config Acts::SurfaceMaterialMapper::m_cfg
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

std::unique_ptr<const Logger> Acts::SurfaceMaterialMapper::m_logger
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().

StraightLinePropagator Acts::SurfaceMaterialMapper::m_propagator
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


The documentation for this class was generated from the following files: