41{
42
44
45 EMECDetectorManager *emecDetectorManager = new EMECDetectorManager();
46
47
49
50 log << MSG::INFO <<
"+++++++++++++++++++++++++++++++++++++++++++++++++++++" <<
endmsg;
52 log << MSG::INFO <<
"+ HELLO from LAr::DetectorFactoryTBEC +" <<
endmsg;
54 log << MSG::INFO <<
"+++++++++++++++++++++++++++++++++++++++++++++++++++++" <<
endmsg;
55
56 SmartIF<StoreGateSvc>
detStore{Gaudi::svcLocator()->service(
"DetectorStore")};
58 throw std::runtime_error("Error in LArDetectorFactoryTBEC, cannot access DetectorStore");
59 }
60
61
62 LArMaterialManager lArMaterialManager(detStore);
63 lArMaterialManager.buildMaterials();
64
65 LArDetectorConstructionTBEC CryostatConstructionTB;
66
68
69 Envelope = CryostatConstructionTB.GetEnvelope();
70
71 a_container->add(new GeoNameTag("LAr"));
72 a_container->add(Envelope);
73
76
77 StoredPhysVol *sEmecOuterWheel;
78 if (StatusCode::SUCCESS==
detStore->retrieve(sEmecOuterWheel,
"EMEC_OUTER_WHEEL_POS" )) {
79 GeoIntrusivePtr<GeoFullPhysVol>emecEnvelope= sEmecOuterWheel->
getPhysVol();
80
81
82
83 {
84 CellBinning phiBinning(startPhi,endPhi,8,12);
85 EMECDetDescr *detDescr = new EMECDetDescr(emecDetectorManager,1,0,0,phiBinning);
88 }
89
90
91 {
92 CellBinning phiBinning(startPhi,endPhi,8,12);
93 EMECDetDescr *detDescr = new EMECDetDescr(emecDetectorManager,1,1,0,phiBinning);
96 }
97
98 {
99 CellBinning phiBinning(startPhi,endPhi,8,12);
100 EMECDetDescr *detDescr = new EMECDetDescr(emecDetectorManager,1,2,0,phiBinning);
103 }
104
105 {
106 CellBinning phiBinning(startPhi,endPhi,8,12);
107 EMECDetDescr *detDescr = new EMECDetDescr(emecDetectorManager,1,3,0,phiBinning);
110 }
111
112 {
113 CellBinning phiBinning(startPhi,endPhi,8,12);
114 EMECDetDescr *detDescr = new EMECDetDescr(emecDetectorManager,1,4,0,phiBinning);
117 }
118
119 {
120 CellBinning phiBinning(startPhi,endPhi,8,12);
121 EMECDetDescr *detDescr = new EMECDetDescr(emecDetectorManager,1,5,0,phiBinning);
124 }
125
126 {
127 CellBinning phiBinning(startPhi,endPhi,32,48);
128 EMECDetDescr *detDescr = new EMECDetDescr(emecDetectorManager,2,0,0,phiBinning);
131 }
132
133 {
134 CellBinning phiBinning(startPhi,endPhi,32,48);
135 EMECDetDescr *detDescr = new EMECDetDescr(emecDetectorManager,2,1,0,phiBinning);
138 }
139
140 {
141 CellBinning phiBinning(startPhi,endPhi,32,48);
142 EMECDetDescr *detDescr = new EMECDetDescr(emecDetectorManager,3,0,0,phiBinning);
145 }
146 }
147 StoredPhysVol *sEmecInnerWheel;
148 if (StatusCode::SUCCESS==
detStore->retrieve(sEmecInnerWheel,
"EMEC_INNER_WHEEL_POS" )) {
149 GeoIntrusivePtr<GeoFullPhysVol>emecEnvelope= sEmecInnerWheel->
getPhysVol();
150
151 {
152 CellBinning phiBinning(startPhi,endPhi,8,12);
153 EMECDetDescr *detDescr = new EMECDetDescr(emecDetectorManager,1,0,1,phiBinning);
156 }
157
158
159 {
160 CellBinning phiBinning(startPhi,endPhi,8,12);
161 EMECDetDescr *detDescr = new EMECDetDescr(emecDetectorManager,2,0,1,phiBinning);
164 }
165 }
166
167
168 StoredPhysVol *sPresamplerEnvelope;
169 if (StatusCode::SUCCESS==
detStore->retrieve(sPresamplerEnvelope,
"PRESAMPLER_EC_POS" )) {
170 GeoIntrusivePtr<GeoFullPhysVol> PresamplerEnvelope=sPresamplerEnvelope->
getPhysVol();
171 CellBinning presamplerPhiBinning(startPhi,endPhi,8,12);
172 EMECDetDescr *presamplerDetDescr = new EMECDetDescr(emecDetectorManager,0,0,0,presamplerPhiBinning);
173 EMECDetectorRegion *presamplerRegion =
new EMECDetectorRegion(PresamplerEnvelope,presamplerDetDescr,
EMECDetectorRegion::POS);
175 }
176 detStore->record(emecDetectorManager,emecDetectorManager->getName()).ignore();
177 m_detectorManager =
new LArDetectorManager(
nullptr,emecDetectorManager,
nullptr,
nullptr);
179
180}
void addDetectorRegion(const EMECDetectorRegion *region)
Add a new HEC Detector Region.
LArDetectorManager * m_detectorManager
static void SetInstance(std::unique_ptr< VDetectorParameters >)
GeoFullPhysVol * getPhysVol()
Destructor.
IMessageSvc * getMessageSvc(bool quiet=false)