149 {
150
152
154
155 SG::ReadHandle<xAOD::EventInfo> eventInfoReadHandle(
m_eventInfoKey);
156
158
160
162
164
167 SG::ReadHandle<BeamBackgroundData> beamBackgroundDataReadHandle(
169
170 if (!beamBackgroundDataReadHandle.isValid())
173 else {
174 if (beamBackgroundDataReadHandle->GetNumSegment() >
176 if (eventInfoReadHandle->updateEventFlagBit(
180 else
182 }
183 if (beamBackgroundDataReadHandle->GetNumClusterShape() >
185 if (eventInfoReadHandle->updateEventFlagBit(
189 else
191 }
192 if (beamBackgroundDataReadHandle->GetNumNoTimeLoose() >
194 if (eventInfoReadHandle->updateEventFlagBit(
198 else
200 }
201 if (beamBackgroundDataReadHandle->GetNumTwoSidedNoTime() >
203 if (eventInfoReadHandle->updateEventFlagBit(
207 else
209 }
210 }
211 }
212
214
216
218 SG::ReadHandle<LUCID_RawDataContainer> LUCID_rawDataContainerReadHandle(
220
221 if (!LUCID_rawDataContainerReadHandle.isValid())
222 ATH_MSG_WARNING(
"Invalid ReadHandle to LUCID_RawDataContainer with name: "
224 else {
225 int LUCIDcounter(0);
226 for (auto LUCID_rawData : *LUCID_rawDataContainerReadHandle) {
227 LUCIDcounter += LUCID_rawData->getNhitsPMTsideA();
228 LUCIDcounter += LUCID_rawData->getNhitsPMTsideC();
229 }
231 if (eventInfoReadHandle->updateEventFlagBit(
235 else
237 }
238 }
239 }
240
242
244
245 SG::ReadHandle<BcmCollisionTime> bcmCollisionTimeReadHandle(
247
248 if (!bcmCollisionTimeReadHandle.isValid())
251 else {
252 std::vector<float> bcmTDs = bcmCollisionTimeReadHandle->getDeltaT();
254 << bcmCollisionTimeReadHandle->getMultiLG() << " getMultiHG "
255 << bcmCollisionTimeReadHandle->getMultiHG() << " TDs size "
256 << bcmTDs.size());
257 float minTD = 999;
258 float maxTD = 0;
259
260 for (
unsigned int i = 0;
i < bcmTDs.size();
i++) {
261 float td = bcmTDs.at(i);
263 if (fabs(td) > fabs(maxTD))
264 maxTD = td;
265 if (fabs(td) < fabs(minTD))
266 minTD = td;
267 }
268
269 ATH_MSG_DEBUG(
" BCMCollisionTime minDT " << minTD <<
" maxDT " << maxTD);
270
272 if (eventInfoReadHandle->updateEventFlagBit(
276 else
278 }
280 if (eventInfoReadHandle->updateEventFlagBit(
284 else
286 }
289 if (eventInfoReadHandle->updateEventFlagBit(
293 else
295 }
296 }
297
299
300
305
308 } else {
309 int NSCTsps = 0;
310 int NPIXsps = 0;
311 std::for_each(sctSP->begin(), sctSP->end(), [&NSCTsps](const auto coll) {
312 if (coll)
313 NSCTsps += coll->size();
314 });
315 std::for_each(pixSP->begin(), pixSP->end(), [&NPIXsps](const auto coll) {
316 if (coll)
317 NPIXsps += coll->size();
318 });
319
320
322 if (eventInfoReadHandle->updateEventFlagBit(
326 else
328 }
329
330
332 if (eventInfoReadHandle->updateEventFlagBit(
336 else
338 }
339
341 if (eventInfoReadHandle->updateEventFlagBit(
345 else
347 }
348
349
351 if (eventInfoReadHandle->updateEventFlagBit(
355 else
357 }
358 }
359 }
360
362
364
365 SG::ReadHandle<TileCellContainer> tileCellContainerReadHandle(
367
368 if (!tileCellContainerReadHandle.isValid())
371 else {
372 int MBTScount(0);
373
374 for (auto tileCellContainer : *tileCellContainerReadHandle) {
376 continue;
377 const uint8_t qbit1 = tileCellContainer->qbit1();
378
381 continue;
382 }
384 MBTScount++;
385 }
386
388 if (eventInfoReadHandle->updateEventFlagBit(
392 else
394 }
395 }
396
398
399
401
403 SG::ReadHandle<LArCollisionTime> lArCollisionTimeReadHandle(
405
406 if (!lArCollisionTimeReadHandle.isValid())
409 else {
412 float LArECtimeDiff = lArCollisionTimeReadHandle->timeA() -
413 lArCollisionTimeReadHandle->timeC();
415 if (eventInfoReadHandle->updateEventFlagBit(
419 else
421 }
424 if (eventInfoReadHandle->updateEventFlagBit(
428 else
430 }
431 }
432 }
433 }
434
436
439 ATH_MSG_DEBUG(
"MBTSTimeDiffHalo: " << eventInfoReadHandle->isEventFlagBitSet(
441 ATH_MSG_DEBUG(
"MBTSTimeDiffCol: " << eventInfoReadHandle->isEventFlagBitSet(
443 ATH_MSG_DEBUG(
"MBTSBeamVeto: " << eventInfoReadHandle->isEventFlagBitSet(
445 ATH_MSG_DEBUG(
"LArECTimeDiffHalo: " << eventInfoReadHandle->isEventFlagBitSet(
447 ATH_MSG_DEBUG(
"LArECTimeDiffCol: " << eventInfoReadHandle->isEventFlagBitSet(
450 "PixMultiplicityHuge: " << eventInfoReadHandle->isEventFlagBitSet(
452 ATH_MSG_DEBUG(
"PixSPNonEmpty: " << eventInfoReadHandle->isEventFlagBitSet(
455 "SCTMultiplicityHuge: " << eventInfoReadHandle->isEventFlagBitSet(
457 ATH_MSG_DEBUG(
"SCTSPNonEmpty: " << eventInfoReadHandle->isEventFlagBitSet(
459 ATH_MSG_DEBUG(
"CSCTimeDiffHalo: " << eventInfoReadHandle->isEventFlagBitSet(
461 ATH_MSG_DEBUG(
"CSCTimeDiffCol: " << eventInfoReadHandle->isEventFlagBitSet(
463 ATH_MSG_DEBUG(
"BCMTimeDiffHalo: " << eventInfoReadHandle->isEventFlagBitSet(
465 ATH_MSG_DEBUG(
"BCMTimeDiffCol: " << eventInfoReadHandle->isEventFlagBitSet(
467 ATH_MSG_DEBUG(
"BCMBeamVeto: " << eventInfoReadHandle->isEventFlagBitSet(
469 ATH_MSG_DEBUG(
"MuonTimingCol: " << eventInfoReadHandle->isEventFlagBitSet(
471 ATH_MSG_DEBUG(
"MuonTimingCosmic: " << eventInfoReadHandle->isEventFlagBitSet(
473 ATH_MSG_DEBUG(
"LUCIDBeamVeto: " << eventInfoReadHandle->isEventFlagBitSet(
475
476 return StatusCode::SUCCESS;
477}
#define ATH_MSG_WARNING(x)
SG::ReadHandleKey< xAOD::EventInfo > m_eventInfoKey
ReadHandleKey for EventInfo object.
SG::ReadHandleKey< BcmCollisionTime > m_bcmCollisionTimeKey
ReadHandleKey for BcmCollisionTime.
SG::ReadHandleKey< TileCellContainer > m_tileCellContainerKey
ReadHandleKey for TileCellContainer.
SG::ReadHandleKey< SpacePointContainer > m_pixSpacePointKey
SG::ReadHandleKey< SpacePointContainer > m_sctSpacePointKey
ReadHandleKey for SpacePointContainers.
SG::ReadHandleKey< BeamBackgroundData > m_beamBackgroundDataKey
ReadHandleKey for BeamBackgroundData.
SG::ReadHandleKey< LUCID_RawDataContainer > m_LUCID_rawDataContainerKey
ReadHandleKey for LUCID_RawDataContainer.
Gaudi::Property< bool > m_isMC
SG::ReadHandleKey< LArCollisionTime > m_lArCollisionTimeKey
ReadHandleKey for LArCollisionTime.
virtual bool isValid() override final
Can the handle be successfully dereferenced?
@ Background
The beam background detectors.