Analysis Software
Documentation for sPHENIX simulation software
|
This is the default implementation of the geometry id generator. More...
#include <acts/blob/sPHENIX/Core/include/Acts/Detector/GeometryIdGenerator.hpp>
Classes | |
struct | Cache |
Nested cache struct. More... | |
struct | Config |
Nested config struct. More... | |
Public Member Functions | |
GeometryIdGenerator (const Config &cfg, std::unique_ptr< const Logger > mlogger=getDefaultLogger("GeometryIdGenerator", Logging::INFO)) | |
Constructor with config. | |
~GeometryIdGenerator () override=default | |
IGeometryIdGenerator::GeoIdCache | generateCache () const final |
Interface method to generata a geometry id cache. | |
void | assignGeometryId (IGeometryIdGenerator::GeoIdCache &cache, DetectorVolume &dVolume) const final |
Method for assigning a geometry id to a detector volume. | |
void | assignGeometryId (IGeometryIdGenerator::GeoIdCache &cache, Portal &portal) const final |
Method for assigning a geometry id to a portal. | |
void | assignGeometryId (IGeometryIdGenerator::GeoIdCache &cache, Surface &surface) const final |
Method for assigning a geometry id to a surface. | |
Public Member Functions inherited from Acts::Experimental::IGeometryIdGenerator | |
virtual | ~IGeometryIdGenerator ()=default |
Private Member Functions | |
GeometryIdentifier | volumeId (Cache &cache, bool incrementLayer=true) const |
Helper method to get the volume id from the cache. | |
const Logger & | logger () const |
Private access method to the logger. | |
Private Attributes | |
Config | m_cfg |
Configuration object. | |
std::unique_ptr< const Logger > | m_logger |
logging instance | |
Additional Inherited Members | |
Public Types inherited from Acts::Experimental::IGeometryIdGenerator | |
using | GeoIdCache = std::any |
This is the default implementation of the geometry id generator.
It is a simple counter based generator that assigns ids to the geometry and increments the counter for each object type.
Sub counters, i.e. for the sensitive surfaces, are reset after the volume call, such that a new volume or layer volume would start from counter 0 again.
If the generator is configured to override existing ids, it will do so and not respect previously assigned ids.
If the generator is configured in container mode, it will increase the layer id for each layer volume with confined surfaces.
Definition at line 41 of file GeometryIdGenerator.hpp.
View newest version in sPHENIX GitHub at line 41 of file GeometryIdGenerator.hpp
|
inline |
Constructor with config.
cfg | is the geometry configuration object |
mlogger | is the logging instance |
Definition at line 73 of file GeometryIdGenerator.hpp.
View newest version in sPHENIX GitHub at line 73 of file GeometryIdGenerator.hpp
|
overridedefault |
|
finalvirtual |
Method for assigning a geometry id to a detector volume.
cache | is the cache object for e.g. object counting |
dVolume | the detector volume to assign the geometry id to |
Implements Acts::Experimental::IGeometryIdGenerator.
Definition at line 20 of file GeometryIdGenerator.cpp.
View newest version in sPHENIX GitHub at line 20 of file GeometryIdGenerator.cpp
References Acts::ACTS_VERBOSE(), Acts::Experimental::DetectorVolume::assignGeometryId(), Acts::Experimental::DetectorVolume::geometryId(), m_cfg(), Acts::Experimental::DetectorVolume::name(), Acts::Experimental::DetectorVolume::portalPtrs(), writeMapConfig::surface, Acts::Experimental::DetectorVolume::surfacePtrs(), physmon_ckf_tracking::u, Acts::GeometryIdentifier::volume(), and Acts::Experimental::DetectorVolume::volumePtrs().
Referenced by BOOST_AUTO_TEST_CASE().
|
finalvirtual |
Method for assigning a geometry id to a portal.
cache | is the cache object for e.g. object counting |
portal | the portal to assign the geometry id to |
Implements Acts::Experimental::IGeometryIdGenerator.
Definition at line 52 of file GeometryIdGenerator.cpp.
View newest version in sPHENIX GitHub at line 52 of file GeometryIdGenerator.cpp
References Acts::ACTS_VERBOSE(), m_cfg(), pSurface, Acts::GeometryIdentifier::setBoundary(), and Acts::Experimental::Portal::surface().
|
finalvirtual |
Method for assigning a geometry id to a surface.
cache | is the cache object for e.g. object counting |
surface | the surface to assign the geometry id to |
Implements Acts::Experimental::IGeometryIdGenerator.
Definition at line 65 of file GeometryIdGenerator.cpp.
View newest version in sPHENIX GitHub at line 65 of file GeometryIdGenerator.cpp
References Acts::ACTS_VERBOSE(), Acts::GeometryObject::assignGeometryId(), Acts::Surface::associatedDetectorElement(), Acts::GeometryObject::geometryId(), and m_cfg().
|
finalvirtual |
Interface method to generata a geometry id cache.
Implements Acts::Experimental::IGeometryIdGenerator.
Definition at line 16 of file GeometryIdGenerator.cpp.
View newest version in sPHENIX GitHub at line 16 of file GeometryIdGenerator.cpp
Referenced by BOOST_AUTO_TEST_CASE().
|
inlineprivate |
Private access method to the logger.
Definition at line 118 of file GeometryIdGenerator.hpp.
View newest version in sPHENIX GitHub at line 118 of file GeometryIdGenerator.hpp
References m_logger.
|
private |
Helper method to get the volume id from the cache.
cache | the provided cache |
incrementLayer | if true, the layer counter is incremented |
Definition at line 92 of file GeometryIdGenerator.cpp.
View newest version in sPHENIX GitHub at line 92 of file GeometryIdGenerator.cpp
References Acts::ACTS_VERBOSE(), Acts::Experimental::GeometryIdGenerator::Cache::layerCount, m_cfg(), Acts::GeometryIdentifier::setLayer(), Acts::GeometryIdentifier::setVolume(), physmon_ckf_tracking::u, and Acts::Experimental::GeometryIdGenerator::Cache::volumeCount.
|
private |
Configuration object.
Definition at line 115 of file GeometryIdGenerator.hpp.
View newest version in sPHENIX GitHub at line 115 of file GeometryIdGenerator.hpp
|
private |
logging instance
Definition at line 121 of file GeometryIdGenerator.hpp.
View newest version in sPHENIX GitHub at line 121 of file GeometryIdGenerator.hpp
Referenced by logger().