EIC 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 parsin. More...
 

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.
 

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 be split into layers.

Definition at line 46 of file TGeoLayerBuilder.hpp.

View newest version in sPHENIX GitHub at line 46 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 21 of file TGeoLayerBuilder.cpp.

View newest version in sPHENIX GitHub at line 21 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
gctsthe geometry context of this call
layersis goint to be filled
typeis the indication which ones to build -1 | 0 | 1

Definition at line 67 of file TGeoLayerBuilder.cpp.

View newest version in sPHENIX GitHub at line 67 of file TGeoLayerBuilder.cpp

References ACTS_DEBUG, ACTS_VERBOSE, ACTS_WARNING, Acts::binningValueNames, Acts::binR, Acts::binZ, Acts::ProtoLayer::envelope, Acts::ProtoLayer::medium(), Acts::TGeoParser::Options::parseRanges, Acts::TGeoParser::select(), Acts::TGeoParser::State::selectedNodes, Acts::TGeoParser::Options::targetNames, 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 49 of file TGeoLayerBuilder.cpp.

View newest version in sPHENIX GitHub at line 49 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:

const std::vector< std::shared_ptr< const TGeoDetectorElement > > & Acts::TGeoLayerBuilder::detectorElements ( ) const
inline

Return the created detector elements.

Definition at line 202 of file TGeoLayerBuilder.hpp.

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

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 197 of file TGeoLayerBuilder.hpp.

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

const std::string & Acts::TGeoLayerBuilder::identification ( ) const
inlinefinalvirtual

Name identification.

Implements Acts::ILayerBuilder.

Definition at line 206 of file TGeoLayerBuilder.hpp.

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

const Logger& Acts::TGeoLayerBuilder::logger ( ) const
inlineprivate

Private access to the logger.

Definition at line 158 of file TGeoLayerBuilder.hpp.

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

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 40 of file TGeoLayerBuilder.cpp.

View newest version in sPHENIX GitHub at line 40 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 58 of file TGeoLayerBuilder.cpp.

View newest version in sPHENIX GitHub at line 58 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 179 of file TGeoLayerBuilder.hpp.

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

References kdfinder::abs(), max, and min.

+ Here is the call graph for this function:

void Acts::TGeoLayerBuilder::setConfiguration ( const Config config)

Set the configuration object

Parameters
configis the configuration struct

Definition at line 30 of file TGeoLayerBuilder.cpp.

View newest version in sPHENIX GitHub at line 30 of file TGeoLayerBuilder.cpp

References configureMap::config.

Referenced by TGeoLayerBuilder().

+ Here is the caller graph for this function:

void Acts::TGeoLayerBuilder::setLogger ( std::unique_ptr< const Logger newLogger)

Set logging instance.

Definition at line 35 of file TGeoLayerBuilder.cpp.

View newest version in sPHENIX GitHub at line 35 of file TGeoLayerBuilder.cpp

Member Data Documentation

Config Acts::TGeoLayerBuilder::m_cfg
private

Configuration object.

Definition at line 152 of file TGeoLayerBuilder.hpp.

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

std::vector<std::shared_ptr<const TGeoDetectorElement> > Acts::TGeoLayerBuilder::m_elementStore
private

Definition at line 164 of file TGeoLayerBuilder.hpp.

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

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

layer types

Definition at line 155 of file TGeoLayerBuilder.hpp.

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

std::unique_ptr<const Logger> Acts::TGeoLayerBuilder::m_logger
private

Logging instance.

Definition at line 161 of file TGeoLayerBuilder.hpp.

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


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