ECCE @ EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Acts::TGeoLayerBuilder Class Reference

#include <acts/blob/master/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("LayerArrayCreator", 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 resolveSensitive (const GeometryContext &gctx, std::vector< std::shared_ptr< const Surface >> &layerSurfaces, TGeoVolume *tgVolume, TGeoNode *tgNode, const TGeoMatrix &tgTransform, LayerConfig &layerConfig, int type, bool correctBranch=false, const std::string &offset="")
 
void buildLayers (const GeometryContext &gctx, LayerVector &layers, int type=0)
 
bool match (const char *first, const char *second) const
 
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 45 of file TGeoLayerBuilder.hpp.

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

Constructor & Destructor Documentation

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

Constructor

Parameters
configis the configuration struct
loggerthe local logging instance

Definition at line 16 of file TGeoLayerBuilder.cpp.

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

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

References kdfinder::abs(), ACTS_DEBUG, ACTS_VERBOSE, ACTS_WARNING, Acts::binR, Acts::binZ, Acts::ProtoLayer::envR, Acts::ProtoLayer::envZ, max, readPY::pl, and surface().

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

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

References buildLayers().

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

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

TGeoLayerBuilder::Config Acts::TGeoLayerBuilder::getConfiguration ( ) const
inline

Get the configuration object.

Definition at line 228 of file TGeoLayerBuilder.hpp.

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

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

Name identification.

Implements Acts::ILayerBuilder.

Definition at line 237 of file TGeoLayerBuilder.hpp.

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

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

Private access to the logger.

Definition at line 166 of file TGeoLayerBuilder.hpp.

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

bool Acts::TGeoLayerBuilder::match ( const char *  first,
const char *  second 
) const
inlineprivate

Private helper method : match string with wildcards

Parameters
wcis the one with the potential wildcard
testis the test string

Definition at line 243 of file TGeoLayerBuilder.hpp.

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

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

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

References buildLayers().

+ Here is the call 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 210 of file TGeoLayerBuilder.hpp.

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

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

+ Here is the call graph for this function:

void Acts::TGeoLayerBuilder::resolveSensitive ( const GeometryContext gctx,
std::vector< std::shared_ptr< const Surface >> &  layerSurfaces,
TGeoVolume *  tgVolume,
TGeoNode *  tgNode,
const TGeoMatrix &  tgTransform,
LayerConfig layerConfig,
int  type,
bool  correctBranch = false,
const std::string &  offset = "" 
)
private

Private helper function to parse the geometry tree

Parameters
gctsthe geometry context of this call
layerSurfacesare the surfaces that build the layer
tgVolumeis the current volume
tgNodethe current Node (branch)
tgTransformis the current relative transform
layerConfigis the configuration to be filled
typeis ( n | c | p ) as of ( -1 | 0 | 1 )
correctBranchis the branch hit
offsetis a string offset for the screen output

Some screen output indicating that the volume was found

If you have a node, get the volume and step down further

Definition at line 239 of file TGeoLayerBuilder.cpp.

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

References ACTS_VERBOSE, Acts::binR, Acts::binZ, Acts::TGeoLayerBuilder::LayerConfig::layerName, Acts::TGeoLayerBuilder::LayerConfig::localAxes, Acts::TGeoLayerBuilder::LayerConfig::parseRangeR, r, Acts::TGeoLayerBuilder::LayerConfig::sensorName, Acts::TGeoLayerBuilder::LayerConfig::splitParametersR, Acts::TGeoLayerBuilder::LayerConfig::splitParametersZ, Acts::TGeoLayerBuilder::LayerConfig::splitRangeR, Acts::TGeoLayerBuilder::LayerConfig::splitRangeZ, x, y, and z.

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

Set the configuration object

Parameters
configis the configuration struct

Definition at line 25 of file TGeoLayerBuilder.cpp.

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

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

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

Member Data Documentation

Config Acts::TGeoLayerBuilder::m_cfg
private

Configuration object.

Definition at line 160 of file TGeoLayerBuilder.hpp.

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

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

Definition at line 172 of file TGeoLayerBuilder.hpp.

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

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

layer types

Definition at line 163 of file TGeoLayerBuilder.hpp.

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

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

Logging instance.

Definition at line 169 of file TGeoLayerBuilder.hpp.

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


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