Analysis Software
Documentation for sPHENIX simulation software
|
A detector. More...
#include <acts/blob/sPHENIX/Core/include/Acts/Detector/Detector.hpp>
Public Member Functions | |
std::shared_ptr< Detector > | getSharedPtr () |
std::shared_ptr< const Detector > | getSharedPtr () const |
std::vector< std::shared_ptr < DetectorVolume > > & | rootVolumePtrs () |
const std::vector< const DetectorVolume * > & | rootVolumes () const |
std::vector< std::shared_ptr < DetectorVolume > > & | volumePtrs () |
const std::vector< const DetectorVolume * > & | volumes () const |
const GeometryHierarchyMap < const Surface * > & | sensitiveHierarchyMap () const |
void | updateDetectorVolume (const GeometryContext &gctx, NavigationState &nState) const |
const DetectorVolume * | findDetectorVolume (const GeometryContext &gctx, const Vector3 &position) const |
const DetectorVolume * | findDetectorVolume (const std::string &name) const |
void | updateDetectorVolumeFinder (DetectorVolumeUpdator detectorVolumeUpdator) |
const DetectorVolumeUpdator & | detectorVolumeFinder () const |
Const access to the volume finder. | |
const std::string & | name () const |
Return the name of the detector. | |
const std::vector< const DetectorVolume * > | volumes () const |
Static Public Member Functions | |
static std::shared_ptr< Detector > | makeShared (std::string name, std::vector< std::shared_ptr< DetectorVolume >> rootVolumes, DetectorVolumeUpdator detectorVolumeUpdator) |
Factory for producing memory managed instances of Detector. | |
Public Attributes | |
std::vector< const DetectorVolume * > | vs = {} |
Protected Member Functions | |
Detector (std::string name, std::vector< std::shared_ptr< DetectorVolume >> rootVolumes, DetectorVolumeUpdator detectorVolumeUpdator) noexcept(false) | |
Private Attributes | |
std::string | m_name |
Name of the detector. | |
DetectorVolume::ObjectStore < std::shared_ptr < DetectorVolume > > | m_rootVolumes |
Root volumes. | |
DetectorVolume::ObjectStore < std::shared_ptr < DetectorVolume > > | m_volumes |
Volume store (internal/external) | |
DetectorVolumeUpdator | m_detectorVolumeUpdator |
A volume finder delegate. | |
std::unordered_map < std::string, size_t > | m_volumeNameIndex |
Name/index map to find volumes by name and detect duplicates. | |
GeometryHierarchyMap< const Surface * > | m_sensitiveHierarchyMap |
Geometry Id hierarchy map of all sensitive surfaces. | |
A detector.
Definition at line 34 of file Detector.hpp.
View newest version in sPHENIX GitHub at line 34 of file Detector.hpp
|
protectednoexcept |
Create a detector from volumes
name | the detecor name |
rootVolumes | the volumes contained by this detector |
detectorVolumeUpdator | is a Delegate to find the associated volume |
Definition at line 22 of file Detector.cpp.
View newest version in sPHENIX GitHub at line 22 of file Detector.cpp
References Acts::enumerate(), Acts::Experimental::DetectorVolume::ObjectStore< internal_type >::internal, m_detectorVolumeUpdator, m_rootVolumes, m_sensitiveHierarchyMap, m_volumeNameIndex, m_volumes, testing::internal::move(), fixGDML::root, physmon_simulation::s, writeMapConfig::surface, testSigmaEff::v, and volumes().
const Acts::Experimental::DetectorVolumeUpdator & Acts::Experimental::Detector::detectorVolumeFinder | ( | ) | const |
Const access to the volume finder.
Definition at line 127 of file Detector.cpp.
View newest version in sPHENIX GitHub at line 127 of file Detector.cpp
const Acts::Experimental::DetectorVolume * Acts::Experimental::Detector::findDetectorVolume | ( | const GeometryContext & | gctx, |
const Vector3 & | position | ||
) | const |
Find a volume from a position
gctx | is the Geometry context of the call |
position | is the position of the call |
Definition at line 151 of file Detector.cpp.
View newest version in sPHENIX GitHub at line 151 of file Detector.cpp
References Acts::Experimental::NavigationState::currentDetector, Acts::Experimental::NavigationState::currentVolume, nState, Acts::Experimental::NavigationState::position, and position.
Referenced by Acts::Experimental::DetectorNavigator::initializeTarget().
const Acts::Experimental::DetectorVolume * Acts::Experimental::Detector::findDetectorVolume | ( | const std::string & | name | ) | const |
Find a volume by name
name | with which the volume is searched for |
Definition at line 161 of file Detector.cpp.
View newest version in sPHENIX GitHub at line 161 of file Detector.cpp
std::shared_ptr< Acts::Experimental::Detector > Acts::Experimental::Detector::getSharedPtr | ( | ) |
Retrieve a std::shared_ptr
for this surface (non-const version)
makeShared
factory since it needs access to the original reference. In C++14 this is undefined behavior (but most likely implemented as a bad_weak_ptr
exception), in C++17 it is defined as that exception. Definition at line 136 of file Detector.cpp.
View newest version in sPHENIX GitHub at line 136 of file Detector.cpp
std::shared_ptr< const Acts::Experimental::Detector > Acts::Experimental::Detector::getSharedPtr | ( | ) | const |
Retrieve a std::shared_ptr
for this surface (const version)
makeShared
factory since it needs access to the original reference. In C++14 this is undefined behavior, but most likely implemented as a bad_weak_ptr
exception, in C++17 it is defined as that exception. Definition at line 141 of file Detector.cpp.
View newest version in sPHENIX GitHub at line 141 of file Detector.cpp
|
static |
Factory for producing memory managed instances of Detector.
Definition at line 93 of file Detector.cpp.
View newest version in sPHENIX GitHub at line 93 of file Detector.cpp
References testing::internal::move().
Referenced by BOOST_AUTO_TEST_CASE(), Acts::Experimental::DetectorBuilder::construct(), and main().
const std::string & Acts::Experimental::Detector::name | ( | ) | const |
Return the name of the detector.
Definition at line 131 of file Detector.cpp.
View newest version in sPHENIX GitHub at line 131 of file Detector.cpp
References m_name().
Referenced by Acts::Python::addJson(), Acts::DetectorJsonConverter::toJson(), and Acts::DetectorJsonConverter::toJsonDetray().
std::vector< std::shared_ptr< Acts::Experimental::DetectorVolume > > & Acts::Experimental::Detector::rootVolumePtrs | ( | ) |
Non-const access to the root volumes
Definition at line 102 of file Detector.cpp.
View newest version in sPHENIX GitHub at line 102 of file Detector.cpp
const std::vector< const Acts::Experimental::DetectorVolume * > & Acts::Experimental::Detector::rootVolumes | ( | ) | const |
Const access to the root volumes
Definition at line 107 of file Detector.cpp.
View newest version in sPHENIX GitHub at line 107 of file Detector.cpp
Referenced by Acts::Experimental::RootVolumeFinder::update().
const Acts::GeometryHierarchyMap< const Acts::Surface * > & Acts::Experimental::Detector::sensitiveHierarchyMap | ( | ) | const |
Const access to the hierarchy map of all sensitive surfaces
Definition at line 171 of file Detector.cpp.
View newest version in sPHENIX GitHub at line 171 of file Detector.cpp
void Acts::Experimental::Detector::updateDetectorVolume | ( | const GeometryContext & | gctx, |
NavigationState & | nState | ||
) | const |
Update the current volume of a given navigation state
gctx | is the Geometry context of the call |
nState | [in, out] is the navigation state |
Definition at line 145 of file Detector.cpp.
View newest version in sPHENIX GitHub at line 145 of file Detector.cpp
void Acts::Experimental::Detector::updateDetectorVolumeFinder | ( | DetectorVolumeUpdator | detectorVolumeUpdator | ) |
Update the volume finder
detectorVolumeUpdator | the new volume finder |
Definition at line 121 of file Detector.cpp.
View newest version in sPHENIX GitHub at line 121 of file Detector.cpp
References testing::internal::move().
std::vector< std::shared_ptr< Acts::Experimental::DetectorVolume > > & Acts::Experimental::Detector::volumePtrs | ( | ) |
Non-const access to the root volume
Definition at line 112 of file Detector.cpp.
View newest version in sPHENIX GitHub at line 112 of file Detector.cpp
|
inline |
Definition at line 54 of file NavigationStateUpdatorsTests.cpp.
View newest version in sPHENIX GitHub at line 54 of file NavigationStateUpdatorsTests.cpp
References vs.
const std::vector< const Acts::Experimental::DetectorVolume * > & Acts::Experimental::Detector::volumes | ( | ) | const |
Const access to sub volumes
Definition at line 117 of file Detector.cpp.
View newest version in sPHENIX GitHub at line 117 of file Detector.cpp
Referenced by Acts::Svg::DetectorConverter::convert(), Detector(), Acts::Experimental::IndexedDetectorVolumeExtractor::extract(), Acts::DetectorJsonConverter::toJson(), and Acts::DetectorJsonConverter::toJsonDetray().
|
private |
A volume finder delegate.
Definition at line 151 of file Detector.hpp.
View newest version in sPHENIX GitHub at line 151 of file Detector.hpp
Referenced by Detector().
|
private |
Name of the detector.
Definition at line 142 of file Detector.hpp.
View newest version in sPHENIX GitHub at line 142 of file Detector.hpp
|
private |
Root volumes.
Definition at line 145 of file Detector.hpp.
View newest version in sPHENIX GitHub at line 145 of file Detector.hpp
Referenced by Detector().
|
private |
Geometry Id hierarchy map of all sensitive surfaces.
Definition at line 157 of file Detector.hpp.
View newest version in sPHENIX GitHub at line 157 of file Detector.hpp
Referenced by Detector().
|
private |
Name/index map to find volumes by name and detect duplicates.
Definition at line 154 of file Detector.hpp.
View newest version in sPHENIX GitHub at line 154 of file Detector.hpp
Referenced by Detector().
|
private |
Volume store (internal/external)
Definition at line 148 of file Detector.hpp.
View newest version in sPHENIX GitHub at line 148 of file Detector.hpp
Referenced by Detector().
std::vector<const DetectorVolume*> Acts::Experimental::Detector::vs = {} |
Definition at line 53 of file NavigationStateUpdatorsTests.cpp.
View newest version in sPHENIX GitHub at line 53 of file NavigationStateUpdatorsTests.cpp
Referenced by volumes().