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

TGeoITkModuleSplitter. More...

#include <acts/blob/sPHENIX/Examples/Detectors/TGeoDetector/include/ActsExamples/TGeoDetector/TGeoITkModuleSplitter.hpp>

+ Inheritance diagram for ActsExamples::TGeoITkModuleSplitter:
+ Collaboration diagram for ActsExamples::TGeoITkModuleSplitter:

Classes

struct  Config
 Nested configuration struct. More...
 

Public Types

using SplitRange = std::pair< double, double >
 

Public Member Functions

 TGeoITkModuleSplitter (const Config &cfg, std::unique_ptr< const Acts::Logger > logger=Acts::getDefaultLogger("TGeoITkModuleSplitter", Acts::Logging::INFO))
 
 ~TGeoITkModuleSplitter () override=default
 
std::vector< std::shared_ptr
< const
Acts::TGeoDetectorElement > > 
split (const Acts::GeometryContext &gctx, std::shared_ptr< const Acts::TGeoDetectorElement > detElement) const override
 If applicable, returns a split detector element.
 
- Public Member Functions inherited from Acts::ITGeoDetectorElementSplitter
virtual ~ITGeoDetectorElementSplitter ()=default
 
virtual std::vector
< std::shared_ptr< const
Acts::TGeoDetectorElement > > 
split (const GeometryContext &gctx, std::shared_ptr< const Acts::TGeoDetectorElement > tgde) const =0
 

Private Member Functions

void initSplitCategories ()
 
std::vector< std::shared_ptr
< const
Acts::TGeoDetectorElement > > 
splitBarrelModule (const Acts::GeometryContext &gctx, const std::shared_ptr< const Acts::TGeoDetectorElement > &detElement, unsigned int nSegments) const
 If applicable, returns a split detector element.
 
std::vector< std::shared_ptr
< const
Acts::TGeoDetectorElement > > 
splitDiscModule (const Acts::GeometryContext &gctx, const std::shared_ptr< const Acts::TGeoDetectorElement > &detElement, const std::vector< SplitRange > &splitRanges) const
 If applicable, returns a split detector element.
 
const Acts::Loggerlogger () const
 Private access to the logger.
 

Private Attributes

Config m_cfg
 Contains the splitting parameters, sorted by sensor type.
 
std::vector< std::tuple
< std::regex, std::string,
bool > > 
m_splitCategories
 regular expressions to match sensors for barrel or disk module splits
 
std::unique_ptr< const
Acts::Logger
m_logger
 Logging instance.
 

Detailed Description

TGeoITkModuleSplitter.

Split Itk modules into submodules, depending on the sensor type

Definition at line 34 of file TGeoITkModuleSplitter.hpp.

View newest version in sPHENIX GitHub at line 34 of file TGeoITkModuleSplitter.hpp

Member Typedef Documentation

Definition at line 36 of file TGeoITkModuleSplitter.hpp.

View newest version in sPHENIX GitHub at line 36 of file TGeoITkModuleSplitter.hpp

Constructor & Destructor Documentation

ActsExamples::TGeoITkModuleSplitter::TGeoITkModuleSplitter ( const Config cfg,
std::unique_ptr< const Acts::Logger logger = Acts::getDefaultLogger("TGeoITkModuleSplitter",                                                   Acts::Logging::INFO) 
)

Constructor

Parameters
cfgthe configuration struct
loggerthe logging object

Definition at line 23 of file TGeoITkModuleSplitter.cpp.

View newest version in sPHENIX GitHub at line 23 of file TGeoITkModuleSplitter.cpp

References initSplitCategories().

+ Here is the call graph for this function:

ActsExamples::TGeoITkModuleSplitter::~TGeoITkModuleSplitter ( )
overridedefault

Member Function Documentation

void ActsExamples::TGeoITkModuleSplitter::initSplitCategories ( )
private

Categorise module split patterns as barrel or disc module splits

Mark the split pattern as either barrel or disc module split depending on whether the split category is found in the barrel or disc map, and compile the regular expression.

Definition at line 30 of file TGeoITkModuleSplitter.cpp.

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

References ACTS_ERROR, m_cfg(), and std::tr1::make_tuple().

Referenced by TGeoITkModuleSplitter().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

const Acts::Logger& ActsExamples::TGeoITkModuleSplitter::logger ( ) const
inlineprivate

Private access to the logger.

Definition at line 117 of file TGeoITkModuleSplitter.hpp.

View newest version in sPHENIX GitHub at line 117 of file TGeoITkModuleSplitter.hpp

References m_logger.

std::vector< std::shared_ptr< const Acts::TGeoDetectorElement > > ActsExamples::TGeoITkModuleSplitter::split ( const Acts::GeometryContext gctx,
std::shared_ptr< const Acts::TGeoDetectorElement detElement 
) const
inlineoverride

If applicable, returns a split detector element.

Take a geometry context and TGeoElement and find the correct splitting method for the module type.

Parameters
gctxis a geometry context object
detElementis a TGeoDetectorElement that is eventually split
Note
If no split is performed the unsplit detector element is returned
Returns
a vector of TGeoDetectorElement objects

Definition at line 54 of file TGeoITkModuleSplitter.cpp.

View newest version in sPHENIX GitHub at line 54 of file TGeoITkModuleSplitter.cpp

References ACTS_DEBUG, m_cfg(), splitBarrelModule(), and splitDiscModule().

+ Here is the call graph for this function:

std::vector< std::shared_ptr< const Acts::TGeoDetectorElement > > ActsExamples::TGeoITkModuleSplitter::splitBarrelModule ( const Acts::GeometryContext gctx,
const std::shared_ptr< const Acts::TGeoDetectorElement > &  detElement,
unsigned int  nSegments 
) const
inlineprivate

If applicable, returns a split detector element.

Take a geometry context and TGeoElement in the Itk barrel region and split it into sub elements.

Parameters
gctxis a geometry context object
detElementis a TGeoDetectorElement that should be split
nSegmentsis the number of submodules
Note
If no split is performed the unsplit detector element is returned
Returns
a vector of TGeoDetectorElement objects

Definition at line 87 of file TGeoITkModuleSplitter.cpp.

View newest version in sPHENIX GitHub at line 87 of file TGeoITkModuleSplitter.cpp

References ACTS_DEBUG, ACTS_WARNING, bounds, Acts::Surface::bounds(), fixGDML::element, Acts::RectangleBounds::eMaxX, Acts::RectangleBounds::eMaxY, Acts::RectangleBounds::eMinX, Acts::RectangleBounds::eMinY, Acts::SurfaceBounds::eRectangle, i, identifier, Acts::Surface::localToGlobal(), testing::internal::move(), step, writeMapConfig::surface, thickness, to_string(), Acts::Test::transform, Acts::Surface::transform(), Acts::SurfaceBounds::type(), physmon_ckf_tracking::u, and Acts::SurfaceBounds::values().

Referenced by split().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

std::vector< std::shared_ptr< const Acts::TGeoDetectorElement > > ActsExamples::TGeoITkModuleSplitter::splitDiscModule ( const Acts::GeometryContext gctx,
const std::shared_ptr< const Acts::TGeoDetectorElement > &  detElement,
const std::vector< SplitRange > &  splitRanges 
) const
inlineprivate

If applicable, returns a split detector element.

Take a geometry context and TGeoElement in the Itk disks and split it into sub elements.

Parameters
gctxis a geometry context object
detElementis a TGeoDetectorElement that should be split
splitRangesare the ranges in r for the submodules
Note
If no split is performed the unsplit detector element is returned
Returns
a vector of TGeoDetectorElement objects

Definition at line 144 of file TGeoITkModuleSplitter.cpp.

View newest version in sPHENIX GitHub at line 144 of file TGeoITkModuleSplitter.cpp

References ACTS_DEBUG, ACTS_WARNING, bounds, Acts::Surface::bounds(), Acts::SurfaceBounds::eAnnulus, fixGDML::element, Acts::AnnulusBounds::eMaxR, Acts::AnnulusBounds::eMinR, Acts::AnnulusBounds::eSize, i, identifier, testing::internal::move(), out, writeMapConfig::surface, thickness, to_string(), Acts::Test::transform, Acts::Surface::transform(), Acts::SurfaceBounds::type(), Acts::SurfaceBounds::values(), and Acts::Test::values.

Referenced by split().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Member Data Documentation

Config ActsExamples::TGeoITkModuleSplitter::m_cfg
private

Contains the splitting parameters, sorted by sensor type.

Definition at line 111 of file TGeoITkModuleSplitter.hpp.

View newest version in sPHENIX GitHub at line 111 of file TGeoITkModuleSplitter.hpp

std::unique_ptr<const Acts::Logger> ActsExamples::TGeoITkModuleSplitter::m_logger
private

Logging instance.

Definition at line 120 of file TGeoITkModuleSplitter.hpp.

View newest version in sPHENIX GitHub at line 120 of file TGeoITkModuleSplitter.hpp

Referenced by logger().

std::vector<std::tuple<std::regex, std::string, bool> > ActsExamples::TGeoITkModuleSplitter::m_splitCategories
private

regular expressions to match sensors for barrel or disk module splits

Definition at line 114 of file TGeoITkModuleSplitter.hpp.

View newest version in sPHENIX GitHub at line 114 of file TGeoITkModuleSplitter.hpp


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