66 {
67
69 if(!this_gTowerContainer.isValid()){
71 return StatusCode::FAILURE;
72 }
73
74
75
76
77 int fcalEta = 19; int fcalPhi = 0; int fcalMod = 900000;
79 int transfcalEta = 15; int transfcalPhi = 0; int transfcalMod = 700000;
81 int emecEta = 11; int emecPhi = 0; int emecMod = 500000;
83 int transembEta = 7; int transembPhi = 0; int transembMod = 300000;
85 int embEta = 6; int embPhi = 0; int embMod = 100000;
87
88
89 int embposEta = 0; int embposPhi = 0; int embposMod = 200000;
91 int transembposEta = 7; int transembposPhi = 0; int transembposMod = 400000;
93 int emecposEta = 8; int emecposPhi = 0; int emecposMod = 600000;
95 int transfcalposEta = 12; int transfcalposPhi = 0; int transfcalposMod = 800000;
97 int fcalposEta = 16; int fcalposPhi = 0; int fcalposMod = 1000000;
99
100
101
102
103
106
107 int rows = tmp_gTowersIDs_subset.size();
108 int cols = tmp_gTowersIDs_subset[0].size();
109
110
111 for(int thisCol=0; thisCol<4; thisCol++){
112 for(
int thisRow=0; thisRow<
rows/2; thisRow++){
114 tmp_gTowersIDs_subset[thisRow][thisCol] = towerid;
115 }
116 }
117
118
119 for(int thisCol=4; thisCol<8; thisCol++){
120 for(
int thisRow=0; thisRow<
rows; thisRow++){
122 tmp_gTowersIDs_subset[thisRow][thisCol] = towerid;
123 }
124 }
125
126
127 for(int thisCol=8; thisCol<12; thisCol++){
128 for(
int thisRow=0; thisRow<
rows; thisRow++){
130 tmp_gTowersIDs_subset[thisRow][thisCol] = towerid;
131 }
132 }
133
134
135 for(
int thisRow = 0; thisRow <
rows; thisRow++){
136 int thisCol = 12;
137 int towerid = initialTRANSEMB + thisRow;
138 tmp_gTowersIDs_subset[thisRow][thisCol] = towerid;
139 }
140
141
142 for(int thisCol = 13; thisCol < 20; thisCol++){
143 for(
int thisRow=0; thisRow<
rows; thisRow++){
145 tmp_gTowersIDs_subset[thisRow][thisCol] = towerid;
146 }
147 }
148
149
150 for(int thisCol = 20; thisCol < 27; thisCol++){
151 for(
int thisRow=0; thisRow<
rows; thisRow++){
153 tmp_gTowersIDs_subset[thisRow][thisCol] = towerid;
154 }
155 }
156
157
158 for(
int thisRow = 0; thisRow <
rows; thisRow++){
159 int thisCol = 27;
160 int towerid = initialposTRANSEMB + thisRow;
161 tmp_gTowersIDs_subset[thisRow][thisCol] = towerid;
162 }
163
164 for(int thisCol=28; thisCol<32; thisCol++){
165 for(
int thisRow=0; thisRow<
rows; thisRow++){
167 tmp_gTowersIDs_subset[thisRow][thisCol] = towerid;
168 }
169 }
170
171
172 for(int thisCol=32; thisCol<36; thisCol++){
173 for(
int thisRow=0; thisRow<
rows; thisRow++){
175 tmp_gTowersIDs_subset[thisRow][thisCol] = towerid;
176 }
177 }
178
179
180 for(
int thisCol=36; thisCol<
cols; thisCol++){
181 for(
int thisRow=0; thisRow<
rows/2; thisRow++){
183 tmp_gTowersIDs_subset[thisRow][thisCol] = towerid;
184 }
185 }
186
187 if(false){
189 for (int thisRow=rows-1; thisRow>=0; thisRow--){
190 for (
int thisCol=0; thisCol<
cols; thisCol++){
191 int tmptowerid = tmp_gTowersIDs_subset[thisRow][thisCol];
192 const float tmptowereta = this_gTowerContainer->findTower(tmptowerid)->eta();
193 const float tmptowerphi = this_gTowerContainer->findTower(tmptowerid)->phi();
194 if(thisCol != cols-1){
ATH_MSG_DEBUG(
"| " << tmptowerid <<
"([" << tmptowerphi <<
"][" << tmptowereta <<
"]) "); }
195 else {
ATH_MSG_DEBUG(
"| " << tmptowerid <<
"([" << tmptowereta <<
"][" << tmptowerphi <<
"]) |"); }
196 }
197 }
198 }
199
200 std::vector<uint32_t> allgRhoTobs;
201 std::vector<uint32_t> allgBlockTobs;
202 std::vector<uint32_t> allgJetTobs;
203
204 std::vector<int32_t> allgScalarEJwojTobs;
205 std::vector<uint32_t> allgMETComponentsJwojTobs;
206 std::vector<uint32_t> allgMHTComponentsJwojTobs;
207 std::vector<uint32_t> allgMSTComponentsJwojTobs;
208
209 std::vector<uint32_t> allgMETComponentsNoiseCutTobs;
210 std::vector<uint32_t> allgMETComponentsRmsTobs;
211 std::vector<uint32_t> allgScalarENoiseCutTobs;
212 std::vector<uint32_t> allgScalarERmsTobs;
213
215 tmp_gTowersIDs_subset,
216 gFEXOutputs,
217 allgRhoTobs,
218 allgBlockTobs,
219 allgJetTobs,
220 allgScalarEJwojTobs,
221 allgMETComponentsJwojTobs,
222 allgMHTComponentsJwojTobs,
223 allgMSTComponentsJwojTobs,
224 allgMETComponentsNoiseCutTobs,
225 allgMETComponentsRmsTobs,
226 allgScalarENoiseCutTobs,
227 allgScalarERmsTobs));
228
229
230 std::unique_ptr< xAOD::gFexJetRoIContainer > gRhoContainer = std::make_unique<xAOD::gFexJetRoIContainer> ();
231 std::unique_ptr< xAOD::gFexJetRoIAuxContainer > gRhoAuxContainer = std::make_unique<xAOD::gFexJetRoIAuxContainer> ();
232 gRhoContainer->setStore(gRhoAuxContainer.get());
233
234 std::unique_ptr< xAOD::gFexJetRoIContainer > gBlockContainer = std::make_unique<xAOD::gFexJetRoIContainer> ();
235 std::unique_ptr< xAOD::gFexJetRoIAuxContainer > gBlockAuxContainer = std::make_unique<xAOD::gFexJetRoIAuxContainer> ();
236 gBlockContainer->setStore(gBlockAuxContainer.get());
237
238 std::unique_ptr< xAOD::gFexJetRoIContainer > gJetContainer = std::make_unique<xAOD::gFexJetRoIContainer> ();
239 std::unique_ptr< xAOD::gFexJetRoIAuxContainer > gJetAuxContainer = std::make_unique<xAOD::gFexJetRoIAuxContainer> ();
240 gJetContainer->setStore(gJetAuxContainer.get());
241
242
243 std::unique_ptr< xAOD::gFexGlobalRoIContainer > gScalarEJwojContainer = std::make_unique<xAOD::gFexGlobalRoIContainer> ();
244 std::unique_ptr< xAOD::gFexGlobalRoIAuxContainer > gScalarEJwojAuxContainer = std::make_unique<xAOD::gFexGlobalRoIAuxContainer> ();
245 gScalarEJwojContainer->setStore(gScalarEJwojAuxContainer.get());
246
247 std::unique_ptr< xAOD::gFexGlobalRoIContainer > gMETComponentsJwojContainer = std::make_unique<xAOD::gFexGlobalRoIContainer> ();
248 std::unique_ptr< xAOD::gFexGlobalRoIAuxContainer > gMETComponentsJwojAuxContainer = std::make_unique<xAOD::gFexGlobalRoIAuxContainer> ();
249 gMETComponentsJwojContainer->setStore(gMETComponentsJwojAuxContainer.get());
250
251 std::unique_ptr< xAOD::gFexGlobalRoIContainer > gMHTComponentsJwojContainer = std::make_unique<xAOD::gFexGlobalRoIContainer> ();
252 std::unique_ptr< xAOD::gFexGlobalRoIAuxContainer > gMHTComponentsJwojAuxContainer = std::make_unique<xAOD::gFexGlobalRoIAuxContainer> ();
253 gMHTComponentsJwojContainer->setStore(gMHTComponentsJwojAuxContainer.get());
254
255 std::unique_ptr< xAOD::gFexGlobalRoIContainer > gMSTComponentsJwojContainer = std::make_unique<xAOD::gFexGlobalRoIContainer> ();
256 std::unique_ptr< xAOD::gFexGlobalRoIAuxContainer > gMSTComponentsJwojAuxContainer = std::make_unique<xAOD::gFexGlobalRoIAuxContainer> ();
257 gMSTComponentsJwojContainer->setStore(gMSTComponentsJwojAuxContainer.get());
258
259
260 std::unique_ptr< xAOD::gFexGlobalRoIContainer > gMETComponentsNoiseCutContainer = std::make_unique<xAOD::gFexGlobalRoIContainer> ();
261 std::unique_ptr< xAOD::gFexGlobalRoIAuxContainer > gMETComponentsNoiseCutAuxContainer = std::make_unique<xAOD::gFexGlobalRoIAuxContainer> ();
262 gMETComponentsNoiseCutContainer->setStore(gMETComponentsNoiseCutAuxContainer.get());
263
264 std::unique_ptr< xAOD::gFexGlobalRoIContainer > gMETComponentsRmsContainer = std::make_unique<xAOD::gFexGlobalRoIContainer> ();
265 std::unique_ptr< xAOD::gFexGlobalRoIAuxContainer > gMETComponentsRmsAuxContainer = std::make_unique<xAOD::gFexGlobalRoIAuxContainer> ();
266 gMETComponentsRmsContainer->setStore(gMETComponentsRmsAuxContainer.get());
267
268 std::unique_ptr< xAOD::gFexGlobalRoIContainer > gScalarENoiseCutContainer = std::make_unique<xAOD::gFexGlobalRoIContainer> ();
269 std::unique_ptr< xAOD::gFexGlobalRoIAuxContainer > gScalarENoiseCutAuxContainer = std::make_unique<xAOD::gFexGlobalRoIAuxContainer> ();
270 gScalarENoiseCutContainer->setStore(gScalarENoiseCutAuxContainer.get());
271
272 std::unique_ptr< xAOD::gFexGlobalRoIContainer > gScalarERmsContainer = std::make_unique<xAOD::gFexGlobalRoIContainer> ();
273 std::unique_ptr< xAOD::gFexGlobalRoIAuxContainer > gScalarERmsAuxContainer = std::make_unique<xAOD::gFexGlobalRoIAuxContainer> ();
274 gScalarERmsContainer->setStore(gScalarERmsAuxContainer.get());
275
276
277
278 SG::ReadHandle<TrigConf::L1Menu> l1Menu (
m_l1MenuKey,ctx);
280
281 auto & thr_gJ = l1Menu->thrExtraInfo().gJ();
282 auto & thr_gLJ = l1Menu->thrExtraInfo().gLJ();
283 auto & thr_gXE = l1Menu->thrExtraInfo().gXE();
284 auto & thr_gTE = l1Menu->thrExtraInfo().gTE();
285
286 int gJ_scale = thr_gJ.resolutionMeV();
287 int gLJ_scale = thr_gLJ.resolutionMeV();
288 int gXE_scale = thr_gXE.resolutionMeV();
289 int gTE_scale = thr_gTE.resolutionMeV();
290
291
292
293 for(auto tob : allgRhoTobs){
295 }
296
297 for(auto tob : allgBlockTobs){
299 }
300
301
302 for(auto tob : allgJetTobs){
304 }
305
306
307 for(auto tob : allgScalarEJwojTobs){
309 }
310
311 for(auto tob : allgMETComponentsJwojTobs){
313 }
314
315 for(auto tob : allgMHTComponentsJwojTobs){
317 }
318
319 for(auto tob : allgMSTComponentsJwojTobs){
321 }
322
323
324 for(auto tob : allgMETComponentsNoiseCutTobs){
326 }
327
328 for(auto tob : allgMETComponentsRmsTobs){
330 }
331
332 for(auto tob : allgScalarENoiseCutTobs){
334 }
335
336 for(auto tob : allgScalarERmsTobs){
338 }
339
340
341 SG::WriteHandle<xAOD::gFexJetRoIContainer> outputgFexRhoHandle(
m_gFexRhoOutKey,ctx);
342 ATH_MSG_DEBUG(
" write: " << outputgFexRhoHandle.key() <<
" = " <<
"..." );
343 ATH_CHECK(outputgFexRhoHandle.record(std::move(gRhoContainer),std::move(gRhoAuxContainer)));
344
345 SG::WriteHandle<xAOD::gFexJetRoIContainer> outputgFexBlockHandle(
m_gFexBlockOutKey,ctx);
346 ATH_MSG_DEBUG(
" write: " << outputgFexBlockHandle.key() <<
" = " <<
"..." );
347 ATH_CHECK(outputgFexBlockHandle.record(std::move(gBlockContainer),std::move(gBlockAuxContainer)));
348
349 SG::WriteHandle<xAOD::gFexJetRoIContainer> outputgFexJetHandle(
m_gFexJetOutKey,ctx);
350 ATH_MSG_DEBUG(
" write: " << outputgFexJetHandle.key() <<
" = " <<
"..." );
351 ATH_CHECK(outputgFexJetHandle.record(std::move(gJetContainer),std::move(gJetAuxContainer)));
352
353 SG::WriteHandle<xAOD::gFexGlobalRoIContainer> outputgScalarEJwojHandle(
m_gScalarEJwojOutKey,ctx);
354 ATH_MSG_DEBUG(
" write: " << outputgScalarEJwojHandle.key() <<
" = " <<
"..." );
355 ATH_CHECK(outputgScalarEJwojHandle.record(std::move(gScalarEJwojContainer),std::move(gScalarEJwojAuxContainer)));
356
358 ATH_MSG_DEBUG(
" write: " << outputgMETComponentsJwojHandle.key() <<
" = " <<
"..." );
359 ATH_CHECK(outputgMETComponentsJwojHandle.record(std::move(gMETComponentsJwojContainer),std::move(gMETComponentsJwojAuxContainer)));
360
362 ATH_MSG_DEBUG(
" write: " << outputgMHTComponentsJwojHandle.key() <<
" = " <<
"..." );
363 ATH_CHECK(outputgMHTComponentsJwojHandle.record(std::move(gMHTComponentsJwojContainer),std::move(gMHTComponentsJwojAuxContainer)));
364
366 ATH_MSG_DEBUG(
" write: " << outputgMSTComponentsJwojHandle.key() <<
" = " <<
"..." );
367 ATH_CHECK(outputgMSTComponentsJwojHandle.record(std::move(gMSTComponentsJwojContainer),std::move(gMSTComponentsJwojAuxContainer)));
368
370 ATH_MSG_DEBUG(
" write: " << outputgMETComponentsNoiseCutHandle.key() <<
" = " <<
"..." );
371 ATH_CHECK(outputgMETComponentsNoiseCutHandle.record(std::move(gMETComponentsNoiseCutContainer),std::move(gMETComponentsNoiseCutAuxContainer)));
372
374 ATH_MSG_DEBUG(
" write: " << outputgMETComponentsRmsHandle.key() <<
" = " <<
"..." );
375 ATH_CHECK(outputgMETComponentsRmsHandle.record(std::move(gMETComponentsRmsContainer),std::move(gMETComponentsRmsAuxContainer)));
376
378 ATH_MSG_DEBUG(
" write: " << outputgScalarENoiseCutHandle.key() <<
" = " <<
"..." );
379 ATH_CHECK(outputgScalarENoiseCutHandle.record(std::move(gScalarENoiseCutContainer),std::move(gScalarENoiseCutAuxContainer)));
380
381 SG::WriteHandle<xAOD::gFexGlobalRoIContainer> outputgScalarERmsHandle(
m_gScalarERmsOutKey,ctx);
382 ATH_MSG_DEBUG(
" write: " << outputgScalarERmsHandle.key() <<
" = " <<
"..." );
383 ATH_CHECK(outputgScalarERmsHandle.record(std::move(gScalarERmsContainer),std::move(gScalarERmsAuxContainer)));
384
385 return StatusCode::SUCCESS;
386 }
#define ATH_CHECK
Evaluate an expression and check for errors.
static constexpr int centralNphi
static constexpr int forwardNphi
virtual StatusCode fillgMSTComponentsJwojEDM(xAOD::gFexGlobalRoIContainer *gMSTComponentsJwojContainer, uint32_t tobWord, int scale1, int scale2) const override
virtual StatusCode fillgMHTComponentsJwojEDM(xAOD::gFexGlobalRoIContainer *gMHTComponentsJwojContainer, uint32_t tobWord, int scale1, int scale2) const override
virtual StatusCode fillgMETComponentsJwojEDM(xAOD::gFexGlobalRoIContainer *gMETComponentsJwojContainer, uint32_t tobWord, int scale1, int scale2) const override
virtual StatusCode fillgRhoEDM(xAOD::gFexJetRoIContainer *gRhoContainer, uint32_t tobWord, int scale) const override
Create and fill a new gFexJetRoI object, and return a pointer to it.
SG::ReadHandleKey< TrigConf::L1Menu > m_l1MenuKey
SG::ReadHandleKey< LVL1::gTowerContainer > m_gTowerContainerSGKey
SG::WriteHandleKey< xAOD::gFexJetRoIContainer > m_gFexJetOutKey
virtual StatusCode fillgScalarERmsEDM(xAOD::gFexGlobalRoIContainer *gScalarERmsContainer, uint32_t tobWord, int scale1, int scale2) const override
SG::WriteHandleKey< xAOD::gFexGlobalRoIContainer > m_gMETComponentsJwojOutKey
SG::WriteHandleKey< xAOD::gFexGlobalRoIContainer > m_gMETComponentsNoiseCutOutKey
virtual StatusCode fillgScalarEJwojEDM(xAOD::gFexGlobalRoIContainer *gScalarEJwojContainer, uint32_t tobWord, int scale1, int scale2) const override
SG::WriteHandleKey< xAOD::gFexJetRoIContainer > m_gFexRhoOutKey
SG::WriteHandleKey< xAOD::gFexGlobalRoIContainer > m_gMHTComponentsJwojOutKey
virtual StatusCode fillgMETComponentsNoiseCutEDM(xAOD::gFexGlobalRoIContainer *gMETComponentsNoiseCutContainer, uint32_t tobWord, int scale1, int scale2) const override
virtual StatusCode fillgMETComponentsRmsEDM(xAOD::gFexGlobalRoIContainer *gMETComponentsRmsContainer, uint32_t tobWord, int scale1, int scale2) const override
SG::WriteHandleKey< xAOD::gFexGlobalRoIContainer > m_gScalarEJwojOutKey
SG::WriteHandleKey< xAOD::gFexGlobalRoIContainer > m_gScalarERmsOutKey
SG::WriteHandleKey< xAOD::gFexGlobalRoIContainer > m_gMETComponentsRmsOutKey
SG::WriteHandleKey< xAOD::gFexGlobalRoIContainer > m_gScalarENoiseCutOutKey
virtual StatusCode fillgScalarENoiseCutEDM(xAOD::gFexGlobalRoIContainer *gScalarENoiseCutContainer, uint32_t tobWord, int scale1, int scale2) const override
virtual StatusCode fillgJetEDM(xAOD::gFexJetRoIContainer *gJetContainer, uint32_t tobWord, int scale) const override
virtual StatusCode fillgBlockEDM(xAOD::gFexJetRoIContainer *gBlockContainer, uint32_t tobWord, int scale) const override
SG::WriteHandleKey< xAOD::gFexGlobalRoIContainer > m_gMSTComponentsJwojOutKey
SG::WriteHandleKey< xAOD::gFexJetRoIContainer > m_gFexBlockOutKey
virtual int calcTowerID(int eta, int phi, int nphi, int mod) const override
ToolHandle< IgFEXSim > m_gFEXSimTool
Internal data.
std::array< std::array< int, 40 >, 32 > gTowersIDs