Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Acts::Experimental::GeometryIdGenerator Exception Referencefinal

This is the default implementation of the geometry id generator. More...

#include <acts/blob/sPHENIX/Core/include/Acts/Detector/GeometryIdGenerator.hpp>

+ Inheritance diagram for Acts::Experimental::GeometryIdGenerator:
+ Collaboration diagram for Acts::Experimental::GeometryIdGenerator:

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 Loggerlogger () const
 Private access method to the logger.
 

Private Attributes

Config m_cfg
 Configuration object.
 
std::unique_ptr< const Loggerm_logger
 logging instance
 

Additional Inherited Members

- Public Types inherited from Acts::Experimental::IGeometryIdGenerator
using GeoIdCache = std::any
 

Detailed Description

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

Constructor & Destructor Documentation

Acts::Experimental::GeometryIdGenerator::GeometryIdGenerator ( const Config cfg,
std::unique_ptr< const Logger mlogger = getDefaultLogger(                          "GeometryIdGenerator", Logging::INFO) 
)
inline

Constructor with config.

Parameters
cfgis the geometry configuration object
mloggeris the logging instance

Definition at line 73 of file GeometryIdGenerator.hpp.

View newest version in sPHENIX GitHub at line 73 of file GeometryIdGenerator.hpp

Acts::Experimental::GeometryIdGenerator::~GeometryIdGenerator ( )
overridedefault

Member Function Documentation

void Acts::Experimental::GeometryIdGenerator::assignGeometryId ( IGeometryIdGenerator::GeoIdCache cache,
DetectorVolume dVolume 
) const
finalvirtual

Method for assigning a geometry id to a detector volume.

Parameters
cacheis the cache object for e.g. object counting
dVolumethe 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().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void Acts::Experimental::GeometryIdGenerator::assignGeometryId ( IGeometryIdGenerator::GeoIdCache cache,
Portal portal 
) const
finalvirtual

Method for assigning a geometry id to a portal.

Parameters
cacheis the cache object for e.g. object counting
portalthe 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().

+ Here is the call graph for this function:

void Acts::Experimental::GeometryIdGenerator::assignGeometryId ( IGeometryIdGenerator::GeoIdCache cache,
Surface surface 
) const
finalvirtual

Method for assigning a geometry id to a surface.

Parameters
cacheis the cache object for e.g. object counting
surfacethe 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().

+ Here is the call graph for this function:

Acts::Experimental::IGeometryIdGenerator::GeoIdCache Acts::Experimental::GeometryIdGenerator::generateCache ( ) const
finalvirtual

Interface method to generata a geometry id cache.

Returns
a geometry id cache decorated in a std::any object

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

+ Here is the caller graph for this function:

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

Acts::GeometryIdentifier Acts::Experimental::GeometryIdGenerator::volumeId ( Cache cache,
bool  incrementLayer = true 
) const
private

Helper method to get the volume id from the cache.

Parameters
cachethe provided cache
incrementLayerif true, the layer counter is incremented
Returns
a valid geometry identifier

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.

+ Here is the call graph for this function:

Member Data Documentation

Config Acts::Experimental::GeometryIdGenerator::m_cfg
private

Configuration object.

Definition at line 115 of file GeometryIdGenerator.hpp.

View newest version in sPHENIX GitHub at line 115 of file GeometryIdGenerator.hpp

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


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