ATLAS Offline Software
Loading...
Searching...
No Matches
TileMBTSMonitorAlgorithm.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3*/
4
6
9
11
13
15
17
19
20 ATH_MSG_INFO("in initialize()");
21
22 if (m_energyCut.size() != MAX_MBTS_COUNTER) {
23 int numberOfCounters{MAX_MBTS_COUNTER};
24 ATH_MSG_ERROR("Energy cuts are not provided for all ("
25 << numberOfCounters << ") MBTS. Provided only "
26 << m_energyCut.size() << " energy cuts");
27
28 return StatusCode::FAILURE;
29 }
30
31 ATH_CHECK( m_cablingSvc.retrieve() );
32 m_cabling = m_cablingSvc->cablingService();
33
34 ATH_CHECK( detStore()->retrieve(m_tileTBID) );
35 ATH_CHECK( detStore()->retrieve(m_tileHWID) );
36
37 ATH_CHECK( m_DQstatusKey.initialize() );
39 ATH_CHECK( m_mbtsCellContainerKey.initialize() );
40
41 memset(m_MBTSchannels, -1, sizeof(m_MBTSchannels));
42 memset(m_MBTScounters, -1, sizeof(m_MBTScounters));
43 for (unsigned int ros = 3; ros < Tile::MAX_ROS ; ++ros) {
44 for (unsigned int drawer = 0; drawer < Tile::MAX_DRAWER; ++drawer) {
45 HWIdentifier drawerHWID = m_tileHWID->drawer_id(ros, drawer);
46 Identifier mbtsID = m_cabling->drawer2MBTS_id(drawerHWID);
47 if (mbtsID.is_valid()) {
48 int channel = m_tileHWID->channel(m_cabling->s2h_channel_id(mbtsID));
49 m_MBTSchannels[ros - 3][drawer] = channel;
50
51 int counter = getMBTSCounter(mbtsID);
52 m_MBTScounters[ros - 3][drawer] = counter;
53
54 ATH_MSG_DEBUG( "Found MBTS: drawer/channel (counter)=> " << drawer << "/" << channel << "(" << counter << ")" );
55
56 }
57 }
58 }
59
63
65
68
70 }
71
72 bool doMenuInit = false;
73 if (m_useTrigger && (m_ctpID.size() != MAX_MBTS_COUNTER)) {
74 if (m_l1Triggers.size() != MAX_MBTS_COUNTER) {
75 int numberOfCounters{MAX_MBTS_COUNTER};
76 ATH_MSG_WARNING("Names are not provided for all ("
77 << numberOfCounters << ") L1 MBTS triggers. Provided only "
78 << m_l1Triggers.size() << " L1 MBTS");
79
80 ATH_MSG_WARNING("Autoconfiguration of CTP ID to L1 MBTS mapping is not possible: force useTrigger=false");
81 m_useTrigger = false;
82 } else {
83 doMenuInit = true;
84 }
85 }
86 ATH_CHECK( m_L1MenuKey.initialize( doMenuInit ) );
87
88 ATH_CHECK( m_ctpRdoKey.initialize(m_useTrigger) );
89 if (m_useTrigger) {
95
96 int nTriggers = 3;
97 m_trigGroups = Monitored::buildToolMap<int>(m_tools, "MBTS_Triggers", nTriggers);
98 m_trigInWinGroups = Monitored::buildToolMap<int>(m_tools, "MBTS_TriggersInWindow", nTriggers);
99 m_trigSumGroups = Monitored::buildToolMap<int>(m_tools, "MBTS_TriggersSum", nTriggers);
100 m_coinTrigGroups = Monitored::buildToolMap<int>(m_tools, "MBTS_CoincidentTriggers", nTriggers);
101 m_deltaBCIDSumGroups = Monitored::buildToolMap<int>(m_tools, "MBTS_DeltaBCID_Summary", nTriggers);
104 }
105
106 return StatusCode::SUCCESS;
107}
108
110
111 if (m_useTrigger && (m_ctpID.size() != MAX_MBTS_COUNTER)) {
112 m_ctpID.value().resize(MAX_MBTS_COUNTER, -1);
113 ATH_MSG_INFO("Try to autoconfigure CTP ID to L1 MBTS trigger mapping from L1 menu");
115 if( l1MenuHandle.isValid() ) {
116 for (const TrigConf::L1Item& item: *l1MenuHandle) {
117 auto it = std::find(m_l1Triggers.begin(), m_l1Triggers.end(), item.name());
118 if (it != m_l1Triggers.end()) {
119 unsigned int counter = std::distance(m_l1Triggers.begin(), it);
120 m_ctpID[counter] = item.ctpId();
121 ATH_MSG_DEBUG("Found in L1 Menu: " << item.name() << ", CTP ID: " << item.ctpId() << ", counter: " << counter);
122 }
123 }
124 } else {
125 ATH_MSG_WARNING("L1 menu is not available: force useTrigger=false");
126 m_useTrigger = false;
127 }
128 }
129
130 return StatusCode::SUCCESS;
131}
132
133StatusCode TileMBTSMonitorAlgorithm::fillHistograms( const EventContext& ctx ) const {
134
135 // In case you want to measure the execution time
136 auto timer = Monitored::Timer("TIME_execute");
137 auto timeerGroup = Monitored::Group(getGroup("TileMBTSMonExecuteTime"), timer);
138
139 const xAOD::EventInfo* eventInfo = GetEventInfo(ctx).get();
140
141 const int Trig_b7(7);
142 uint32_t l1TriggerType(eventInfo->level1TriggerType());
143 bool physicRun = (l1TriggerType == 0) || (((l1TriggerType >> Trig_b7) & 1) == 1);
144
145 if (!physicRun) {
146 ATH_MSG_DEBUG("Calibration Event found => skip filling histograms.");
147 return StatusCode::SUCCESS;
148 }
149
150 auto lumiBlock = Monitored::Scalar<int>("lumiBlock", eventInfo->lumiBlock());
151
152 int nHitsA(0);
153 int nHitsC(0);
154 double timeA(0.0);
155 double timeC(0.0);
156
157 // unsigned int l1aBCID(0);
158 std::vector<bool> hasTBP(MAX_MBTS_COUNTER, false);
159
160 if (m_useTrigger) {
161 SG::ReadHandle<CTP_RDO> ctpRdoContainer(m_ctpRdoKey, ctx);
162 ATH_CHECK( ctpRdoContainer.isValid() );
163
164 uint32_t nBunches(0);
165 CTP_Decoder ctpDecoder;
166
167 ctpDecoder.setRDO(ctpRdoContainer.get());
168 nBunches = ctpRdoContainer->getNumberOfBunches();
169
170 if (nBunches > 0) {
171 short l1aBunch = ctpRdoContainer->getL1AcceptBunchPosition();
172 const std::vector<CTP_BC>& ctpBunchCrossings = ctpDecoder.getBunchCrossings();
173 const CTP_BC & bunch = ctpBunchCrossings[l1aBunch];
174 auto l1aBCID = Monitored::Scalar<unsigned int>("bcid", bunch.getBCID());
175 unsigned int bcid;
176 auto triggerMultiplicityA = Monitored::Scalar<int>("multiplicityA", 0);
177 auto triggerMultiplicityC = Monitored::Scalar<int>("multiplicityC", 0);
178
179 const std::bitset<512> currentTBP(bunch.getTBP());
180 for (size_t counter = 0; counter < m_ctpID.size(); ++counter) {
181 if (m_ctpID[counter] < 0) continue;
182 if (currentTBP.test(m_ctpID[counter])) {
183 hasTBP[counter] = true;
184 if (counter < 16) {
185 ++triggerMultiplicityA;
186 } else {
187 ++triggerMultiplicityC;
188 }
189 }
190 }
191
192 fill("TileTriggerMultiplicityMBTSA", l1aBCID, triggerMultiplicityA);
193 fill("TileTriggerMultiplicityMBTSC", l1aBCID, triggerMultiplicityC);
194 fill("TileTriggerMultiplicityPerSideMBTS", triggerMultiplicityA, triggerMultiplicityC);
195
196 std::vector<int> triggerTypes; // A-Inner, A-Outer, A-Total, C-Inner, C-Outer, C-Total
197 std::vector<int> triggerCounters;
198 std::vector<int> triggerInWindowCounters;
199 std::vector<int> deltaBCIDs;
200
201 //int deltaBCID;
202 // Loop over bunch crossings in CTP window
203 for (const CTP_BC& ctpBunchCrossing : ctpBunchCrossings) {
204 bcid = ctpBunchCrossing.getBCID();
205
206 int deltaBCID = l1aBCID - bcid;
207
208 std::vector<std::reference_wrapper<const std::bitset<512>>> triggers;
209 triggers.push_back(ctpBunchCrossing.getTBP());
210 triggers.push_back(ctpBunchCrossing.getTAP());
211 triggers.push_back(ctpBunchCrossing.getTAV());
212
213 int triggerIdx = 0;
214 for (const std::bitset<512>& currentTrigger : triggers) {
215 triggerTypes.clear();
216 triggerCounters.clear();
217 triggerInWindowCounters.clear();
218 deltaBCIDs.clear();
219
220 for (size_t counter = 0; counter < m_ctpID.size(); ++counter) {
221 if (m_ctpID[counter] < 0) continue;
222 if (currentTrigger.test(m_ctpID[counter])) {
223 triggerInWindowCounters.push_back(counter);
224 auto monBCID = Monitored::Scalar<unsigned int>("MBTS_BCID", bcid);
225 fill(m_tools[m_bcidGroups[triggerIdx][counter]], monBCID);
226 deltaBCIDs.push_back(deltaBCID);
227 auto monDeltaBCID = Monitored::Scalar<float>("DeltaBCID", deltaBCID);
228 fill(m_tools[m_deltaBCIDGroups[triggerIdx][counter]], monDeltaBCID);
229 if (bcid == l1aBCID) {
230 triggerCounters.push_back(counter);
231 int mbtsType = counter / 8; // A-Inner, A-Outer, C-Inner, C-Outer
232 if (counter > 15) {
233 mbtsType += 1; // Shift C-Side to allow A-Total
234 }
235 triggerTypes.push_back(mbtsType);
236 triggerTypes.push_back(counter < 16 ? 2 : 5); // A-Total, C-Total
237 }
238 }
239 }
240
241 auto monTriggerInWindowCounter = Monitored::Collection("TriggerCounter", triggerInWindowCounters);
242 fill(m_tools[m_trigInWinGroups[triggerIdx]], monTriggerInWindowCounter);
243
244 auto monDeltaBCID = Monitored::Collection("DeltaBCID", deltaBCIDs);
245 fill(m_tools[m_deltaBCIDSumGroups[triggerIdx]], monTriggerInWindowCounter, monDeltaBCID);
246
247 if (bcid == l1aBCID) {
248 auto monTriggerType = Monitored::Collection("TriggerType", triggerTypes);
249 fill(m_tools[m_trigSumGroups[triggerIdx]], monTriggerType);
250
251 auto monTriggerCounter = Monitored::Collection("TriggerCounter", triggerCounters);
252 fill(m_tools[m_trigGroups[triggerIdx]], monTriggerCounter);
253
254 std::vector<int> coincidentTriggers1;
255 std::vector<int> coincidentTriggers2;
256 for (int counter1 : triggerCounters) {
257 for (int counter2 : triggerCounters) {
258 coincidentTriggers1.push_back(counter1);
259 coincidentTriggers2.push_back(counter2);
260 }
261 }
262 auto monCoincidentTrigger1 = Monitored::Collection("CoincidentTrigger1", coincidentTriggers1);
263 auto monCoincidentTrigger2 = Monitored::Collection("CoincidentTrigger2", coincidentTriggers2);
264 fill(m_tools[m_coinTrigGroups[triggerIdx]], monCoincidentTrigger1, monCoincidentTrigger2);
265 }
266 ++triggerIdx;
267 }
268 }
269
270 }
271 }
272
273 auto monEnergy = Monitored::Scalar<float>("Energy", 0.0F);
274 auto monTime = Monitored::Scalar<float>("Time", 0.0F);
275
276 std::vector<float> energyCounters;
277 energyCounters.reserve(MAX_MBTS_COUNTER);
278 auto monEnergyCounter = Monitored::Collection("EnergyCounter", energyCounters);
279
280 std::vector<float> energies;
281 energies.reserve(MAX_MBTS_COUNTER);
282 auto monSummaryEnergy = Monitored::Collection("SummaryEnergy", energies);
283
284 std::vector<float> timeCounters;
285 auto monTimeCounter = Monitored::Collection("TimeCounter", timeCounters);
286
287 std::vector<float> times;
288 auto monSummaryTime = Monitored::Collection("SummaryTime", times);
289
290 std::vector<float> triggerEnergies;
291 auto monTriggerSummaryEnergy = Monitored::Collection("SummaryEnergy", triggerEnergies);
292
293 std::vector<float> triggerTimes;
294 auto monTriggerSummaryTime = Monitored::Collection("SummaryTime", triggerTimes);
295
296 std::vector<int> energyHitCounters;
297 std::vector<int> triggerHitCounters;
298
300 ATH_CHECK( mbtsContainer.isValid() );
301
302 for (const TileCell* cell : *mbtsContainer) {
303
304 Identifier id = cell->ID();
305
306 // Calculate MBTS counter from "side", "tower" and "module"
307 // Counter goes 0-31.
308 // EBA-inner:0-7,EBA-outer:8-15,EBC-inner:16-23,EBC-outer:24-31
309 // tower is 1 for outer counter (lower eta) and 0 for inner counter (higher eta)
310 // module counts from 0-7 in increasing phi
311 // side is -1 for EBC 1 for EBA
312
313 int counter = getMBTSCounter(id);
314 energyCounters.push_back(counter);
315
316 double energy = cell->energy();
317 monEnergy = energy;
318 energies.push_back(energy);
319
320 double time = cell->time();
321 monTime = time;
322
323 float quality = cell->quality();
324
325 ATH_MSG_VERBOSE("Counter: " << counter
326 << ", energy= " << energy << " pCb"
327 << ", time= " << time
328 << ", quality= " << quality);
329
330
332 fill(m_tools[m_energyGroups[counter]], monEnergy);
333 fill(m_tools[m_energyLBGroups[counter]], lumiBlock, monEnergy);
334 }
335
336 if (m_useTrigger) {
337 auto monEfficiency = Monitored::Scalar<float>("Efficiency", 0.0F);
338 if (hasTBP[counter]) {
339 monEfficiency = 1.0F;
340 triggerHitCounters.push_back(counter);
341 triggerEnergies.push_back(energy);
342 triggerTimes.push_back(time);
343
344 fill(m_tools[m_energyTrigGroups[counter]], monEnergy);
345 fill(m_tools[m_energyTrigLBGroups[counter]], lumiBlock, monEnergy);
346 fill(m_tools[m_timeTrigGroups[counter]], monTime);
347 }
348 fill(m_tools[m_effTrigGroups[counter]], monEnergy, monEfficiency);
349 }
350
351 if (energy > m_energyCut[counter]) {
352
353 timeCounters.push_back(counter);
354 times.push_back(time);
355
356 energyHitCounters.push_back(counter);
357
359 fill(m_tools[m_timeGroups[counter]], monTime);
360 }
361
362 if (std::abs(time) > 10e-4) {
363 if (counter < 16) { // MBTS A side
364 timeA += time;
365 ++nHitsA;
366 } else { // MBTS C side
367 timeC += time;
368 ++nHitsC;
369 }
370 }
371
372 }
373 }
374
375 auto monHitCounter = Monitored::Collection("HitCounter", energyHitCounters);
376 fill("TileOccupancyMBTS", monHitCounter);
377 fill("TileEnergySummaryMBTS", monEnergyCounter, monSummaryEnergy);
378
379 fill("TileTimeSummaryMBTS", monTimeCounter, monSummaryTime);
380
381 if (m_useTrigger) {
382 auto monTriggerHitCounter = Monitored::Collection("HitCounter", triggerHitCounters);
383 fill("TileTriggerOccupancyMBTS", monTriggerHitCounter);
384 fill("TileTriggerEnergySummaryMBTS", monTriggerHitCounter, monTriggerSummaryEnergy);
385 fill("TileTriggerTimeSummaryMBTS", monTriggerHitCounter, monTriggerSummaryTime);
386 }
387
388 if (nHitsA > 0) {
389 timeA /= nHitsA;
390 auto monTimeA = Monitored::Scalar<float>("TimeA", timeA);
391 fill("TileTimeMBTSA", monTimeA);
392 }
393
394 if (nHitsC > 0) {
395 timeC /= nHitsC;
396 auto monTimeC = Monitored::Scalar<float>("TimeC", timeC);
397 fill("TileTimeMBTSC", monTimeC);
398 }
399
400 if (nHitsA > 0 && nHitsC > 0) {
401 double timeDifference = timeA - timeC;
402 auto monTimeDifference = Monitored::Scalar<float>("TimeDifference", timeDifference);
403 fill("TileTimeDifferenceMBTS", monTimeDifference);
404 fill("TileTimeDifferenceMBTSLB", lumiBlock, monTimeDifference);
405 }
406
407
408 std::vector<int> coincidentCounters1;
409 auto monCoincidentCounters1 = Monitored::Collection("CoincidentCounter1", coincidentCounters1);
410
411 std::vector<int> coincidentCounters2;
412 auto monCoincidentCounters2 = Monitored::Collection("CoincidentCounter2", coincidentCounters2);
413
414 for (int counter1 : energyHitCounters) {
415 for (int counter2 : energyHitCounters) {
416 coincidentCounters1.push_back(counter1);
417 coincidentCounters2.push_back(counter2);
418 }
419 }
420
421 fill("TileCoincidentHitsMBTS", monCoincidentCounters1, monCoincidentCounters2);
422
423 std::vector<int> errors;
424 auto monErrors = Monitored::Collection("Error", errors);
425
426 std::vector<int> counters;
427 auto monErrorCounters = Monitored::Collection("ErrorCounter", counters);
428
429 // Create instance of TileDQstatus used to check for readout errors in Tile
430 const TileDQstatus* dqStatus = SG::makeHandle (m_DQstatusKey, ctx).get();
431
432 // Check only low gain (in physics runs low and high gain status should identical)
433 const int gain{0};
434 for (unsigned int ros = 3; ros < Tile::MAX_ROS; ++ros) {
435 for (unsigned int drawer = 0; drawer < Tile::MAX_DRAWER; ++drawer) {
436 int channel = m_MBTSchannels[ros - 3][drawer];
437 int counter = m_MBTScounters[ros - 3][drawer];
438
439 if (channel > 0) {
440 // Fill Readout Error histogram
441 if (!(dqStatus->isChanDQgood(ros, drawer, channel))) {
442 setDigiError(counters, errors, counter, GENERAL);
443 }
444 if (dqStatus->checkGlobalCRCErr(ros, drawer, gain)) {
445 setDigiError(counters, errors, counter, GLOBAL_CRC);
446 }
447 if (dqStatus->checkROD_CRCErr(ros, drawer, MBTS_DMU, gain)) {
448 setDigiError(counters, errors, counter, ROD_CRC);
449 }
450 if (dqStatus->checkFE_CRCErr(ros, drawer, MBTS_DMU, gain)) {
451 setDigiError(counters, errors, counter, FRONTEND_CRC);
452 }
453 if (dqStatus->checkBCIDErr(ros, drawer, MBTS_DMU, gain)) {
454 setDigiError(counters, errors, counter, BCID);
455 }
456 if (dqStatus->checkHeaderFormatErr(ros, drawer, MBTS_DMU, gain)) {
457 setDigiError(counters, errors, counter, HEADER_FORMAT);
458 }
459 if (dqStatus->checkHeaderParityErr(ros, drawer, MBTS_DMU, gain)) {
460 setDigiError(counters, errors, counter, HEADER_PARITY);
461 }
462 if (dqStatus->checkSampleFormatErr(ros, drawer, MBTS_DMU, gain)) {
463 setDigiError(counters, errors, counter, SAMPLE_FORMAT);
464 }
465 if (dqStatus->checkSampleParityErr(ros, drawer, MBTS_DMU, gain)) {
466 setDigiError(counters, errors, counter, SAMPLE_PARITY);
467 }
468 if (dqStatus->checkMemoryParityErr(ros, drawer, MBTS_DMU, gain)) {
469 setDigiError(counters, errors, counter, MEMORY_PARITY);
470 }
471 }
472 }
473 }
474
475 fill("TileErrorsMBTS", monErrorCounters, monErrors);
476
477
480 ATH_CHECK( digitsContainer.isValid() );
481
482 auto monPedestal = Monitored::Scalar<float>("Pedestal", 0.0F);
483 auto monHFN = Monitored::Scalar<float>("HFN", 0.0F);
484
485 for (const TileDigitsCollection* digitsCollection : *digitsContainer) {
486 if (digitsCollection->empty()) continue;
487 HWIdentifier adc_id = digitsCollection->front()->adc_HWID();
488 int ros = m_tileHWID->ros(adc_id);
489 if (ros > 2) { // Extended barrel
490 int drawer = m_tileHWID->drawer(adc_id);
491 int MBTSchannel = m_MBTSchannels[ros - 3][drawer];
492
493 if (MBTSchannel >= 0) {
494 for (const TileDigits* tile_digits: *digitsCollection) {
495
496 adc_id = tile_digits->adc_HWID();
497 int channel = m_tileHWID->channel(adc_id);
498 if (channel == MBTSchannel) { // MBTS channel found
499 int counter = m_MBTScounters[ros - 3][drawer];
500
501 double sampleMean = 0;
502 double sampleRMS = 0;
503
504 std::vector<float> samples = tile_digits->samples();
505 unsigned int nSamples = samples.size();
506 if (nSamples > 0) {
507
508 for (float sample : samples) {
509 sampleMean += sample;
510 sampleRMS += sample * sample;
511 }
512
513 auto min_max = std::minmax_element(samples.begin(), samples.end());
514 float minSample = *min_max.first;
515 float maxSample = *min_max.second;
516
517 if ((maxSample - minSample) > 10) {
518
519 auto monSamples = Monitored::Collection("Samples", samples);
520
521 std::vector<int> sampleNumbers;
522 sampleNumbers.reserve(nSamples);
523 for (unsigned int i = 0; i < nSamples; ++i) sampleNumbers.push_back(i);
524 auto monSampleNumbers = Monitored::Collection("SampleNumbers", sampleNumbers);
525
526 fill(m_tools[m_pulseGroups[counter]], monSampleNumbers, monSamples);
527 if (hasTBP[counter]) {
528 fill(m_tools[m_pulseTrigGroups[counter]], monSampleNumbers, monSamples);
529 }
530 }
531
532 sampleMean /= nSamples;
533 sampleRMS = sampleRMS / nSamples - sampleMean * sampleMean;
534 sampleRMS = (sampleRMS > 0.0 && nSamples > 1u) ? sqrt(sampleRMS * nSamples / (nSamples - 1u)) : 0.0;
535
536 monHFN = sampleRMS;
537 fill(m_tools[m_hfnGroups[counter]], monHFN);
538
539 monPedestal = samples.front();
540 fill(m_tools[m_pedestalGroups[counter]], monPedestal);
541
542 }
543 }
544 }
545 }
546 }
547 }
548 }
549
550 return StatusCode::SUCCESS;
551}
552
553
554
556 int counter = m_tileTBID->phi(mbtsID) + 8 * m_tileTBID->eta(mbtsID);
557 if (m_tileTBID->side(mbtsID) < 0) counter += 16;// EBC side
558 return counter;
559}
560
561
562void TileMBTSMonitorAlgorithm::setDigiError(std::vector<int>& counters, std::vector<int>& errors,
563 int counter, int error) const {
564
565 counters.push_back(counter);
566 errors.push_back(error);
567}
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_ERROR(x)
#define ATH_MSG_INFO(x)
#define ATH_MSG_VERBOSE(x)
#define ATH_MSG_WARNING(x)
#define ATH_MSG_DEBUG(x)
Handle class for reading from StoreGate.
const ServiceHandle< StoreGateSvc > & detStore() const
const ToolHandle< GenericMonitoringTool > & getGroup(const std::string &name) const
Get a specific monitoring tool from the tool handle array.
virtual StatusCode initialize() override
initialize
SG::ReadHandle< xAOD::EventInfo > GetEventInfo(const EventContext &) const
Return a ReadHandle for an EventInfo object (get run/event numbers, etc.)
ToolHandleArray< GenericMonitoringTool > m_tools
Array of Generic Monitoring Tools.
uint32_t getBCID() const
Get BCID as unsigned integer.
const std::bitset< 512 > & getTBP() const
get bitset of TBP words
Definition CTP_Decoder.h:92
const std::vector< CTP_BC > & getBunchCrossings()
Get vector reference of bunch-crossing data of the current event.
void setRDO(const CTP_RDO *rdo)
Set RDO and fill internal variables from the data object.
bool is_valid() const
Check if id is in a valid state.
Group of local monitoring quantities and retain correlation when filling histograms
Declare a monitored scalar variable.
A monitored timer.
virtual bool isValid() override final
Can the handle be successfully dereferenced?
const_pointer_type get() const
Dereference the pointer, but don't cache anything.
static const unsigned int MAX_ROS
Number of ROSs.
static const unsigned int MAX_DRAWER
Number of drawers in ROS 1-4.
Class that holds Data Quality fragment information and provides functions to extract the data quality...
int checkHeaderFormatErr(int partition, int drawer, int dmu, int gain) const
returns 1 if DMU has header word format error
bool isChanDQgood(int partition, int drawer, int ch) const
returns status of single channel (if bigain, returns AND of ADCs' status
int checkBCIDErr(int partition, int drawer, int dmu, int gain) const
returns 1 if DMU has BCID mismatch between DMU and ROD Since BCID errors in the DQ fragment are det...
int checkGlobalCRCErr(int partition, int drawer, int gain) const
returns 1 if adc channel has global CRC error
int checkSampleFormatErr(int partition, int drawer, int dmu, int gain) const
returns 1 if DMU has data word format error
int checkROD_CRCErr(int partition, int drawer, int dmu, int gain) const
returns 1 if DMU has CRC error originating in ROD
int checkHeaderParityErr(int partition, int drawer, int dmu, int gain) const
returns 1 if DMU has header word parity error
int checkFE_CRCErr(int partition, int drawer, int dmu, int gain) const
returns 1 if DMU has CRC error originating in FE electronics
int checkMemoryParityErr(int partition, int drawer, int dmu, int gain) const
returns 1 if DMU has memory parity error
int checkSampleParityErr(int partition, int drawer, int dmu, int gain) const
returns 1 if DMU has data word parity error
SG::ReadHandleKey< CTP_RDO > m_ctpRdoKey
SG::ReadHandleKey< TrigConf::L1Menu > m_L1MenuKey
SG::ReadHandleKey< TileDQstatus > m_DQstatusKey
SG::ReadHandleKey< TileCellContainer > m_mbtsCellContainerKey
int getMBTSCounter(Identifier mbtsID) const
static const unsigned int MBTS_DMU
void setDigiError(std::vector< int > &counters, std::vector< int > &errors, int counter, int error) const
std::vector< std::vector< int > > m_bcidGroups
Gaudi::Property< std::vector< float > > m_energyCut
Gaudi::Property< bool > m_fillHistogramsPerMBTS
virtual StatusCode fillHistograms(const EventContext &ctx) const override
adds event to the monitoring histograms
Gaudi::Property< std::vector< int > > m_ctpID
SG::ReadHandleKey< TileDigitsContainer > m_digitsContainerKey
int m_MBTSchannels[Tile::MAX_ROS - 3][Tile::MAX_DRAWER]
Gaudi::Property< bool > m_useTrigger
virtual StatusCode start() override
static const unsigned int MAX_MBTS_COUNTER
const TileCablingService * m_cabling
Gaudi::Property< std::vector< std::string > > m_l1Triggers
virtual StatusCode initialize() override
initialize
ServiceHandle< TileCablingSvc > m_cablingSvc
Name of Tile cabling service.
std::vector< std::vector< int > > m_deltaBCIDGroups
int m_MBTScounters[Tile::MAX_ROS - 3][Tile::MAX_DRAWER]
L1 threshold configuration.
Definition L1Item.h:18
uint32_t lumiBlock() const
The current event's luminosity block number.
uint16_t level1TriggerType() const
The Level-1 trigger type.
std::vector< V > buildToolMap(const ToolHandleArray< GenericMonitoringTool > &tools, const std::string &baseName, int nHist)
Builds an array of indices (base case)
ValuesCollection< T > Collection(std::string name, const T &collection)
Declare a monitored (double-convertible) collection.
SG::ReadCondHandle< T > makeHandle(const SG::ReadCondHandleKey< T > &key, const EventContext &ctx=Gaudi::Hive::currentContext())
EventInfo_v1 EventInfo
Definition of the latest event info version.
void fill(H5::Group &out_file, size_t iterations)