Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Acts::TGeoLayerBuilder Class Reference

#include <acts/blob/sPHENIX/Plugins/TGeo/include/Acts/Plugins/TGeo/TGeoLayerBuilder.hpp>

+ Inheritance diagram for Acts::TGeoLayerBuilder:
+ Collaboration diagram for Acts::TGeoLayerBuilder:

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 Loggerlogger () const
 Private access to the logger.
 
void buildLayers (const GeometryContext &gctx, LayerVector &layers, int type=0)
 
void registerSplit (std::vector< double > &parameters, 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 Loggerm_logger
 Logging instance.
 
std::vector< std::shared_ptr
< const TGeoDetectorElement > > 
m_elementStore
 

Detailed Description

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

Member Typedef Documentation

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

Constructor & Destructor Documentation

Acts::TGeoLayerBuilder::TGeoLayerBuilder ( const Config config,
std::unique_ptr< const Logger logger = getDefaultLogger("TGeoLayerBuilder", Logging::INFO) 
)

Constructor

Parameters
configis the configuration struct
loggerthe 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().

+ Here is the call graph for this function:

Acts::TGeoLayerBuilder::~TGeoLayerBuilder ( )
overridedefault

Destructor.

Member Function Documentation

void Acts::TGeoLayerBuilder::buildLayers ( const GeometryContext gctx,
LayerVector layers,
int  type = 0 
)
private

Private helper method : build layers

Parameters
gctxthe geometry context of this call
layersis goint to be filled
typeis 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().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

const Acts::LayerVector Acts::TGeoLayerBuilder::centralLayers ( const GeometryContext gctx) const
finalvirtual

LayerBuilder interface method - returning the central layers

Parameters
gctxthe 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().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

std::shared_ptr< Acts::TGeoDetectorElement > Acts::TGeoLayerBuilder::defaultElementFactory ( const Identifier identifier,
const TGeoNode &  tGeoNode,
const TGeoMatrix &  tGeoMatrix,
const std::string &  axes,
double  scalor,
std::shared_ptr< const Acts::ISurfaceMaterial material 
)
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().

+ Here is the call graph for this function:

const std::vector< std::shared_ptr< const TGeoDetectorElement > > & Acts::TGeoLayerBuilder::detectorElements ( ) const
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().

+ Here is the caller graph for this function:

TGeoLayerBuilder::Config Acts::TGeoLayerBuilder::getConfiguration ( ) const
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.

const std::string & Acts::TGeoLayerBuilder::identification ( ) const
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.

const Logger& Acts::TGeoLayerBuilder::logger ( ) const
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.

const Acts::LayerVector Acts::TGeoLayerBuilder::negativeLayers ( const GeometryContext gctx) const
finalvirtual

LayerBuilder interface method - returning the layers at negative side

Parameters
gctxthe 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().

+ Here is the call graph for this function:

const Acts::LayerVector Acts::TGeoLayerBuilder::positiveLayers ( const GeometryContext gctx) const
finalvirtual

LayerBuilder interface method - returning the layers at negative side

Parameters
gctxthe 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().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void Acts::TGeoLayerBuilder::registerSplit ( std::vector< double > &  parameters,
double  test,
double  tolerance,
std::pair< double, double > &  range 
) const
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

Parameters
configis 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().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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().

+ Here is the call graph for this function:

Member Data Documentation

Config Acts::TGeoLayerBuilder::m_cfg
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().

std::vector<std::shared_ptr<const TGeoDetectorElement> > Acts::TGeoLayerBuilder::m_elementStore
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().

std::array<std::string, 3> Acts::TGeoLayerBuilder::m_layerTypes = {"Negative", "Central", "Positive"}
private

layer types

Definition at line 183 of file TGeoLayerBuilder.hpp.

View newest version in sPHENIX GitHub at line 183 of file TGeoLayerBuilder.hpp

std::unique_ptr<const Logger> Acts::TGeoLayerBuilder::m_logger
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().


The documentation for this class was generated from the following files: