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

Extension of the DD4hep DetElement needed for translation into the Acts tracking geometry. More...

#include <acts/blob/master/Plugins/DD4hep/include/Acts/Plugins/DD4hep/ActsExtension.hpp>

+ Collaboration diagram for Acts::ActsExtension:

Public Member Functions

 ActsExtension (const std::string &axes="XYZ")
 
 ActsExtension (const ActsExtension &ext)=default
 
 ActsExtension (const ActsExtension &ext, const dd4hep::DetElement &elem)
 
 ~ActsExtension ()=default
 Destructor.
 
double getValue (const std::string &tag, const std::string &category="") const noexcept(false)
 
void addValue (double value, const std::string &tag, const std::string &category="")
 
bool hasValue (const std::string &tag, const std::string &category="") const
 
bool hasType (const std::string &type, const std::string &category="") const
 
void addType (const std::string &type, const std::string &category="", const std::string &word="")
 
const std::string getType (const std::string &type, const std::string &category="") const noexcept(false)
 
std::string toString () const
 Output to string.
 

Private Member Functions

template<typename T >
void addT (std::map< std::string, T > &map, const T &val, const std::string &tag, const std::string &category, const T &catDeco)
 Templated helper method.
 
template<typename T >
const T getT (const std::map< std::string, T > &map, const std::string &tag, const std::string &category="") const noexcept(false)
 Templated helper method.
 
template<typename T >
bool hasT (const std::map< std::string, T > &map, const std::string &tag, const std::string &category="") const
 Templated helper method.
 

Private Attributes

std::map< std::string,
std::string > 
m_flagStore
 Multiple flags to be stored, existance defines set.
 
std::map< std::string, double > m_values
 Unique value store for doubles.
 

Detailed Description

Extension of the DD4hep DetElement needed for translation into the Acts tracking geometry.

This is a simple value / flag container to be:

  • filled by the Detector constructors if Acts is needed
  • interpreted by the DD4Hep layer builders and detector converters

The minimal requirement for an ActsExtension is to define how the DD4hep (TGeo) element is oriented with respect to the Acts definition

Definition at line 32 of file ActsExtension.hpp.

View newest version in sPHENIX GitHub at line 32 of file ActsExtension.hpp

Constructor & Destructor Documentation

Acts::ActsExtension::ActsExtension ( const std::string &  axes = "XYZ")

Minimal constructor, sets the defail of the axis

Definition at line 11 of file ActsExtension.cpp.

View newest version in sPHENIX GitHub at line 11 of file ActsExtension.cpp

References addType().

+ Here is the call graph for this function:

Acts::ActsExtension::ActsExtension ( const ActsExtension ext)
default

Standard copy constructor

Parameters
extthe source extension
Acts::ActsExtension::ActsExtension ( const ActsExtension ext,
const dd4hep::DetElement &  elem 
)

Copy constructor with element for DD4hep::DetElement::clone

Parameters
extthe source extension

Definition at line 15 of file ActsExtension.cpp.

View newest version in sPHENIX GitHub at line 15 of file ActsExtension.cpp

Acts::ActsExtension::~ActsExtension ( )
default

Destructor.

Member Function Documentation

template<typename T >
void Acts::ActsExtension::addT ( std::map< std::string, T > &  map,
const T val,
const std::string &  tag,
const std::string &  category,
const T catDeco 
)
private

Templated helper method.

Definition at line 145 of file ActsExtension.hpp.

View newest version in sPHENIX GitHub at line 145 of file ActsExtension.hpp

void Acts::ActsExtension::addType ( const std::string &  type,
const std::string &  category = "",
const std::string &  word = "" 
)

Add the characteristics

Parameters
typethe primary identifier in the flag store
categorythe (optional) category in the flag store
theword to be stored

Definition at line 40 of file ActsExtension.cpp.

View newest version in sPHENIX GitHub at line 40 of file ActsExtension.cpp

Referenced by ActsExtension(), ODDModuleHelper::assembleRectangularModule(), ODDModuleHelper::assembleTrapezoidalModule(), create_element(), det::createSimpleLayeredCylinder(), det::createTkLayoutTrackerBarrel(), det::createTkLayoutTrackerEndcap(), and Acts::xmlToProtoSurfaceMaterial().

+ Here is the caller graph for this function:

void Acts::ActsExtension::addValue ( double  value,
const std::string &  tag,
const std::string &  category = "" 
)

Add the parameter to the store

Parameters
valuethe value to be added
tagthe entry identifier in the value store
typethe (optional) category in the value store

Definition at line 25 of file ActsExtension.cpp.

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

Referenced by Acts::xmlToProtoSurfaceMaterial().

+ Here is the caller graph for this function:

template<typename T >
const T Acts::ActsExtension::getT ( const std::map< std::string, T > &  map,
const std::string &  tag,
const std::string &  category = "" 
) const
privatenoexcept

Templated helper method.

Definition at line 123 of file ActsExtension.hpp.

View newest version in sPHENIX GitHub at line 123 of file ActsExtension.hpp

References Acts::toString().

+ Here is the call graph for this function:

const std::string Acts::ActsExtension::getType ( const std::string &  type,
const std::string &  category = "" 
) const
noexcept

Get the string content

Parameters
typethe primary identifier in the flag store
categorythe (optional) category in the flag store

Definition at line 47 of file ActsExtension.cpp.

View newest version in sPHENIX GitHub at line 47 of file ActsExtension.cpp

Referenced by Acts::DD4hepLayerBuilder::createSensitiveSurface().

+ Here is the caller graph for this function:

double Acts::ActsExtension::getValue ( const std::string &  tag,
const std::string &  category = "" 
) const
noexcept

Get the value

Parameters
tagthe entry identifier in the value store
typethe (optional) category in the value store

Definition at line 19 of file ActsExtension.cpp.

View newest version in sPHENIX GitHub at line 19 of file ActsExtension.cpp

Referenced by Acts::DD4hepLayerBuilder::centralLayers(), Acts::createProtoMaterial(), and Acts::DD4hepLayerBuilder::endcapLayers().

+ Here is the caller graph for this function:

template<typename T >
bool Acts::ActsExtension::hasT ( const std::map< std::string, T > &  map,
const std::string &  tag,
const std::string &  category = "" 
) const
private

Templated helper method.

Definition at line 160 of file ActsExtension.hpp.

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

bool Acts::ActsExtension::hasType ( const std::string &  type,
const std::string &  category = "" 
) const

Check if the ActsExtension has a value (with optional category)

Parameters
typethe primary identifier in the flag store
typethe (optional) category in the flag store

Definition at line 35 of file ActsExtension.cpp.

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

Referenced by Acts::collectCompounds_dd4hep(), Acts::collectLayers_dd4hep(), Acts::collectSubDetectors_dd4hep(), Acts::collectVolumes_dd4hep(), and Acts::volumeBuilder_dd4hep().

+ Here is the caller graph for this function:

bool Acts::ActsExtension::hasValue ( const std::string &  tag,
const std::string &  category = "" 
) const

Check if the ActsExtension has a value (with optional category)

Parameters
typethe primary identifier in the flag store
typethe (optional) category in the flag store

Definition at line 30 of file ActsExtension.cpp.

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

Referenced by Acts::addLayerProtoMaterial(), Acts::DD4hepLayerBuilder::centralLayers(), Acts::DD4hepLayerBuilder::endcapLayers(), and Acts::volumeBuilder_dd4hep().

+ Here is the caller graph for this function:

std::string Acts::ActsExtension::toString ( ) const

Output to string.

Definition at line 53 of file ActsExtension.cpp.

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

References nlohmann::to_string().

+ Here is the call graph for this function:

Member Data Documentation

std::map<std::string, std::string> Acts::ActsExtension::m_flagStore
private

Multiple flags to be stored, existance defines set.

Definition at line 115 of file ActsExtension.hpp.

View newest version in sPHENIX GitHub at line 115 of file ActsExtension.hpp

std::map<std::string, double> Acts::ActsExtension::m_values
private

Unique value store for doubles.

Definition at line 118 of file ActsExtension.hpp.

View newest version in sPHENIX GitHub at line 118 of file ActsExtension.hpp


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