File indexing completed on 2024-04-06 12:05:27
0001 #ifndef DetectorDescription_DDCMS_DDDetector_h
0002 #define DetectorDescription_DDCMS_DDDetector_h
0003
0004 #include "DetectorDescription/DDCMS/interface/DDVectorRegistry.h"
0005 #include <DD4hep/Detector.h>
0006 #include <DD4hep/SpecParRegistry.h>
0007 #include <string>
0008
0009 class TGeoManager;
0010
0011 namespace cms {
0012 class DDDetector {
0013 public:
0014 explicit DDDetector(const std::string&, const std::string&, bool bigXML = false);
0015 DDDetector() = delete;
0016
0017 cms::DDVectorsMap const& vectors() const { return m_vectors; }
0018
0019 dd4hep::PartSelectionMap const& partsels() const { return m_partsels; }
0020
0021 dd4hep::SpecParRegistry const& specpars() const { return m_specpars; }
0022
0023
0024 dd4hep::Volume worldVolume() const;
0025
0026
0027 dd4hep::DetElement world() const;
0028
0029
0030 TGeoManager& manager() const;
0031
0032
0033 dd4hep::DetElement findElement(const std::string&) const;
0034
0035 dd4hep::Detector const* description() const { return m_description; }
0036
0037 private:
0038 void process(const std::string&);
0039 void processXML(const std::string&);
0040
0041 dd4hep::Detector* m_description = nullptr;
0042 cms::DDVectorsMap m_vectors;
0043 dd4hep::PartSelectionMap m_partsels;
0044 dd4hep::SpecParRegistry m_specpars;
0045 const std::string m_tag;
0046 };
0047 }
0048
0049 #endif