28 std::unique_ptr<const Acts::Logger> mlogger)
31 throw std::invalid_argument(
32 "DetectorVolumeBuilder: no external structure builder defined.");
40 std::vector<std::shared_ptr<DetectorVolume>> rootVolumes;
42 if (not
m_cfg.auxiliary.empty()) {
49 m_cfg.externalsBuilder->construct(gctx);
55 std::shared_ptr<DetectorVolume> dVolume =
nullptr;
57 if (
m_cfg.internalsBuilder ==
nullptr) {
66 auto [surfaces,
volumes, surfacesUpdator, volumeUpdator] =
67 m_cfg.internalsBuilder->construct(gctx);
70 if (
m_cfg.addInternalsToRoot) {
71 for (
const auto&
v : volumes) {
72 rootVolumes.push_back(
v);
78 surfaces, volumes,
std::move(volumeUpdator),
82 for (
auto [ip,
p] :
enumerate(dVolume->portalPtrs())) {
83 portalContainer[ip] =
p;
87 if (
m_cfg.geoIdGenerator !=
nullptr) {
88 ACTS_DEBUG(
"Assigning geometry ids to the detector volume");
89 auto cache =
m_cfg.geoIdGenerator->generateCache();
90 m_cfg.geoIdGenerator->assignGeometryId(cache, *dVolume);
94 rootVolumes.push_back(dVolume);