6 #include "GaudiKernel/MsgStream.h"
7 #include "GaudiKernel/Bootstrap.h"
8 #include "GaudiKernel/SystemOfUnits.h"
18 ,
unsigned int sampling
20 ,
const CellBinning &phiBinning
22 : m_manager(detManager)
23 , m_samplingIndex(sampling)
24 , m_regionIndex(region)
25 , m_phiBinning(phiBinning)
26 , m_outerRadSegNumber(region==0 ? 9: 3)
27 , m_etaBinning(0,0,1,0)
28 , m_numBlocks(sampling==0 ? 1:2)
29 , m_firstBlock(sampling==0 ? 0 : 2*sampling-1)
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();
53 IRDBRecordset_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;