Constructor.
21{
22
23 ISvcLocator *svcLocator = Gaudi::svcLocator();
24
25 SmartIF<IGeoModelSvc> geoModel{svcLocator->service("GeoModelSvc")};
26 if(!geoModel.isValid())
27 throw std::runtime_error("Error in HECDetectorManager, cannot access GeoModelSvc");
28
29 SmartIF<IGeoDbTagSvc> geoDbTagSvc{svcLocator->service("GeoDbTagSvc")};
30 if(!geoDbTagSvc.isValid())
31 throw std::runtime_error("Error in HECDetectorManager, cannot access GeoDbTagSvc");
32
33 SmartIF<IRDBAccessSvc> rdbAccess{svcLocator->service(geoDbTagSvc->getParamSvcName())};
34 if(!rdbAccess.isValid())
35 throw std::runtime_error("Error in HECDetectorManager, cannot access RDBAccessSvc");
36
37 std::string larKey, larNode;
38 if(geoDbTagSvc->getSqliteReader()==nullptr) {
39 DecodeVersionKey larVersionKey(geoModel, "LAr");
40 larKey = larVersionKey.tag();
41 larNode = larVersionKey.node();
42 }
43
44 IRDBRecordset_ptr barrelLongDiv = rdbAccess->getRecordsetPtr(
"BarrelLongDiv", larKey, larNode);
45 if (barrelLongDiv->
size()==0)
throw std::runtime_error(
"Error getting BarrelLongDiv table");
46
47 IRDBRecordset_ptr barrelGeometry = rdbAccess->getRecordsetPtr(
"BarrelGeometry", larKey, larNode);
48 if (barrelGeometry->
size()==0)
throw std::runtime_error(
"Error getting BarrelGeometry table");
49
50 IRDBRecordset_ptr presamplerGeometry = rdbAccess->getRecordsetPtr(
"PresamplerGeometry", larKey, larNode);
51 if (presamplerGeometry->
size()==0)
throw std::runtime_error(
"Error getting PresamplerGeometry table");
52
53 IRDBRecordset_ptr embSampSep = rdbAccess->getRecordsetPtr(
"EMBSampSep", larKey, larNode);
54 if (embSampSep->
size()==0) {
55 embSampSep = rdbAccess->getRecordsetPtr("EMBSampSep", "EMBSampSep-00");
56 if (embSampSep->
size()==0) {
57 throw std::runtime_error("Error getting EMBSampSep table");
58 }
59 }
60
62 m_rInAc = (*barrelGeometry)[0]->getDouble(
"RIN_AC")*Gaudi::Units::cm;
63 m_rOutAc = (*barrelGeometry)[0]->getDouble(
"ROUT_AC")*Gaudi::Units::cm;
64 for (
int i=0;
i<8;
i++)
m_EE.push_back((*barrelLongDiv)[0]->getDouble(
"EE",i));
65 for (
int i=0;
i<8;
i++)
m_RMX12.push_back((*barrelLongDiv)[0]->getDouble(
"RMX12",i)*Gaudi::Units::cm);
66 for (
int i=0;
i<53;
i++)
m_RMX23.push_back((*barrelLongDiv)[0]->getDouble(
"RMX23",i)*Gaudi::Units::cm);
67
68 int sampSepSize = embSampSep->
size();
70 for (
int i{0};
i<sampSepSize; ++
i) {
72 }
73}
std::shared_ptr< IRDBRecordset > IRDBRecordset_ptr
std::vector< double > m_EE
std::vector< double > m_RMX12
std::vector< double > m_RMX23
std::vector< double > m_EMBSamplingSepInnerRMax
double m_presamplerRadius
virtual unsigned int size() const =0