From b30f67871d0cf4ece60824ef971d4049e3417fd9 Mon Sep 17 00:00:00 2001 From: Andreas Stefl Date: Fri, 21 Jul 2023 11:24:29 +0200 Subject: [PATCH] refactor: Brush over new detector geometry part 1 (#2309) - consistent pass by value - reformat documentation pull changes out of https://github.com/acts-project/acts/pull/2214 --- Core/include/Acts/Detector/Detector.hpp | 13 +++--- Core/include/Acts/Detector/DetectorVolume.hpp | 36 +++++++-------- Core/include/Acts/Detector/Portal.hpp | 11 +++-- .../Acts/Navigation/DetectorVolumeFinders.hpp | 2 +- .../Navigation/DetectorVolumeUpdators.hpp | 2 +- .../Acts/Navigation/NavigationState.hpp | 2 +- .../include/Acts/Navigation/NextNavigator.hpp | 8 ++-- Core/src/Detector/Detector.cpp | 19 ++++---- Core/src/Detector/DetectorVolume.cpp | 40 ++++++++--------- Core/src/Detector/LayerStructureBuilder.cpp | 9 ++-- Core/src/Detector/Portal.cpp | 12 ++--- docs/core/experimental_geometry.md | 45 +++++++++---------- 12 files changed, 99 insertions(+), 100 deletions(-) diff --git a/Core/include/Acts/Detector/Detector.hpp b/Core/include/Acts/Detector/Detector.hpp index 6f868825bbf..7c9aaf99e02 100644 --- a/Core/include/Acts/Detector/Detector.hpp +++ b/Core/include/Acts/Detector/Detector.hpp @@ -37,16 +37,16 @@ class Detector : public std::enable_shared_from_this { /// @note will throw an exception if volumes vector is empty /// @note will throw an exception if duplicate volume names exist /// @note will throw an exception if the delegate is not connected - Detector(const std::string& name, + Detector(std::string name, std::vector> rootVolumes, - DetectorVolumeUpdator&& detectorVolumeUpdator) noexcept(false); + DetectorVolumeUpdator detectorVolumeUpdator) noexcept(false); public: /// Factory for producing memory managed instances of Detector. static std::shared_ptr makeShared( - const std::string& name, + std::string name, std::vector> rootVolumes, - DetectorVolumeUpdator&& detectorVolumeUpdator); + DetectorVolumeUpdator detectorVolumeUpdator); /// Retrieve a @c std::shared_ptr for this surface (non-const version) /// @@ -119,8 +119,7 @@ class Detector : public std::enable_shared_from_this { /// Update the volume finder /// /// @param detectorVolumeUpdator the new volume finder - void updateDetectorVolumeFinder( - DetectorVolumeUpdator&& detectorVolumeUpdator); + void updateDetectorVolumeFinder(DetectorVolumeUpdator detectorVolumeUpdator); /// Const access to the volume finder const DetectorVolumeUpdator& detectorVolumeFinder() const; @@ -130,7 +129,7 @@ class Detector : public std::enable_shared_from_this { private: /// Name of the detector - std::string m_name = "Unnamed"; + std::string m_name; /// Root volumes DetectorVolume::ObjectStore> m_rootVolumes; diff --git a/Core/include/Acts/Detector/DetectorVolume.hpp b/Core/include/Acts/Detector/DetectorVolume.hpp index db49f826a5d..e10e456c491 100644 --- a/Core/include/Acts/Detector/DetectorVolume.hpp +++ b/Core/include/Acts/Detector/DetectorVolume.hpp @@ -106,12 +106,12 @@ class DetectorVolume : public std::enable_shared_from_this { /// @note throws exception if ghe portal general or navigation /// state updator delegates are not connected DetectorVolume( - const GeometryContext& gctx, const std::string& name, + const GeometryContext& gctx, std::string name, const Transform3& transform, std::shared_ptr bounds, std::vector> surfaces, std::vector> volumes, - DetectorVolumeUpdator&& detectorVolumeUpdator, - SurfaceCandidatesUpdator&& surfaceCandidateUpdator) noexcept(false); + DetectorVolumeUpdator detectorVolumeUpdator, + SurfaceCandidatesUpdator surfaceCandidateUpdator) noexcept(false); /// Create a detector volume - empty/gap volume constructor /// @@ -125,28 +125,28 @@ class DetectorVolume : public std::enable_shared_from_this { /// @note throws exception if ghe portal general or navigation /// state updator delegates are not connected DetectorVolume( - const GeometryContext& gctx, const std::string& name, + const GeometryContext& gctx, std::string name, const Transform3& transform, std::shared_ptr bounds, - SurfaceCandidatesUpdator&& surfaceCandidateUpdator) noexcept(false); + SurfaceCandidatesUpdator surfaceCandidateUpdator) noexcept(false); /// Factory method for producing memory managed instances of DetectorVolume. /// /// @note This is called by the @class DetectorVolumeFactory static std::shared_ptr makeShared( - const GeometryContext& gctx, const std::string& name, + const GeometryContext& gctx, std::string name, const Transform3& transform, std::shared_ptr bounds, std::vector> surfaces, std::vector> volumes, - DetectorVolumeUpdator&& detectorVolumeUpdator, - SurfaceCandidatesUpdator&& surfaceCandidateUpdator); + DetectorVolumeUpdator detectorVolumeUpdator, + SurfaceCandidatesUpdator surfaceCandidateUpdator); /// Factory method for producing memory managed instances of DetectorVolume. /// /// @note This is called by the @class DetectorVolumeFactory static std::shared_ptr makeShared( - const GeometryContext& gctx, const std::string& name, + const GeometryContext& gctx, std::string name, const Transform3& transform, std::shared_ptr bounds, - SurfaceCandidatesUpdator&& surfaceCandidateUpdator); + SurfaceCandidatesUpdator surfaceCandidateUpdator); public: /// Retrieve a @c std::shared_ptr for this surface (non-const version) @@ -290,7 +290,7 @@ class DetectorVolume : public std::enable_shared_from_this { /// @param volumes the volumes the new navigation state updator points to /// void assignSurfaceCandidatesUpdator( - SurfaceCandidatesUpdator&& surfaceCandidateUpdator, + SurfaceCandidatesUpdator surfaceCandidateUpdator, const std::vector>& surfaces = {}, const std::vector>& volumes = {}); @@ -409,8 +409,8 @@ class DetectorVolumeFactory { std::shared_ptr bounds, const std::vector>& surfaces, const std::vector>& volumes, - DetectorVolumeUpdator&& detectorVolumeUpdator, - SurfaceCandidatesUpdator&& surfaceCandidateUpdator) { + DetectorVolumeUpdator detectorVolumeUpdator, + SurfaceCandidatesUpdator surfaceCandidateUpdator) { auto dVolume = DetectorVolume::makeShared( gctx, name, transform, std::move(bounds), surfaces, volumes, std::move(detectorVolumeUpdator), std::move(surfaceCandidateUpdator)); @@ -421,12 +421,12 @@ class DetectorVolumeFactory { /// Create a detector volume - from factory static std::shared_ptr construct( const PortalGenerator& portalGenerator, const GeometryContext& gctx, - const std::string& name, const Transform3& transform, + std::string name, const Transform3& transform, std::shared_ptr bounds, - SurfaceCandidatesUpdator&& surfaceCandidateUpdator) { - auto dVolume = - DetectorVolume::makeShared(gctx, name, transform, std::move(bounds), - std::move(surfaceCandidateUpdator)); + SurfaceCandidatesUpdator surfaceCandidateUpdator) { + auto dVolume = DetectorVolume::makeShared( + gctx, std::move(name), transform, std::move(bounds), + std::move(surfaceCandidateUpdator)); dVolume->construct(gctx, portalGenerator); return dVolume; } diff --git a/Core/include/Acts/Detector/Portal.hpp b/Core/include/Acts/Detector/Portal.hpp index 30ffaa9d020..351f1014924 100644 --- a/Core/include/Acts/Detector/Portal.hpp +++ b/Core/include/Acts/Detector/Portal.hpp @@ -125,8 +125,8 @@ class Portal : public std::enable_shared_from_this { /// /// @note this overwrites the existing link void assignDetectorVolumeUpdator( - Direction dir, DetectorVolumeUpdator&& dVolumeUpdator, - const std::vector>& attachedVolumes); + Direction dir, DetectorVolumeUpdator dVolumeUpdator, + std::vector> attachedVolumes); /// Update the volume link, w/o directive, i.e. it relies that there's only /// one remaining link to be set, throws an exception if that's not the case @@ -135,10 +135,9 @@ class Portal : public std::enable_shared_from_this { /// @param attachedVolumes is the list of attached volumes for book keeping /// /// @note this overwrites the existing link - void assignDetectorVolumeUpdator( - DetectorVolumeUpdator&& dVolumeUpdator, - const std::vector>& - attachedVolumes) noexcept(false); + void assignDetectorVolumeUpdator(DetectorVolumeUpdator dVolumeUpdator, + std::vector> + attachedVolumes) noexcept(false); // Access to the portal targets: opposite/along normal vector const DetectorVolumeUpdators& detectorVolumeUpdators() const; diff --git a/Core/include/Acts/Navigation/DetectorVolumeFinders.hpp b/Core/include/Acts/Navigation/DetectorVolumeFinders.hpp index f7a204b0fa0..31ca77bf9db 100644 --- a/Core/include/Acts/Navigation/DetectorVolumeFinders.hpp +++ b/Core/include/Acts/Navigation/DetectorVolumeFinders.hpp @@ -18,7 +18,7 @@ #include "Acts/Utilities/detail/Axis.hpp" #include "Acts/Utilities/detail/Grid.hpp" -#include +#include namespace Acts { namespace Experimental { diff --git a/Core/include/Acts/Navigation/DetectorVolumeUpdators.hpp b/Core/include/Acts/Navigation/DetectorVolumeUpdators.hpp index 5b4343311b7..8260f1bd67d 100644 --- a/Core/include/Acts/Navigation/DetectorVolumeUpdators.hpp +++ b/Core/include/Acts/Navigation/DetectorVolumeUpdators.hpp @@ -16,7 +16,7 @@ #include "Acts/Utilities/detail/Axis.hpp" #include "Acts/Utilities/detail/Grid.hpp" -#include +#include namespace Acts { namespace Experimental { diff --git a/Core/include/Acts/Navigation/NavigationState.hpp b/Core/include/Acts/Navigation/NavigationState.hpp index 0e924004ca0..c63692150c0 100644 --- a/Core/include/Acts/Navigation/NavigationState.hpp +++ b/Core/include/Acts/Navigation/NavigationState.hpp @@ -80,7 +80,7 @@ struct NavigationState { /// That are the candidate surfaces to process SurfaceCandidates surfaceCandidates = {}; - SurfaceCandidates::iterator surfaceCandidate = surfaceCandidates.end(); + SurfaceCandidates::const_iterator surfaceCandidate = surfaceCandidates.cend(); /// Boundary directives for surfaces BoundaryCheck surfaceBoundaryCheck = true; diff --git a/Core/include/Acts/Navigation/NextNavigator.hpp b/Core/include/Acts/Navigation/NextNavigator.hpp index ce774dedd02..11336c1080f 100644 --- a/Core/include/Acts/Navigation/NextNavigator.hpp +++ b/Core/include/Acts/Navigation/NextNavigator.hpp @@ -195,20 +195,20 @@ class NextNavigator { << posInfo(state, stepper) << "stepping through portal"); nState.surfaceCandidates.clear(); - nState.surfaceCandidate = nState.surfaceCandidates.end(); + nState.surfaceCandidate = nState.surfaceCandidates.cend(); nState.currentPortal->updateDetectorVolume(state.geoContext, nState); initializeTarget(state, stepper); } - for (; nState.surfaceCandidate != nState.surfaceCandidates.end(); + for (; nState.surfaceCandidate != nState.surfaceCandidates.cend(); ++nState.surfaceCandidate) { // Screen output how much is left to try ACTS_VERBOSE(volInfo(state) << posInfo(state, stepper) << std::distance(nState.surfaceCandidate, - nState.surfaceCandidates.end()) + nState.surfaceCandidates.cend()) << " out of " << nState.surfaceCandidates.size() << " surfaces remain to try."); // Take the surface @@ -262,7 +262,7 @@ class NextNavigator { return; } - if (nState.surfaceCandidate == nState.surfaceCandidates.end()) { + if (nState.surfaceCandidate == nState.surfaceCandidates.cend()) { ACTS_VERBOSE(volInfo(state) << posInfo(state, stepper) << "no surface candidates - waiting for target call"); diff --git a/Core/src/Detector/Detector.cpp b/Core/src/Detector/Detector.cpp index 32d79803038..5f2ba3df44b 100644 --- a/Core/src/Detector/Detector.cpp +++ b/Core/src/Detector/Detector.cpp @@ -17,10 +17,9 @@ #include Acts::Experimental::Detector::Detector( - const std::string& name, - std::vector> rootVolumes, - DetectorVolumeUpdator&& detectorVolumeUpdator) - : m_name(name), + std::string name, std::vector> rootVolumes, + DetectorVolumeUpdator detectorVolumeUpdator) + : m_name(std::move(name)), m_rootVolumes(std::move(rootVolumes)), m_detectorVolumeUpdator(std::move(detectorVolumeUpdator)) { if (m_rootVolumes.internal.empty()) { @@ -67,11 +66,11 @@ Acts::Experimental::Detector::Detector( std::shared_ptr Acts::Experimental::Detector::makeShared( - const std::string& name, - std::vector> rootVolumes, - DetectorVolumeUpdator&& detectorVolumeUpdator) { - return std::shared_ptr(new Detector( - name, std::move(rootVolumes), std::move(detectorVolumeUpdator))); + std::string name, std::vector> rootVolumes, + DetectorVolumeUpdator detectorVolumeUpdator) { + return std::shared_ptr( + new Detector(std::move(name), std::move(rootVolumes), + std::move(detectorVolumeUpdator))); } std::vector>& @@ -95,7 +94,7 @@ Acts::Experimental::Detector::volumes() const { } void Acts::Experimental::Detector::updateDetectorVolumeFinder( - DetectorVolumeUpdator&& detectorVolumeUpdator) { + DetectorVolumeUpdator detectorVolumeUpdator) { m_detectorVolumeUpdator = std::move(detectorVolumeUpdator); } diff --git a/Core/src/Detector/DetectorVolume.cpp b/Core/src/Detector/DetectorVolume.cpp index 450efee538e..e087ba9ac57 100644 --- a/Core/src/Detector/DetectorVolume.cpp +++ b/Core/src/Detector/DetectorVolume.cpp @@ -27,13 +27,13 @@ class IVolumeMaterial; } // namespace Acts Acts::Experimental::DetectorVolume::DetectorVolume( - const GeometryContext& gctx, const std::string& name, - const Transform3& transform, std::shared_ptr bounds, + const GeometryContext& gctx, std::string name, const Transform3& transform, + std::shared_ptr bounds, std::vector> surfaces, std::vector> volumes, - DetectorVolumeUpdator&& detectorVolumeUpdator, - SurfaceCandidatesUpdator&& surfaceCandidateUpdator) - : m_name(name), + DetectorVolumeUpdator detectorVolumeUpdator, + SurfaceCandidatesUpdator surfaceCandidateUpdator) + : m_name(std::move(name)), m_transform(transform), m_bounds(std::move(bounds)), m_surfaces(std::move(surfaces)), @@ -59,33 +59,33 @@ Acts::Experimental::DetectorVolume::DetectorVolume( } Acts::Experimental::DetectorVolume::DetectorVolume( - const GeometryContext& gctx, const std::string& name, - const Transform3& transform, std::shared_ptr bounds, - SurfaceCandidatesUpdator&& surfaceCandidateUpdator) - : DetectorVolume(gctx, name, transform, std::move(bounds), {}, {}, - tryNoVolumes(), std::move(surfaceCandidateUpdator)) {} + const GeometryContext& gctx, std::string name, const Transform3& transform, + std::shared_ptr bounds, + SurfaceCandidatesUpdator surfaceCandidateUpdator) + : DetectorVolume(gctx, std::move(name), transform, std::move(bounds), {}, + {}, tryNoVolumes(), std::move(surfaceCandidateUpdator)) {} std::shared_ptr Acts::Experimental::DetectorVolume::makeShared( - const GeometryContext& gctx, const std::string& name, - const Transform3& transform, std::shared_ptr bounds, + const GeometryContext& gctx, std::string name, const Transform3& transform, + std::shared_ptr bounds, std::vector> surfaces, std::vector> volumes, - DetectorVolumeUpdator&& detectorVolumeUpdator, - SurfaceCandidatesUpdator&& surfaceCandidateUpdator) { + DetectorVolumeUpdator detectorVolumeUpdator, + SurfaceCandidatesUpdator surfaceCandidateUpdator) { return std::shared_ptr(new DetectorVolume( - gctx, name, transform, std::move(bounds), std::move(surfaces), + gctx, std::move(name), transform, std::move(bounds), std::move(surfaces), std::move(volumes), std::move(detectorVolumeUpdator), std::move(surfaceCandidateUpdator))); } std::shared_ptr Acts::Experimental::DetectorVolume::makeShared( - const GeometryContext& gctx, const std::string& name, - const Transform3& transform, std::shared_ptr bounds, - SurfaceCandidatesUpdator&& surfaceCandidateUpdator) { + const GeometryContext& gctx, std::string name, const Transform3& transform, + std::shared_ptr bounds, + SurfaceCandidatesUpdator surfaceCandidateUpdator) { return std::shared_ptr( - new DetectorVolume(gctx, name, transform, std::move(bounds), + new DetectorVolume(gctx, std::move(name), transform, std::move(bounds), std::move(surfaceCandidateUpdator))); } @@ -239,7 +239,7 @@ void Acts::Experimental::DetectorVolume::updateNavigationState( } void Acts::Experimental::DetectorVolume::assignSurfaceCandidatesUpdator( - SurfaceCandidatesUpdator&& surfaceCandidateUpdator, + SurfaceCandidatesUpdator surfaceCandidateUpdator, const std::vector>& surfaces, const std::vector>& volumes) { m_surfaceCandidatesUpdator = std::move(surfaceCandidateUpdator); diff --git a/Core/src/Detector/LayerStructureBuilder.cpp b/Core/src/Detector/LayerStructureBuilder.cpp index d394d78b2da..bdd19929bf4 100644 --- a/Core/src/Detector/LayerStructureBuilder.cpp +++ b/Core/src/Detector/LayerStructureBuilder.cpp @@ -51,8 +51,8 @@ namespace { template Acts::Experimental::SurfaceCandidatesUpdator createUpdator( const Acts::GeometryContext& gctx, - const std::vector>& lSurfaces, - const std::vector& assignToAll, + std::vector> lSurfaces, + std::vector assignToAll, const Acts::Experimental::ProtoBinning& binning) { // The surface candidate updator & a generator for polyhedrons Acts::Experimental::SurfaceCandidatesUpdator sfCandidates; @@ -60,7 +60,10 @@ Acts::Experimental::SurfaceCandidatesUpdator createUpdator( // Indexed Surface generator for this case Acts::Experimental::detail::IndexedSurfacesGenerator< decltype(lSurfaces), Acts::Experimental::IndexedSurfacesImpl> - isg{lSurfaces, assignToAll, {binning.binValue}, {binning.expansion}}; + isg{std::move(lSurfaces), + std::move(assignToAll), + {binning.binValue}, + {binning.expansion}}; if (binning.axisType == Acts::detail::AxisType::Equidistant) { // Equidistant Acts::Experimental::detail::GridAxisGenerators::Eq aGenerator{ diff --git a/Core/src/Detector/Portal.cpp b/Core/src/Detector/Portal.cpp index bae143ea1fe..d263c22c7fa 100644 --- a/Core/src/Detector/Portal.cpp +++ b/Core/src/Detector/Portal.cpp @@ -91,16 +91,16 @@ void Acts::Experimental::Portal::fuse(std::shared_ptr& other) { } void Acts::Experimental::Portal::assignDetectorVolumeUpdator( - Direction dir, DetectorVolumeUpdator&& dVolumeUpdator, - const std::vector>& attachedVolumes) { + Direction dir, DetectorVolumeUpdator dVolumeUpdator, + std::vector> attachedVolumes) { auto idx = dir.index(); m_volumeUpdators[idx] = std::move(dVolumeUpdator); - m_attachedVolumes[idx] = attachedVolumes; + m_attachedVolumes[idx] = std::move(attachedVolumes); } void Acts::Experimental::Portal::assignDetectorVolumeUpdator( - DetectorVolumeUpdator&& dVolumeUpdator, - const std::vector>& attachedVolumes) { + DetectorVolumeUpdator dVolumeUpdator, + std::vector> attachedVolumes) { // Check and throw exceptions if (not m_volumeUpdators[0u].connected() and not m_volumeUpdators[1u].connected()) { @@ -111,7 +111,7 @@ void Acts::Experimental::Portal::assignDetectorVolumeUpdator( } size_t idx = m_volumeUpdators[0u].connected() ? 1u : 0u; m_volumeUpdators[idx] = std::move(dVolumeUpdator); - m_attachedVolumes[idx] = attachedVolumes; + m_attachedVolumes[idx] = std::move(attachedVolumes); } void Acts::Experimental::Portal::updateDetectorVolume( diff --git a/docs/core/experimental_geometry.md b/docs/core/experimental_geometry.md index 5fb1f569132..e0e2f0eb67f 100644 --- a/docs/core/experimental_geometry.md +++ b/docs/core/experimental_geometry.md @@ -12,33 +12,32 @@ This module is in production and is under the namespace `Acts::Experimental`. The entire geometry setup is based on the following geometry objects -* {class}`Acts::Surface` describing any bound surface object -* {class}`Acts::Experimental::Portal` which holds a surface and adds information about attached volumes -* {class}`Acts::Experimental::DetectorVolume` which is bound by portals and can contain surfaces and other volumes -* {class}`Acts::Experimental::Detector` which is the top level object holding all detector relevant objects +- {class}`Acts::Surface` describing any bound surface object +- {class}`Acts::Experimental::Portal` which holds a surface and adds information about attached volumes +- {class}`Acts::Experimental::DetectorVolume` which is bound by portals and can contain surfaces and other volumes +- {class}`Acts::Experimental::Detector` which is the top level object holding all detector relevant objects ### Memory management, access and const correctness -All geometric objects can only be constructed as ```std::shared_ptr``` via dedicated ```Object::makeShared(...)`` factories. +All geometric objects can only be constructed as `std::shared_ptr` via dedicated `Object::makeShared(...)` factories. Internally, all constituents are stored as non-const objects and can be accessed as such as long as the geometry is not locked, and the holder object is also a non-const object. -While objects may be stored as ```std::shared_ptr``` internally, their access during navigation is given either to const references (if guaranteed to be existent) or const raw pointers (if optional or part of a polymorphic container). +While objects may be stored as `std::shared_ptr` internally, their access during navigation is given either to const references (if guaranteed to be existent) or const raw pointers (if optional or part of a polymorphic container). ### Navigation state and delegates A struct {class}`Acts::Experimental::NavigationState` holds the current navigation information through the geometry, which comprises of -* the current {class}`Acts::Experimental::DetectorVolume` in associated with the position within the detector, called `currentVolume` -* a list of portal candidates to leave the `currentVolume` -* a list of surface candidates to be tested within the `currentVolume` -* a current position, direction, momentum, charge and magnetic field +- the current {class}`Acts::Experimental::DetectorVolume` in associated with the position within the detector, called `currentVolume` +- a list of portal candidates to leave the `currentVolume` +- a list of surface candidates to be tested within the `currentVolume` +- a current position, direction, momentum, charge and magnetic field Several navigation delegates built upon the {class}`Acts::Delegate` template class are defined and can be adapted and specialized for dedicated detector layouts. These delegates are called: -* `Acts::Experimental::SurfaceCandidatesUpdator` that is called for updating the information at initialization, within the volume or at a volume switch caused by traversing a portal -* `Acts::Experimental::DetectorVolumeUpdator` which is attached to a {class}`Acts::Experimental::Portal` and switches to a new volume environment when traversing a portal -* `Acts::Experimental::DetectorVolumeFinder` which allows to find a volume by simple a global position (and is usually only needed at initialization of the navigation) +- `Acts::Experimental::SurfaceCandidatesDelegate` that is called for updating the information at initialization, within the volume or at a volume switch caused by traversing a portal +- `Acts::Experimental::DetectorVolumeFinder` which allows to find a volume by global position (and is usually only needed at initialization of the navigation) and which is attached to a {class}`Acts::Experimental::Portal` to switch volumes when traversing a portal ## Detailed Description @@ -66,9 +65,9 @@ The implementation of a unique, binned or any other volume link can be adapted t A detector volume has to contain: -* a list of bounding portal objects (that can be shared with other volumes) -* a navigation state updator as a `Acts::Experimental::SurfaceCandidatesUpdator` delegate, that at minimum is able to provide the portal surfaces for leaving the volume again. -* a unique name string +- a list of bounding portal objects (that can be shared with other volumes) +- a navigation state updator as a `Acts::Experimental::SurfaceCandidatesUpdator` delegate, that at minimum is able to provide the portal surfaces for leaving the volume again. +- a unique name string :::{note} When constructing a detector volume one has to use a dedicated {class}`Acts::Experimental::DetectorVolumeFactory` that is provided with a portal generator which allows to generate the portals and set the (yet) existing links appropriately. @@ -76,9 +75,9 @@ When constructing a detector volume one has to use a dedicated {class}`Acts::Exp Additionally, it can contain: -* an optional collection of contained surfaces which can describe sensitive surfaces or passive surfaces (e.g. for material integration) -* an optional collection of contained volumes which describe sub volumes, as e.g. chambers or cells -* a volume material description +- an optional collection of contained surfaces which can describe sensitive surfaces or passive surfaces (e.g. for material integration) +- an optional collection of contained volumes which describe sub volumes, as e.g. chambers or cells +- a volume material description In case the volume contains surfaces and/or volumes, an adequate navigation state updator is to be provided that can resolve surface candidates or portal candidates into the sub volumes. E.g.~if the volume contain a layer with sensitive surfaces, a grid can be used to associate an entry/global position with the candidate surfaces further tested in the navigation. @@ -96,12 +95,12 @@ When building in `Debug` mode the containment of objects inside a `DetectorVolum The detector object is the holder class of all geometry objects, it has to contain: -* at least one detector volume -* a name string -* a volume finder delegate (as `Acts::Experimental::DetecorVolumeFinder`) that allows to uniquely associate a point in space with a contained volume of the detector. +- at least one detector volume +- a name string +- a volume finder delegate (as `Acts::Experimental::DetecorVolumeFinder`) that allows to uniquely associate a point in space with a contained volume of the detector. :::{note} -When the detector is constructed, name duplicates are checked for an when failing an `std::exception` is thrown. +When the detector is constructed, name duplicates are checked for an when failing an `std::exception` is thrown. ::: :::{figure} /figures/geometry/ODD_Detector.png