CMS 3D CMS Logo

List of all members | Public Types | Public Member Functions | Private Member Functions | Private Attributes
cms::DDDetector Class Reference

#include <DDDetector.h>

Public Types

using Detector = dd4hep::Detector
 
using DetElement = dd4hep::DetElement
 
using HandleMap = dd4hep::Detector::HandleMap
 
using PlacedVolume = dd4hep::PlacedVolume
 
using Volume = dd4hep::Volume
 

Public Member Functions

 DDDetector ()=delete
 
 DDDetector (const std::string &, const std::string &, bool bigXML=false)
 
Detector const * description () const
 
const HandleMapdetectors () const
 The map of sub-detectors. More...
 
DetElement findElement (const std::string &) const
 Find DetElement as child of the top level volume by it's absolute path. More...
 
TGeoManager & manager () const
 The geometry manager of this instance. More...
 
DDPartSelectionMap const & partsels () const
 
DDSpecParRegistry const & specpars () const
 
DDVectorsMap const & vectors () const
 
DetElement world () const
 Reference to the top-most (world) detector element. More...
 
PlacedVolume worldPlacement () const
 Access to the physical volume of the world detector element. More...
 
Volume worldVolume () const
 Handle to the world volume containing everything. More...
 

Private Member Functions

void process (const std::string &)
 
void processXML (const std::string &)
 

Private Attributes

Detectorm_description = nullptr
 
DDPartSelectionMap m_partsels
 
DDSpecParRegistry m_specpars
 
const std::string m_tag
 
DDVectorsMap m_vectors
 

Detailed Description

Definition at line 11 of file DDDetector.h.

Member Typedef Documentation

◆ Detector

using cms::DDDetector::Detector = dd4hep::Detector

Definition at line 13 of file DDDetector.h.

◆ DetElement

using cms::DDDetector::DetElement = dd4hep::DetElement

Definition at line 14 of file DDDetector.h.

◆ HandleMap

using cms::DDDetector::HandleMap = dd4hep::Detector::HandleMap

Definition at line 15 of file DDDetector.h.

◆ PlacedVolume

using cms::DDDetector::PlacedVolume = dd4hep::PlacedVolume

Definition at line 16 of file DDDetector.h.

◆ Volume

using cms::DDDetector::Volume = dd4hep::Volume

Definition at line 17 of file DDDetector.h.

Constructor & Destructor Documentation

◆ DDDetector() [1/2]

cms::DDDetector::DDDetector ( const std::string &  ,
const std::string &  ,
bool  bigXML = false 
)
explicit

◆ DDDetector() [2/2]

cms::DDDetector::DDDetector ( )
delete

Member Function Documentation

◆ description()

Detector const* cms::DDDetector::description ( ) const
inline

Definition at line 46 of file DDDetector.h.

46 { return m_description; }

References m_description.

Referenced by cms::DDG4Builder::BuildGeometry(), and cms::DDDWorld::DDDWorld().

◆ detectors()

const dd4hep::Detector::HandleMap & DDDetector::detectors ( ) const

The map of sub-detectors.

Definition at line 53 of file DDDetector.cc.

53  {
55  return m_description->detectors();
56 }

References cms::cuda::assert(), and m_description.

Referenced by DDCMSDetector::analyze().

◆ findElement()

dd4hep::DetElement DDDetector::findElement ( const std::string &  path) const

Find DetElement as child of the top level volume by it's absolute path.

Definition at line 63 of file DDDetector.cc.

63  {
65  return dd4hep::detail::tools::findElement(*m_description, path);
66 }

References cms::cuda::assert(), m_description, and castor_dqm_sourceclient_file_cfg::path.

◆ manager()

TGeoManager & DDDetector::manager ( ) const

The geometry manager of this instance.

Definition at line 58 of file DDDetector.cc.

58  {
60  return m_description->manager();
61 }

References cms::cuda::assert(), and m_description.

◆ partsels()

DDPartSelectionMap const& cms::DDDetector::partsels ( ) const
inline

Definition at line 24 of file DDDetector.h.

24 { return m_partsels; }

References m_partsels.

◆ process()

void DDDetector::process ( const std::string &  )
private

Definition at line 25 of file DDDetector.cc.

25  {
26  std::string name("DD4hep_CompactLoader");
27  const char* files[] = {fileName.c_str(), nullptr};
28  m_description->apply(name.c_str(), 2, (char**)files);
29 }

References MillePedeFileConverter_cfg::fileName, MainPageGenerator::files, m_description, Skims_PA_cff::name, and AlCaHLTBitMon_QueryRunRegistry::string.

◆ processXML()

void DDDetector::processXML ( const std::string &  xml)
private

Definition at line 31 of file DDDetector.cc.

31  {
32  edm::LogVerbatim("Geometry") << "DDDetector::processXML process string size " << xml.size() << " with max_size "
33  << xml.max_size();
34  std::string name("DD4hep_XMLProcessor");
35  dd4hep::xml::DocumentHolder doc(dd4hep::xml::DocumentHandler().parse(xml.c_str(), xml.length()));
36 
37  char* args[] = {(char*)doc.root().ptr(), nullptr};
38  m_description->apply(name.c_str(), 1, (char**)args);
39 }

References writedatasetfile::args, common_cff::doc, m_description, Skims_PA_cff::name, dumpparser::parse(), and AlCaHLTBitMon_QueryRunRegistry::string.

◆ specpars()

DDSpecParRegistry const& cms::DDDetector::specpars ( ) const
inline

Definition at line 26 of file DDDetector.h.

26 { return m_specpars; }

References m_specpars.

Referenced by cms::DDG4Builder::BuildGeometry(), DDDWorld::DDDWorld(), and cms::DDCompactView::specpars().

◆ vectors()

DDVectorsMap const& cms::DDDetector::vectors ( ) const
inline

◆ world()

dd4hep::DetElement DDDetector::world ( ) const

Reference to the top-most (world) detector element.

Definition at line 48 of file DDDetector.cc.

48  {
50  return m_description->world();
51 }

References cms::cuda::assert(), and m_description.

Referenced by worldPlacement().

◆ worldPlacement()

dd4hep::PlacedVolume DDDetector::worldPlacement ( ) const

Access to the physical volume of the world detector element.

Definition at line 46 of file DDDetector.cc.

46 { return world().placement(); }

References world().

◆ worldVolume()

dd4hep::Volume DDDetector::worldVolume ( ) const

Member Data Documentation

◆ m_description

Detector* cms::DDDetector::m_description = nullptr
private

◆ m_partsels

DDPartSelectionMap cms::DDDetector::m_partsels
private

Definition at line 54 of file DDDetector.h.

Referenced by partsels().

◆ m_specpars

DDSpecParRegistry cms::DDDetector::m_specpars
private

Definition at line 55 of file DDDetector.h.

Referenced by specpars().

◆ m_tag

const std::string cms::DDDetector::m_tag
private

Definition at line 56 of file DDDetector.h.

◆ m_vectors

DDVectorsMap cms::DDDetector::m_vectors
private

Definition at line 53 of file DDDetector.h.

Referenced by vectors().

writedatasetfile.args
args
Definition: writedatasetfile.py:18
common_cff.doc
doc
Definition: common_cff.py:54
cms::cuda::assert
assert(be >=bs)
MillePedeFileConverter_cfg.fileName
fileName
Definition: MillePedeFileConverter_cfg.py:32
MainPageGenerator.files
files
Definition: MainPageGenerator.py:256
cms::DDDetector::m_specpars
DDSpecParRegistry m_specpars
Definition: DDDetector.h:55
cms::DDDetector::m_partsels
DDPartSelectionMap m_partsels
Definition: DDDetector.h:54
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
dumpparser.parse
def parse(path, config)
Definition: dumpparser.py:13
edm::LogVerbatim
Definition: MessageLogger.h:297
cms::DDDetector::m_vectors
DDVectorsMap m_vectors
Definition: DDDetector.h:53
Skims_PA_cff.name
name
Definition: Skims_PA_cff.py:17
castor_dqm_sourceclient_file_cfg.path
path
Definition: castor_dqm_sourceclient_file_cfg.py:37
cms::DDDetector::m_description
Detector * m_description
Definition: DDDetector.h:52
cms::DDDetector::world
DetElement world() const
Reference to the top-most (world) detector element.
Definition: DDDetector.cc:48