13 #include "GeoModelKernel/GeoPhysVol.h"
14 #include "GeoModelKernel/GeoTransform.h"
15 #include "GeoModelKernel/GeoNameTag.h"
16 #include "GeoModelKernel/GeoShapeUnion.h"
18 #include "CLHEP/Geometry/Transform3D.h"
23 #include "GaudiKernel/MsgStream.h"
24 #include "GaudiKernel/Bootstrap.h"
30 #include "GeoModelKernel/CellBinning.h"
38 : m_detectorManager(nullptr),
59 ISvcLocator *svcLocator = Gaudi::svcLocator();
61 if (svcLocator->service(
"MessageSvc",
msgSvc,
true )==StatusCode::FAILURE) {
62 throw std::runtime_error(
"Error in LAr::DetectorFactor, cannot access MessageSvc");
65 MsgStream
log(
msgSvc,
"LAr::DetectorFactory");
67 log <<
"++++++++++++++++++++++++++++++++++++++++++++++++++++" << std::endl;
68 log <<
"+ +" << std::endl;
69 log <<
"+ HELLO from LAr::DetectorFactoryTBEC +" << std::endl;
70 log <<
"+ +" << std::endl;
71 log <<
"+++++++++++++++++++++++++++++++++++++++++++++++++++++" << std::endl;
75 if (svcLocator->service(
"DetectorStore",
detStore,
false )==StatusCode::FAILURE) {
76 throw std::runtime_error(
"Error in LArDetectorFactoryTBEC, cannot access DetectorStore");
90 a_container->add(
new GeoNameTag(
"LAr"));
97 if (StatusCode::SUCCESS==
detStore->retrieve(sEmecOuterWheel,
"EMEC_OUTER_WHEEL_POS" )) {
98 GeoIntrusivePtr<GeoFullPhysVol>emecEnvelope= sEmecOuterWheel->
getPhysVol();
103 CellBinning phiBinning(startPhi,endPhi,8,12);
111 CellBinning phiBinning(startPhi,endPhi,8,12);
118 CellBinning phiBinning(startPhi,endPhi,8,12);
125 CellBinning phiBinning(startPhi,endPhi,8,12);
132 CellBinning phiBinning(startPhi,endPhi,8,12);
139 CellBinning phiBinning(startPhi,endPhi,8,12);
146 CellBinning phiBinning(startPhi,endPhi,32,48);
153 CellBinning phiBinning(startPhi,endPhi,32,48);
160 CellBinning phiBinning(startPhi,endPhi,32,48);
167 if (StatusCode::SUCCESS==
detStore->retrieve(sEmecInnerWheel,
"EMEC_INNER_WHEEL_POS" )) {
168 GeoIntrusivePtr<GeoFullPhysVol>emecEnvelope= sEmecInnerWheel->
getPhysVol();
171 CellBinning phiBinning(startPhi,endPhi,8,12);
179 CellBinning phiBinning(startPhi,endPhi,8,12);
188 if (StatusCode::SUCCESS==
detStore->retrieve(sPresamplerEnvelope,
"PRESAMPLER_EC_POS" )) {
189 GeoIntrusivePtr<GeoFullPhysVol> PresamplerEnvelope=sPresamplerEnvelope->
getPhysVol();
190 CellBinning presamplerPhiBinning(startPhi,endPhi,8,12);
195 detStore->record(emecDetectorManager,emecDetectorManager->getName()).ignore();
196 m_detectorManager =
new LArDetectorManager(
nullptr,emecDetectorManager,
nullptr,
nullptr);
197 m_detectorManager->addTreeTop(
Envelope);
204 return m_detectorManager;