56 ISvcLocator* svcLocator = Gaudi::svcLocator();
58 SmartIF<IGeoDbTagSvc> geoDbTagSvc{svcLocator->service(
"GeoDbTagSvc")};
59 if(!geoDbTagSvc.isValid()) {
60 throw std::runtime_error (
"Cannot locate GeoDBTagSvc");
63 SmartIF<IRDBAccessSvc> pAccessSvc{svcLocator->service(geoDbTagSvc->getParamSvcName())};
64 if(!pAccessSvc.isValid()) {
65 throw std::runtime_error (
"Cannot locate " + geoDbTagSvc->getParamSvcName());
68 std::string detectorKey;
69 std::string detectorNode;
71 if(geoDbTagSvc->getSqliteReader()==
nullptr) {
73 SmartIF<IGeoModelSvc> geoModel{svcLocator->service(
"GeoModelSvc")};
74 if(!geoModel.isValid()) {
75 throw std::runtime_error (
"Cannot locate GeoModelSvc");
79 std::string LArVersion = geoModel->LAr_VersionOverride();
81 detectorKey = LArVersion.empty() ?
AtlasVersion : LArVersion;
82 detectorNode = LArVersion.empty() ?
"ATLAS" :
"LAr";
85 if ( LArVersion.empty()) {
86 LArVersion=pAccessSvc->getChildTag(
"LAr",
AtlasVersion,
"ATLAS");
91 if (LArVersion ==
"LAr-00" || LArVersion ==
"LAr-01" ||
92 LArVersion ==
"LAr-Rome-Initial-00" ||
93 LArVersion ==
"LAr-H6-00" ||
94 LArVersion ==
"LAr-Commissioning-00" ||
95 LArVersion ==
"LAr-G3-00") {
97 log << MSG::INFO <<
" in RALEmb: old database tag used, some values are hard coded" <<
endmsg;
98 log << MSG::INFO <<
" Non projectivity of lead transition will not be simulated " <<
endmsg;
101 if (LArVersion ==
"LAr-00" || LArVersion ==
"LAr-01" || LArVersion ==
"LAr-02" ||
102 LArVersion ==
"LAr-Rome-Initial-00" ||
103 LArVersion ==
"LAr-H8-00" ||
104 LArVersion ==
"LAr-H6-00" ||
105 LArVersion ==
"LAr-Commissioning-00" ||
106 LArVersion ==
"LAr-G3-00") {
108 log << MSG::INFO <<
" in RALEmb: only old sagging values available" <<
endmsg;
111 if (LArVersion ==
"LAr-00" || LArVersion ==
"LAr-01" || LArVersion ==
"LAr-02" ||
112 LArVersion ==
"LAr-03" || LArVersion ==
"LAr-04" ||
113 LArVersion ==
"LAr-Rome-Initial-00" ||
114 LArVersion ==
"LAr-H8-00" ||
115 LArVersion ==
"LAr-H6-00" ||
116 LArVersion ==
"LAr-Commissioning-00" ||
117 LArVersion ==
"LAr-Commissioning-01" ||
118 LArVersion ==
"LAr-G3-00" ||
119 LArVersion ==
"LAr-02-Align-00" ||
120 LArVersion ==
"LAr-02-Align-01" ||
121 LArVersion ==
"LAr-H6-2002-00" ||
122 LArVersion ==
"LAr-H6-2003-00" ||
123 LArVersion ==
"LAr-TBEC-00" ) {
129 m_c->
barrelGeometry = pAccessSvc->getRecordsetPtr(
"BarrelGeometry",detectorKey, detectorNode);
130 m_c->
barrelSagging = pAccessSvc->getRecordsetPtr(
"BarrelSagging",detectorKey, detectorNode);
132 m_c->
barrelMotherboards = pAccessSvc->getRecordsetPtr(
"BarrelMotherboards",detectorKey, detectorNode);
133 m_c->
barrelLongDiv = pAccessSvc->getRecordsetPtr(
"BarrelLongDiv",detectorKey, detectorNode);
134 m_c->
presamplerGeometry = pAccessSvc->getRecordsetPtr(
"PresamplerGeometry",detectorKey, detectorNode);