1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
|
#ifndef DetectorDescription_DDCMS_DDDetector_h
#define DetectorDescription_DDCMS_DDDetector_h
#include "DetectorDescription/DDCMS/interface/DDVectorRegistry.h"
#include <DD4hep/Detector.h>
#include <DD4hep/SpecParRegistry.h>
#include <string>
class TGeoManager;
namespace cms {
class DDDetector {
public:
explicit DDDetector(const std::string&, const std::string&, bool bigXML = false);
DDDetector() = delete;
cms::DDVectorsMap const& vectors() const { return m_vectors; }
dd4hep::PartSelectionMap const& partsels() const { return m_partsels; }
dd4hep::SpecParRegistry const& specpars() const { return m_specpars; }
//! Handle to the world volume containing everything
dd4hep::Volume worldVolume() const;
//! Reference to the top-most (world) detector element
dd4hep::DetElement world() const;
//! The geometry manager of this instance
TGeoManager& manager() const;
//! Find DetElement as child of the top level volume by it's absolute path
dd4hep::DetElement findElement(const std::string&) const;
dd4hep::Detector const* description() const { return m_description; }
private:
void process(const std::string&);
void processXML(const std::string&);
dd4hep::Detector* m_description = nullptr;
cms::DDVectorsMap m_vectors;
dd4hep::PartSelectionMap m_partsels;
dd4hep::SpecParRegistry m_specpars;
const std::string m_tag;
};
} // namespace cms
#endif
|