Class Acts::Experimental::Detector¶
-
class Detector : public std::enable_shared_from_this<Detector>¶
Public Functions
-
const DetectorVolumeUpdator &detectorVolumeFinder() const¶
Const access to the volume finder.
-
const DetectorVolume *findDetectorVolume(const GeometryContext &gctx, const Vector3 &position) const¶
Find a volume from a position.
Note
this creates internally a NavigationState object
- Parameters
gctx – is the Geometry context of the call
position – is the position of the call
- Returns
the volume pointer or nullptr (if outside)
-
const DetectorVolume *findDetectorVolume(const std::string &name) const¶
Find a volume by name.
- Parameters
name – with which the volume is searched for
- Returns
the volume pointer or nullptr (if not found)
Retrieve a
std::shared_ptr
for this surface (non-const version)Note
Will error if this was not created through the
makeShared
factory since it needs access to the original reference. In C++14 this is undefined behavior (but most likely implemented as abad_weak_ptr
exception), in C++17 it is defined as that exception.Note
Only call this if you need shared ownership of this object.
- Returns
The shared pointer
Retrieve a
std::shared_ptr
for this surface (const version)Note
Will error if this was not created through the
makeShared
factory since it needs access to the original reference. In C++14 this is undefined behavior, but most likely implemented as abad_weak_ptr
exception, in C++17 it is defined as that exception.Note
Only call this if you need shared ownership of this object.
- Returns
The shared pointer
-
const std::string &name() const¶
Return the name of the detector.
-
std::vector<std::shared_ptr<DetectorVolume>> &rootVolumePtrs()¶
Non-const access to the root volumes.
- Returns
the root volume shared pointer
-
const std::vector<const DetectorVolume*> &rootVolumes() const¶
Const access to the root volumes.
- Returns
a vector to const DetectorVolume raw pointers
Update the current volume of a given navigation state.
- Parameters
gctx – is the Geometry context of the call
nState – [in, out] is the navigation state
-
void updateDetectorVolumeFinder(DetectorVolumeUpdator &&detectorVolumeUpdator)¶
Update the volume finder.
- Parameters
detectorVolumeUpdator – the new volume finder
-
std::vector<std::shared_ptr<DetectorVolume>> &volumePtrs()¶
Non-const access to the root volume.
- Returns
the volumes shared pointer store
-
const std::vector<const DetectorVolume*> &volumes() const¶
Const access to sub volumes.
- Returns
a vector to const DetectorVolume raw pointers
Public Static Functions
Factory for producing memory managed instances of Detector.
-
const DetectorVolumeUpdator &detectorVolumeFinder() const¶