CMS 3D CMS Logo

DDDetector.h
Go to the documentation of this file.
1 #ifndef DETECTOR_DESCRIPTION_DD_DETECTOR_H
2 #define DETECTOR_DESCRIPTION_DD_DETECTOR_H
3 
5 #include <DD4hep/Detector.h>
6 #include <string>
7 
8 class TGeoManager;
9 
10 namespace cms {
11  class DDDetector {
12  public:
14  using DetElement = dd4hep::DetElement;
15  using HandleMap = dd4hep::Detector::HandleMap;
18 
19  explicit DDDetector(const std::string&, const std::string&, bool bigXML = false);
20  DDDetector() = delete;
21 
22  DDVectorsMap const& vectors() const { return m_vectors; }
23 
24  DDPartSelectionMap const& partsels() const { return m_partsels; }
25 
26  DDSpecParRegistry const& specpars() const { return m_specpars; }
27 
29  Volume worldVolume() const;
30 
33 
35  DetElement world() const;
36 
38  const HandleMap& detectors() const;
39 
41  TGeoManager& manager() const;
42 
44  DetElement findElement(const std::string&) const;
45 
46  Detector const* description() const { return m_description; }
47 
48  private:
49  void process(const std::string&);
50  void processXML(const std::string&);
51 
52  Detector* m_description = nullptr;
57  };
58 } // namespace cms
59 
60 #endif
Detector * m_description
Definition: DDDetector.h:52
DDPartSelectionMap const & partsels() const
Definition: DDDetector.h:24
const std::string m_tag
Definition: DDDetector.h:56
void process(const std::string &)
Definition: DDDetector.cc:25
DDDetector()=delete
DDSpecParRegistry const & specpars() const
Definition: DDDetector.h:26
Volume worldVolume() const
Handle to the world volume containing everything.
Definition: DDDetector.cc:41
DetElement findElement(const std::string &) const
Find DetElement as child of the top level volume by it&#39;s absolute path.
Definition: DDDetector.cc:63
PlacedVolume worldPlacement() const
Access to the physical volume of the world detector element.
Definition: DDDetector.cc:46
TGeoManager & manager() const
The geometry manager of this instance.
Definition: DDDetector.cc:58
dd4hep::Volume Volume
Definition: DDDetector.h:17
DDVectorsMap const & vectors() const
Definition: DDDetector.h:22
dd4hep::PlacedVolume PlacedVolume
tbb::concurrent_unordered_map< std::string, tbb::concurrent_vector< std::string >> DDPartSelectionMap
tbb::concurrent_unordered_map< std::string, tbb::concurrent_vector< double >> DDVectorsMap
Definition: DDNamespace.h:14
DDPartSelectionMap m_partsels
Definition: DDDetector.h:54
dd4hep::Detector Detector
Definition: DDDetector.h:13
dd4hep::Volume Volume
DDVectorsMap m_vectors
Definition: DDDetector.h:53
DDSpecParRegistry m_specpars
Definition: DDDetector.h:55
Namespace of DDCMS conversion namespace.
dd4hep::PlacedVolume PlacedVolume
Definition: DDDetector.h:16
dd4hep::Detector::HandleMap HandleMap
Definition: DDDetector.h:15
const HandleMap & detectors() const
The map of sub-detectors.
Definition: DDDetector.cc:53
dd4hep::DetElement DetElement
Definition: DDDetector.h:14
DetElement world() const
Reference to the top-most (world) detector element.
Definition: DDDetector.cc:48
void processXML(const std::string &)
Definition: DDDetector.cc:31
Detector const * description() const
Definition: DDDetector.h:46