Analysis Software
Documentation for sPHENIX simulation software
|
#include <acts/blob/sPHENIX/Plugins/TGeo/include/Acts/Plugins/TGeo/TGeoLayerBuilder.hpp>
Classes | |
struct | Config |
nested configuration struct for steering of the layer builder More... | |
struct | LayerConfig |
Helper config structs for volume parsing. More... | |
Public Types | |
using | ElementFactory = std::function< std::shared_ptr< TGeoDetectorElement >(const Identifier &, const TGeoNode &, const TGeoMatrix &tGeoMatrix, const std::string &axes, double scalor, std::shared_ptr< const Acts::ISurfaceMaterial > material)> |
Public Member Functions | |
TGeoLayerBuilder (const Config &config, std::unique_ptr< const Logger > logger=getDefaultLogger("TGeoLayerBuilder", Logging::INFO)) | |
~TGeoLayerBuilder () override | |
Destructor. | |
const LayerVector | negativeLayers (const GeometryContext &gctx) const final |
const LayerVector | centralLayers (const GeometryContext &gctx) const final |
const LayerVector | positiveLayers (const GeometryContext &gctx) const final |
const std::string & | identification () const final |
Name identification. | |
void | setConfiguration (const Config &config) |
Config | getConfiguration () const |
Get the configuration object. | |
void | setLogger (std::unique_ptr< const Logger > newLogger) |
Set logging instance. | |
const std::vector < std::shared_ptr< const TGeoDetectorElement > > & | detectorElements () const |
Return the created detector elements. | |
Public Member Functions inherited from Acts::ILayerBuilder | |
virtual | ~ILayerBuilder ()=default |
Virtual destructor. | |
Static Public Member Functions | |
static std::shared_ptr < TGeoDetectorElement > | defaultElementFactory (const Identifier &identifier, const TGeoNode &tGeoNode, const TGeoMatrix &tGeoMatrix, const std::string &axes, double scalor, std::shared_ptr< const Acts::ISurfaceMaterial > material) |
Private Member Functions | |
const Logger & | logger () const |
Private access to the logger. | |
void | buildLayers (const GeometryContext &gctx, LayerVector &layers, int type=0) |
void | registerSplit (std::vector< double > ¶meters, double test, double tolerance, std::pair< double, double > &range) const |
Private helper method : register splitting input. | |
Private Attributes | |
Config | m_cfg |
Configuration object. | |
std::array< std::string, 3 > | m_layerTypes = {"Negative", "Central", "Positive"} |
layer types | |
std::unique_ptr< const Logger > | m_logger |
Logging instance. | |
std::vector< std::shared_ptr < const TGeoDetectorElement > > | m_elementStore |
This parses the gGeoManager and looks for a defined combination of volume with contained sensitive detector element. The association is done by matching the names of the TGeoNode / TGeoVolume to the search string.
The parsing can be restricted to a given parse volume (in r and z), and given some splitting parameters the surfaces can be automatically split into layers.
Definition at line 57 of file TGeoLayerBuilder.hpp.
View newest version in sPHENIX GitHub at line 57 of file TGeoLayerBuilder.hpp
using Acts::TGeoLayerBuilder::ElementFactory = std::function<std::shared_ptr<TGeoDetectorElement>( const Identifier&, const TGeoNode&, const TGeoMatrix& tGeoMatrix, const std::string& axes, double scalor, std::shared_ptr<const Acts::ISurfaceMaterial> material)> |
Definition at line 96 of file TGeoLayerBuilder.hpp.
View newest version in sPHENIX GitHub at line 96 of file TGeoLayerBuilder.hpp
Acts::TGeoLayerBuilder::TGeoLayerBuilder | ( | const Config & | config, |
std::unique_ptr< const Logger > | logger = getDefaultLogger("TGeoLayerBuilder", Logging::INFO) |
||
) |
Constructor
config | is the configuration struct |
logger | the local logging instance |
Definition at line 32 of file TGeoLayerBuilder.cpp.
View newest version in sPHENIX GitHub at line 32 of file TGeoLayerBuilder.cpp
References setConfiguration().
|
overridedefault |
Destructor.
|
private |
Private helper method : build layers
gctx | the geometry context of this call |
layers | is goint to be filled |
type | is the indication which ones to build -1 | 0 | 1 |
Definition at line 78 of file TGeoLayerBuilder.cpp.
View newest version in sPHENIX GitHub at line 78 of file TGeoLayerBuilder.cpp
References ACTS_DEBUG, Acts::ACTS_VERBOSE(), ACTS_WARNING, Acts::binningValueNames(), Acts::binR, Acts::binZ, Acts::ProtoLayer::envelope, identifier, m_cfg(), Acts::ProtoLayer::medium(), Acts::TGeoParser::Options::parseRanges, Acts::TGeoParser::select(), Acts::TGeoParser::State::selectedNodes, Acts::TGeoParser::Options::targetNames, to_string(), Acts::TGeoParser::Options::unit, Acts::unpack_shared_vector(), Acts::TGeoParser::State::volume, and Acts::TGeoParser::Options::volumeNames.
Referenced by centralLayers(), negativeLayers(), and positiveLayers().
|
finalvirtual |
LayerBuilder interface method - returning the central layers
gctx | the geometry context for this build call |
Implements Acts::ILayerBuilder.
Definition at line 60 of file TGeoLayerBuilder.cpp.
View newest version in sPHENIX GitHub at line 60 of file TGeoLayerBuilder.cpp
References buildLayers().
Referenced by Acts::Test::BOOST_AUTO_TEST_CASE().
|
static |
Definition at line 303 of file TGeoLayerBuilder.cpp.
View newest version in sPHENIX GitHub at line 303 of file TGeoLayerBuilder.cpp
References identifier, and testing::internal::move().
|
inline |
Return the created detector elements.
Definition at line 230 of file TGeoLayerBuilder.hpp.
View newest version in sPHENIX GitHub at line 230 of file TGeoLayerBuilder.hpp
References m_elementStore.
Referenced by Acts::Test::BOOST_AUTO_TEST_CASE().
|
inline |
Get the configuration object.
Definition at line 225 of file TGeoLayerBuilder.hpp.
View newest version in sPHENIX GitHub at line 225 of file TGeoLayerBuilder.hpp
References m_cfg.
|
inlinefinalvirtual |
Name identification.
Implements Acts::ILayerBuilder.
Definition at line 234 of file TGeoLayerBuilder.hpp.
View newest version in sPHENIX GitHub at line 234 of file TGeoLayerBuilder.hpp
References Acts::TGeoLayerBuilder::Config::configurationName, and m_cfg.
|
inlineprivate |
Private access to the logger.
Definition at line 186 of file TGeoLayerBuilder.hpp.
View newest version in sPHENIX GitHub at line 186 of file TGeoLayerBuilder.hpp
References m_logger.
|
finalvirtual |
LayerBuilder interface method - returning the layers at negative side
gctx | the geometry context for this build call |
Implements Acts::ILayerBuilder.
Definition at line 51 of file TGeoLayerBuilder.cpp.
View newest version in sPHENIX GitHub at line 51 of file TGeoLayerBuilder.cpp
References buildLayers().
|
finalvirtual |
LayerBuilder interface method - returning the layers at negative side
gctx | the geometry context for this build call |
Implements Acts::ILayerBuilder.
Definition at line 69 of file TGeoLayerBuilder.cpp.
View newest version in sPHENIX GitHub at line 69 of file TGeoLayerBuilder.cpp
References buildLayers().
Referenced by Acts::Test::BOOST_AUTO_TEST_CASE().
|
inlineprivate |
Private helper method : register splitting input.
Definition at line 207 of file TGeoLayerBuilder.hpp.
View newest version in sPHENIX GitHub at line 207 of file TGeoLayerBuilder.hpp
References Acts::UnitConstants::min.
void Acts::TGeoLayerBuilder::setConfiguration | ( | const Config & | config | ) |
Set the configuration object
config | is the configuration struct |
Definition at line 41 of file TGeoLayerBuilder.cpp.
View newest version in sPHENIX GitHub at line 41 of file TGeoLayerBuilder.cpp
References filter::config, and m_cfg().
Referenced by TGeoLayerBuilder().
void Acts::TGeoLayerBuilder::setLogger | ( | std::unique_ptr< const Logger > | newLogger | ) |
Set logging instance.
Definition at line 46 of file TGeoLayerBuilder.cpp.
View newest version in sPHENIX GitHub at line 46 of file TGeoLayerBuilder.cpp
References m_logger, and testing::internal::move().
|
private |
Configuration object.
Definition at line 180 of file TGeoLayerBuilder.hpp.
View newest version in sPHENIX GitHub at line 180 of file TGeoLayerBuilder.hpp
Referenced by getConfiguration(), and identification().
|
private |
Definition at line 192 of file TGeoLayerBuilder.hpp.
View newest version in sPHENIX GitHub at line 192 of file TGeoLayerBuilder.hpp
Referenced by detectorElements().
|
private |
layer types
Definition at line 183 of file TGeoLayerBuilder.hpp.
View newest version in sPHENIX GitHub at line 183 of file TGeoLayerBuilder.hpp
|
private |
Logging instance.
Definition at line 189 of file TGeoLayerBuilder.hpp.
View newest version in sPHENIX GitHub at line 189 of file TGeoLayerBuilder.hpp
Referenced by logger().