CMS 3D CMS Logo

Functions
DD4hep2DDDName Namespace Reference

Functions

std::string nameMatterLV (const std::string &name, bool dd4hep)
 
std::string namePV (const std::string &name, bool dd4hep)
 
std::string nameSolid (const std::string &name, bool dd4hep)
 
std::string noNameSpace (const std::string &name)
 

Function Documentation

◆ nameMatterLV()

std::string DD4hep2DDDName::nameMatterLV ( const std::string &  name,
bool  dd4hep 
)

◆ namePV()

std::string DD4hep2DDDName::namePV ( const std::string &  name,
bool  dd4hep 
)

Definition at line 25 of file DD4hep2DDDName.cc.

References create_idmaps::n, mergeVDriftHistosByStation::name, noNameSpace(), and AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by PrintG4Touch::dumpSummary(), Phase2SteppingAction::initPointer(), and SteppingAction::initPointer().

25  {
26  if (!dd4hep)
27  return name;
29  auto n = nam.rfind('_');
30  return ((n != std::string::npos) ? nam.substr(0, n) : nam);
31 }
std::string noNameSpace(const std::string &name)

◆ nameSolid()

std::string DD4hep2DDDName::nameSolid ( const std::string &  name,
bool  dd4hep 
)

Definition at line 13 of file DD4hep2DDDName.cc.

References create_idmaps::n, mergeVDriftHistosByStation::name, noNameSpace(), and AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by PrintSensitive::dumpTouch(), PrintG4Touch::dumpTouch(), and PrintG4Touch::getTouch().

13  {
14  if (!dd4hep)
15  return name;
17  auto n = nam.find("_shape");
18  if (n != std::string::npos)
19  nam = nam.substr(0, n);
20  if (name.find("_refl") != std::string::npos)
21  nam += "_refl";
22  return nam;
23 }
std::string noNameSpace(const std::string &name)

◆ noNameSpace()

std::string DD4hep2DDDName::noNameSpace ( const std::string &  name)