File GeometryIdGenerator.hpp
-
namespace Acts
Note
This file is foreseen for the
Geometry
module to replaceExtent
-
namespace Experimental
-
class GeometryIdGenerator : public Acts::Experimental::IGeometryIdGenerator
- #include <Acts/Detector/GeometryIdGenerator.hpp>
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.
Public Functions
-
inline GeometryIdGenerator(const Config &cfg, std::unique_ptr<const Logger> mlogger = getDefaultLogger("GeometryIdGenerator", Logging::INFO))
Constructor with config.
- Parameters
cfg – is the geometry configuration object
mlogger – is the logging instance
-
~GeometryIdGenerator() override = default
-
virtual void assignGeometryId(IGeometryIdGenerator::GeoIdCache &cache, DetectorVolume &dVolume) const final
Method for assigning a geometry id to a detector volume.
- Parameters
cache – is the cache object for e.g. object counting
dVolume – the detector volume to assign the geometry id to
-
virtual void assignGeometryId(IGeometryIdGenerator::GeoIdCache &cache, Portal &portal) const final
Method for assigning a geometry id to a portal.
- Parameters
cache – is the cache object for e.g. object counting
portal – the portal to assign the geometry id to
-
virtual void assignGeometryId(IGeometryIdGenerator::GeoIdCache &cache, Surface &surface) const final
Method for assigning a geometry id to a surface.
- Parameters
cache – is the cache object for e.g. object counting
surface – the surface to assign the geometry id to
-
virtual IGeometryIdGenerator::GeoIdCache generateCache() const final
Interface method to generata a geometry id cache.
- Returns
a geometry id cache decorated in a std::any object
Private Functions
-
GeometryIdentifier volumeId(Cache &cache, bool incrementLayer = true) const
Helper method to get the volume id from the cache.
- Parameters
cache – the provided cache
incrementLayer – if true, the layer counter is incremented
- Returns
a valid geometry identifier
Private Members
-
struct Cache
- #include <Acts/Detector/GeometryIdGenerator.hpp>
Nested cache struct.
Public Members
-
unsigned int layerCount = 0u
Cache count of the layer volume, for container mode.
-
unsigned int passiveCount = 0u
Cache count of passive surfaces.
-
unsigned int portalCount = 0u
Cache count of the portal surfaces.
-
unsigned int sensitiveCount = 0u
Cache count of sensitive surfaces.
-
unsigned int volumeCount = 0u
Cache count of the volume, for non-container mode.
-
unsigned int layerCount = 0u
-
struct Config
- #include <Acts/Detector/GeometryIdGenerator.hpp>
Nested config struct.
Public Members
-
unsigned int containerId = 0u
Container id (if container mode), will not be incremented.
-
bool containerMode = false
Container mode.
-
bool overrideExistingIds = false
Force override existing ids.
-
bool resetSubCounters = true
Resetting mode.
-
unsigned int containerId = 0u
-
inline GeometryIdGenerator(const Config &cfg, std::unique_ptr<const Logger> mlogger = getDefaultLogger("GeometryIdGenerator", Logging::INFO))
-
class GeometryIdGenerator : public Acts::Experimental::IGeometryIdGenerator
-
namespace Experimental