File indexing completed on 2025-01-30 10:30:21
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012 #ifndef GEOSVC_H
0013 #define GEOSVC_H
0014
0015
0016 #include <k4Interface/IGeoSvc.h>
0017
0018
0019 #include "GaudiKernel/MsgStream.h"
0020 #include "GaudiKernel/Service.h"
0021 #include "GaudiKernel/ServiceHandle.h"
0022
0023
0024 #include "DD4hep/Detector.h"
0025 #include "DDRec/CellIDPositionConverter.h"
0026 #include "DDRec/SurfaceManager.h"
0027 #include "DDRec/Surface.h"
0028 #include "DD4hep/DD4hepUnits.h"
0029
0030
0031
0032 class GeoSvc : public extends<Service, IGeoSvc> {
0033 private:
0034
0035
0036
0037
0038
0039 dd4hep::Detector* m_dd4hepGeo = nullptr;
0040
0041
0042 Gaudi::Property<std::vector<std::string>> m_xmlFileNames{
0043 this, "detectors", {}, "Detector descriptions XML-files"};
0044
0045 Gaudi::Property<std::string> _{
0046 this, "materials", "", "(unused)"};
0047
0048
0049 MsgStream m_log;
0050
0051 public:
0052 GeoSvc(const std::string& name, ISvcLocator* svc);
0053
0054 virtual ~GeoSvc();
0055
0056 virtual StatusCode initialize() final;
0057
0058 virtual StatusCode finalize() final;
0059
0060
0061
0062
0063 StatusCode buildDD4HepGeo();
0064
0065
0066
0067
0068 virtual dd4hep::DetElement getDD4HepGeo() override;
0069
0070
0071
0072
0073
0074 virtual dd4hep::Detector* getDetector() override;
0075 virtual dd4hep::Detector* lcdd() {
0076 return getDetector();
0077 };
0078 virtual G4VUserDetectorConstruction* getGeant4Geo() override {
0079 assert(false && "getGeant4Geo() noy implemented");
0080 return nullptr;
0081 };
0082 virtual std::string constantAsString(std::string const& name) override {
0083 assert(false && "constantsAsString() noy implemented");
0084 (void)name;
0085 return "";
0086 };
0087
0088 };
0089
0090 #endif