22 auto& ccache = std::any_cast<
Cache&>(cache);
35 [&](
auto& portal) { assignGeometryId(cache, *portal); });
41 if (
m_cfg.resetSubCounters) {
42 ccache.portalCount = 0
u;
43 ccache.sensitiveCount = 0
u;
44 ccache.passiveCount = 0
u;
49 [&](
auto& volume) { assignGeometryId(cache, *volume); });
54 auto& ccache = std::any_cast<
Cache&>(cache);
57 if (pSurface.geometryId().boundary() == 0 or
m_cfg.overrideExistingIds) {
60 ACTS_VERBOSE(
"Assigning portal id " << ccache.portalCount);
61 pSurface.assignGeometryId(geoID);
67 auto& ccache = std::any_cast<
Cache&>(cache);
70 auto geoID = volumeId(ccache,
false);
71 if (not
m_cfg.overrideExistingIds and rGeoID.value() != 0) {
73 }
else if ((rGeoID.sensitive() == 0 and rGeoID.passive() == 0) or
74 m_cfg.overrideExistingIds) {
76 geoID.setSensitive(++ccache.sensitiveCount);
77 ACTS_VERBOSE(
"Assigning sensitive id " << ccache.sensitiveCount);
79 ACTS_VERBOSE(
"Assigning passive id " << ccache.passiveCount);
80 geoID.setPassive(++ccache.passiveCount);
83 }
else if (rGeoID.sensitive() != 0 or rGeoID.passive() != 0) {
85 "Surface already has a geometry id, only setting volume and layer id.");
86 rGeoID.setVolume(geoID.volume());
87 rGeoID.setLayer(geoID.layer());
93 Cache& cache,
bool incrementLayer)
const {
95 if (not
m_cfg.containerMode) {