diff --git a/Detector/GeoSvc/src/GeoSvc.cpp b/Detector/GeoSvc/src/GeoSvc.cpp index 42990b30a6560556d98c2ffd1ab1996a30e3c8ef..7dae597184cef6c342fb8a9deecbcfc6aa122c01 100644 --- a/Detector/GeoSvc/src/GeoSvc.cpp +++ b/Detector/GeoSvc/src/GeoSvc.cpp @@ -22,7 +22,7 @@ DECLARE_COMPONENT(GeoSvc) GeoSvc::GeoSvc(const std::string& name, ISvcLocator* svc) -: base_class(name, svc), m_dd4hep_geo(nullptr), m_vxdData(nullptr), m_beamData(nullptr){ +: base_class(name, svc), m_dd4hep_geo(nullptr), m_vxdData(nullptr), m_beamPipeData(nullptr){ } @@ -53,6 +53,12 @@ GeoSvc::initialize() { dd4hep::DetElement pipe = it->second; //info() << " " << it->first << " " << pipe.id() << " " << pipe.path() << " " << pipe.placementPath() << endmsg; } + try{ + m_beamPipeData = sub.extension<dd4hep::rec::ConicalSupportData>(); + } + catch(std::runtime_error& e){ + info() << e.what() << " " << m_beamPipeData << endmsg; + } } if(it->first=="VXD"){ sc = convertVXD(sub); diff --git a/Detector/GeoSvc/src/GeoSvc.h b/Detector/GeoSvc/src/GeoSvc.h index cc54142f7f30290bdb218c0582073761491be111..6dfbdbb6cf561189c0fb2aeee2e6be9643f960aa 100644 --- a/Detector/GeoSvc/src/GeoSvc.h +++ b/Detector/GeoSvc/src/GeoSvc.h @@ -37,7 +37,7 @@ class GeoSvc: public extends<Service, IGeoSvc> { const gear::ZPlanarParametersImpl* getVXDParameters() override {return m_vxdParameters;}; const dd4hep::rec::ZPlanarData* getVXDData() override {return m_vxdData;}; - const dd4hep::rec::ConicalSupportData* getBeamPipeData() override {return m_beamData;}; + const dd4hep::rec::ConicalSupportData* getBeamPipeData() override {return m_beamPipeData;}; const std::map<std::string,double>& getDetParameters(std::string name) override; const double getDetParameter(std::string set_name, std::string par_name) override; @@ -55,7 +55,7 @@ class GeoSvc: public extends<Service, IGeoSvc> { gear::ZPlanarParametersImpl* m_vxdParameters; dd4hep::rec::ZPlanarData* m_vxdData; - dd4hep::rec::ConicalSupportData* m_beamData; + dd4hep::rec::ConicalSupportData* m_beamPipeData; //gear::GearParametersImpl* m_vxdInfra; std::map<std::string, std::map<std::string,double> > m_detParameters;