18 ,
unsigned int sampling
20 ,
const CellBinning &phiBinning
32 ISvcLocator *svcLocator = Gaudi::svcLocator();
34 SmartIF<IGeoModelSvc> geoModel{svcLocator->service(
"GeoModelSvc")};
35 if(!geoModel.isValid())
36 throw std::runtime_error(
"Error in HECDetectorManager, cannot access GeoModelSvc");
38 SmartIF<IGeoDbTagSvc> geoDbTagSvc{svcLocator->service(
"GeoDbTagSvc")};
39 if(!geoDbTagSvc.isValid())
40 throw std::runtime_error(
"Error in HECDetectorManager, cannot access GeoDbTagSvc");
42 SmartIF<IRDBAccessSvc> rdbAccess{svcLocator->service(geoDbTagSvc->getParamSvcName())};
43 if(!rdbAccess.isValid())
44 throw std::runtime_error(
"Error in HECDetectorManager, cannot access RDBAccessSvc");
46 std::string larKey, larNode;
47 if(geoDbTagSvc->getSqliteReader()==
nullptr) {
49 larKey = larVersionKey.
tag();
50 larNode = larVersionKey.
node();
53IRDBRecordset_ptr hadronicEndcap = rdbAccess->getRecordsetPtr(
"HadronicEndcap", larKey, larNode);
55 if (hadronicEndcap->
size()==0)
throw std::runtime_error(
"Error getting HadronicEndcap table");
59 m_etaBinning = CellBinning( region==0 ? (sampling<2 ? 1.5: (sampling<3 ? 1.6: 1.7)) : 2.5,
60 region==0 ? 2.5 : (sampling==0 || sampling==3) ? 3.3 : 3.1,
61 region==0 ? (sampling<2 ? 10: (sampling<3 ? 9:8)) : (sampling==0 || sampling==3) ? 4:3,
62 region==0 ? (sampling<2 ? 0: (sampling<3 ? 1:2)):0);
64 m_etaBinning = CellBinning( region==0 ? (sampling<2 ? 2.1: 2.3) : 2.5,
65 region==0 ? 2.5 : (sampling==0 ) ? 3.3 : 3.1,
66 region==0 ? (sampling<2 ? 4: 2) : (sampling==0) ? 4:3,
67 region==0 ? (sampling<2 ? 6: 8):0);
72 if(isTestBeam) startBlock = 0;
75 for (
unsigned int b=startBlock;b<
m_manager->getNumBlocks();b++) {
78 double back = pos+
m_manager->getBlock(b)->getDepth();
82 pos +=
m_manager->getBlock(b)->getDepth();
83 if(isTestBeam && b==2) pos += (*hadronicEndcap)[0]->getDouble(
"GAPWHL")*Gaudi::Units::cm;