Analysis Software
Documentation for sPHENIX simulation software
|
#include <acts/blob/sPHENIX/Examples/Algorithms/Geant4/include/ActsExamples/Geant4/SensitiveSurfaceMapper.hpp>
Classes | |
struct | Config |
Configuration struct for the surface mapper. More... | |
Public Member Functions | |
SensitiveSurfaceMapper (const Config &cfg, std::unique_ptr< const Acts::Logger > logger=Acts::getDefaultLogger("SensitiveSurfaceMapper", Acts::Logging::INFO)) | |
~SensitiveSurfaceMapper ()=default | |
void | remapSensitiveNames (G4VPhysicalVolume *g4PhysicalVolume, const Acts::Transform3 &motherTransform, int &sCounter) const |
Static Public Attributes | |
static constexpr std::string_view | mappingPrefix = "ActsGeoID#" |
Protected Attributes | |
Config | m_cfg |
Configuration object. | |
Private Member Functions | |
const Acts::Logger & | logger () const |
Private access method to the logging instance. | |
Private Attributes | |
std::unique_ptr< const Acts::Logger > | m_logger |
The looging instance. | |
This Mapper takes a (non-const) Geant4 geometry and maps it such that name will be containing the mapping prefix and the Acts::GeometryIdentifier of the surface.
The mapping is done by matching the position of the G4 physical volume with the center position of an Acts::Surface.
This allows to directly associate Geant4 hits to the sensitive elements of the Acts::TrackingGeoemtry w/o map lookup.
Definition at line 35 of file SensitiveSurfaceMapper.hpp.
View newest version in sPHENIX GitHub at line 35 of file SensitiveSurfaceMapper.hpp
ActsExamples::SensitiveSurfaceMapper::SensitiveSurfaceMapper | ( | const Config & | cfg, |
std::unique_ptr< const Acts::Logger > | logger = Acts::getDefaultLogger("SensitiveSurfaceMapper", Acts::Logging::INFO) |
||
) |
Constructor with:
cfg | the configuration struct |
logger | the logging instance |
Definition at line 28 of file SensitiveSurfaceMapper.cpp.
View newest version in sPHENIX GitHub at line 28 of file SensitiveSurfaceMapper.cpp
References m_cfg, and ActsExamples::SensitiveSurfaceMapper::Config::trackingGeometry.
|
default |
|
inlineprivate |
Private access method to the logging instance.
Definition at line 78 of file SensitiveSurfaceMapper.hpp.
View newest version in sPHENIX GitHub at line 78 of file SensitiveSurfaceMapper.hpp
References m_logger.
void ActsExamples::SensitiveSurfaceMapper::remapSensitiveNames | ( | G4VPhysicalVolume * | g4PhysicalVolume, |
const Acts::Transform3 & | motherTransform, | ||
int & | sCounter | ||
) | const |
Recursive mapping function that walks through the Geant4 hierarchy and applies name remapping to the Physical volumes of the Geant4 geometry.
g4PhysicalVolume | the current physical volume in process |
motherPosition | the absolute position of the mother |
sCounter | a counter of how many volumes have been remapped |
Definition at line 36 of file SensitiveSurfaceMapper.cpp.
View newest version in sPHENIX GitHub at line 36 of file SensitiveSurfaceMapper.cpp
References ACTS_VERBOSE, Acts::GeometryObject::geometryId(), train_ambiguity_solver::id, m_cfg(), mappingPrefix, Acts::UnitConstants::mm, to_string(), Acts::Test::transform, translation(), and Acts::GeometryIdentifier::value().
Referenced by ActsExamples::Geant4Simulation::Geant4Simulation().
|
protected |
Configuration object.
Definition at line 74 of file SensitiveSurfaceMapper.hpp.
View newest version in sPHENIX GitHub at line 74 of file SensitiveSurfaceMapper.hpp
Referenced by SensitiveSurfaceMapper().
|
private |
The looging instance.
Definition at line 81 of file SensitiveSurfaceMapper.hpp.
View newest version in sPHENIX GitHub at line 81 of file SensitiveSurfaceMapper.hpp
Referenced by logger().
|
static |
Definition at line 37 of file SensitiveSurfaceMapper.hpp.
View newest version in sPHENIX GitHub at line 37 of file SensitiveSurfaceMapper.hpp
Referenced by remapSensitiveNames(), and ActsExamples::SensitiveSteppingAction::UserSteppingAction().