User will overwrite this function. Histogram booking is no longer done in C++. This function is called in execute once the filters are all passed.
124 {
125
127
128
130
132
135
136
137 if (msgLvl(MSG::DEBUG)) {
141 <<
" BCID = " << eventInfo->
bcid()
143
144 const std::vector<xAOD::EventInfo::StreamTag>& eventStreamTags = eventInfo->
streamTags();
145 if (!eventStreamTags.empty()) {
146 msg(MSG::DEBUG) <<
" stream name/type:";
147 for (const auto& eventStreamTag : eventStreamTags) {
148 msg(MSG::DEBUG) <<
" " << eventStreamTag.name() <<
"/" << eventStreamTag.type();
149 }
150 }
151
153 }
154
155
156 static const float energyWeight[6] = {1.f/3.f, 1.f/6.f, 1.f/11.f, 1.f/11.f, 1.f/28.f, 1.f/28.f};
157 static const int gapScintIndex[6] = {0, 1, 2, 2, 3, 3};
158
159 std::vector<const CaloCell*> muonCells;
160
161 std::vector<int> energyBalModPartModule;
162 std::vector<int> energyBalModPartPartition;
163
164 std::vector<int> timeBalModPartModule;
165 std::vector<int> timeBalModPartPartition;
166
170
171
172 int nCellsOverThreshold[
MAX_PART]{};
173
174
176
177
178 unsigned int nMaskedChannelsDueDQ[
MAX_PART]{};
179
180
181 unsigned int nMaskedCellsDueDQ[
MAX_PART]{};
182
183 std::vector<int> negOccupModule[Tile::MAX_ROS - 1];
184 std::vector<int> negOccupChannel[Tile::MAX_ROS - 1];
185
186 std::vector<float> timeBal[Tile::MAX_ROS - 1];
187 std::vector<int> timeBalModule[Tile::MAX_ROS - 1];
188
189 std::vector<float> energyBal[Tile::MAX_ROS - 1];
190 std::vector<int> energyBalModule[Tile::MAX_ROS - 1];
191
192 std::vector<int> detailOccupModule[Tile::MAX_ROS - 1];
193 std::vector<int> detailOccupChannel[Tile::MAX_ROS - 1];
194 std::vector<float> detailOccupEnergies[Tile::MAX_ROS - 1];
195
196 std::vector<int> detailOccupGainModule[Tile::MAX_ROS - 1][Tile::MAX_GAIN];
197 std::vector<int> detailOccupGainChannel[Tile::MAX_ROS - 1][Tile::MAX_GAIN];
198 std::vector<float> detailOccupGainEnergies[Tile::MAX_ROS - 1][Tile::MAX_GAIN];
199
200 std::vector<int> overThrOccupModule[Tile::MAX_ROS - 1];
201 std::vector<int> overThrOccupChannel[Tile::MAX_ROS - 1];
202 std::vector<float> overThrOccupWeight[Tile::MAX_ROS - 1];
203
204 std::vector<int> overThrOccupGainModule[Tile::MAX_ROS - 1][Tile::MAX_GAIN];
205 std::vector<int> overThrOccupGainChannel[Tile::MAX_ROS - 1][Tile::MAX_GAIN];
206 std::vector<float> overThrOccupGainWeight[Tile::MAX_ROS - 1][Tile::MAX_GAIN];
207
208 std::vector<int> overThr30GeVOccupModule[Tile::MAX_ROS - 1];
209 std::vector<int> overThr30GeVOccupChannel[Tile::MAX_ROS - 1];
210
211 std::vector<int> overThr300GeVOccupModule[Tile::MAX_ROS - 1];
212 std::vector<int> overThr300GeVOccupChannel[Tile::MAX_ROS - 1];
213
214 std::vector<int> eneDiff[Tile::MAX_ROS - 1];
215 std::vector<int> eneDiffChannel[Tile::MAX_ROS - 1];
216 std::vector<int> eneDiffModule[Tile::MAX_ROS - 1];
217
218 std::vector<int> maskedOnFlyDrawers[Tile::MAX_ROS - 1];
219 std::vector<int> maskedOnFlyChannel[Tile::MAX_ROS - 1];
220
221 std::vector<int> chanTime[Tile::MAX_ROS - 1];
222 std::vector<int> chanTimeDrawer[Tile::MAX_ROS - 1];
223 std::vector<int> chanTimeChannel[Tile::MAX_ROS - 1];
224 std::vector<int> chanTimeDigitizer[Tile::MAX_ROS - 1];
225
226 int nChannelsInPartition = 2880;
228 if (partition > 1) nChannelsInPartition = 2048;
229 detailOccupModule[
partition].reserve(nChannelsInPartition);
230 detailOccupChannel[
partition].reserve(nChannelsInPartition);
231 detailOccupEnergies[
partition].reserve(nChannelsInPartition);
232 }
233
234 std::vector<float> occupEta[
SAMP_ALL];
235 std::vector<float> occupPhi[
SAMP_ALL];
236 std::vector<float> occupEnergy[
SAMP_ALL];
237
238 std::vector<float> overThrOccupEta[
SAMP_ALL];
239 std::vector<float> overThrOccupPhi[
SAMP_ALL];
240
241 std::vector<float> sampChanTime[Tile::MAX_ROS - 1][
SAMP_ALL];
242 std::vector<float> sampEnergyDiff[Tile::MAX_ROS - 1][
SAMP_ALL];
243 std::vector<float> sampTimeDiff[Tile::MAX_ROS - 1][
SAMP_ALL];
244
246
247
249
250 SG::ReadCondHandle<TileBadChannels> badChannelsHandle(m_badChannelsKey, ctx);
251 const TileBadChannels* badChannels(badChannelsHandle.cptr());
252
254
255 bool isCollision = true;
256
257 SG::ReadHandle<CaloCellContainer> caloCellContainer(m_caloCellContainerKey, ctx);
258 ATH_CHECK( caloCellContainer.isValid() );
259
260
261 for (const CaloCell* cell : *caloCellContainer) {
262
263
265 Identifier
id =
cell->ID();
267
268 const TileCell* tile_cell =
dynamic_cast<const TileCell*
>(
cell);
269 if (tile_cell == 0) continue;
270
272 int channel1 = -1;
273 int channel2 = -1;
274
275 int ros1 = -1;
276 int ros2 = -1;
277
278 int partition1 = -1;
279 int partition2 = -1;
280
281 bool isMaskedChannel1 = false;
282 bool isMaskedAdc1 = false;
283 bool isMaskedAdc2 = false;
284
287
288 const CaloDetDescrElement* caloDDE = tile_cell->
caloDDE();
289
290 IdentifierHash hash1 = caloDDE->
onl1();
296 partition1 = ros1 - 1;
297 }
298
299 IdentifierHash hash2 = caloDDE->
onl2();
305 partition2 = ros2 - 1;
306 }
307
308
310
312
313 if (sample >= SAMP_ALL) continue;
314
319
320
321 bool single_PMT = single_PMT_C10 || single_PMT_scin;
322
323
324
326
327
328 bool isBadChannel1 = tile_cell->
badch1();
329 bool isBadChannel2 = tile_cell->
badch2();
330
331 int isCellGood = !tile_cell->
badcell();
332
335
336
341 double energy1 = tile_cell->
ene1();
342 double energy2 = tile_cell->
ene2();
343 double energyDiff = (single_PMT) ? 0.0 : tile_cell->eneDiff();
344 double energyRatio = (
energy != 0.0) ? energyDiff/
energy : 0.0;
345 double time1 = tile_cell->
time1();
346 double time2 = tile_cell->
time2();
347 double timeDiff = (single_PMT) ? 0.0 : 2. * tile_cell->
timeDiff();
348
350 if (single_PMT_scin) {
352 if (tower > 9 && tower < 16) {
353 weight = energyWeight[tower - 10];
354 }
355 if (m_fillGapScintHistograms) {
356 if (energy > m_energyThresholdForGapScint) {
357 int idx = tower - 10;
358 if (idx >= 0 && idx < static_cast<int>(std::size(gapScintIndex))) {
359 int gapScintIdx = gapScintIndex[
idx];
360 unsigned int partition = (ros1 > 0) ? ros1 - 3 : ros2 - 3;
361 auto monEnergy = Monitored::Scalar<float>("energy", energy);
362 fill(m_tools[m_energyGapScintGroups[partition][drawer][gapScintIdx]], monEnergy);
363 }
364 }
365 }
366 }
367
368 if (
msgLvl(MSG::VERBOSE)) {
369
375 <<
" module: " <<
m_tileID->module(
id)
378
379 msg(MSG::VERBOSE) <<
"1st PMT ROS: " << ros1
381 << " ch1: " << channel1
382 <<
" gain1: " <<
gain1
383 <<
" qual1: " << (
int)tile_cell->
qual1()
384 <<
" qbit1: " << (
int)tile_cell->
qbit1()
386
387 msg(MSG::VERBOSE) <<
"2nd PMT ROS: " << ros2
389 << " ch2: " << channel2
390 <<
" gain2: " <<
gain2
391 <<
" qual2: " << (
int)tile_cell->
qual2()
392 <<
" qbit2: " << (
int)tile_cell->
qbit2()
393 << ((ros1 != ros2) ?
" ros1 != ros2" :
" ") <<
endmsg;
394
395 msg(MSG::VERBOSE) <<
"Bad status: " << !isCellGood
396 << " bad1: " << isBadChannel1
397 << " bad2: " << isBadChannel2
398 << ((single_PMT_scin && isBadChannel1 && !isMaskedChannel1)
399 ?
" NEW BAD E-cell" :
" ") <<
endmsg ;
400
401 msg(MSG::VERBOSE) <<
" real_cell: " << ((realCell) ?
"true" :
"false")
402 << " E-cell: " << ((single_PMT_scin) ? "true" : "false")
403 <<
" specC10: " << ((single_PMT_C10) ?
"true" :
"false") <<
endmsg;
404
405 msg(MSG::VERBOSE) <<
"Energy= " <<
energy <<
" = " << energy1 <<
" + " << energy2
406 << " ediff= " << energyDiff
407 << " eratio= " << energyRatio
409
410 msg(MSG::VERBOSE) <<
"Time= " <<
time <<
" = (" << time1 <<
" + " << time2 <<
")/2 "
411 << "tdiff= " << timeDiff
413 }
414
415
416 if (realCell) {
417
420
421
422 int quality1 = (
int)tile_cell->
qual1();
423 int quality2 = (
int)tile_cell->
qual2();
424 if (isBadChannel1 != isBadChannel2 && quality1 != quality2
425 && quality1 < 255 && quality2 < 255) {
426 if (isBadChannel1 && isOkChannel1) dbGain1 = 1 -
gain1;
427 if (isBadChannel2 && isOkChannel2) dbGain2 = 1 -
gain2;
428 }
429
432 isMaskedAdc1 = badChannels->getAdcStatus(adc1_id).isBad();
433 }
434
437 isMaskedAdc2 = badChannels->getAdcStatus(adc2_id).isBad();
438 }
439
440 bool channel1MaskedDueDQ(false);
441 if (isBadChannel1 && isOkChannel1 && !(single_PMT_C10 && channel1 == 4)) {
442 if (!isMaskedAdc1) {
443 ++nBadChannelsOnFly[partition1];
444 maskedOnFlyDrawers[partition1].push_back(drawer);
445 maskedOnFlyChannel[partition1].push_back(channel1);
446
447 if (!dqStatus->
isAdcDQgood(ros1, drawer, channel1, gain1)) {
448 channel1MaskedDueDQ = true;
449 ++nMaskedChannelsDueDQ[partition1];
450 }
451 }
452 }
453
454 bool channel2MaskedDueDQ(false);
455 if (isBadChannel2 && isOkChannel2 && !(single_PMT_C10 && channel2 == 4)) {
456 if (!isMaskedAdc2) {
457 ++nBadChannelsOnFly[partition2];
458 maskedOnFlyDrawers[partition2].push_back(drawer);
459 maskedOnFlyChannel[partition2].push_back(channel2);
460
461 if (!dqStatus->
isAdcDQgood(ros2, drawer, channel2, gain2)) {
462 channel2MaskedDueDQ = true;
463 ++nMaskedChannelsDueDQ[partition2];
464 }
465 }
466 }
467
468 if (isCellGood) {
469
470 if ((energy > m_energyRangeForMuon[0]) && (energy < m_energyRangeForMuon[1])
471 && (time > m_timeRangeForMuon[0]) && (time < m_timeRangeForMuon[1])
472 && (time != 0)) {
473 muonCells.push_back(cell);
474 }
477 occupEnergy[
sample].push_back(energy);
478
479 if (isOkChannel1) {
480 detailOccupModule[partition1].push_back(module);
481 detailOccupChannel[partition1].push_back(channel1);
482 detailOccupEnergies[partition1].push_back(energy1 * weight);
483
484 detailOccupGainModule[partition1][
gain1].push_back(module);
485 detailOccupGainChannel[partition1][
gain1].push_back(channel1);
486 detailOccupGainEnergies[partition1][
gain1].push_back(energy1 * weight);
487 }
488
489 if (isOkChannel2) {
490 detailOccupModule[partition2].push_back(module);
491 detailOccupChannel[partition2].push_back(channel2);
492 detailOccupEnergies[partition2].push_back(energy2);
493
494 detailOccupGainModule[partition2][
gain2].push_back(module);
495 detailOccupGainChannel[partition2][
gain2].push_back(channel2);
496 detailOccupGainEnergies[partition2][
gain2].push_back(energy2);
497 }
498
499 } else {
500 ++nBadCells[partition1];
501 if (channel1MaskedDueDQ || channel2MaskedDueDQ) {
502 ++nMaskedCellsDueDQ[partition1];
503 }
504 }
505
506
507 if (isOkChannel1 && energy1 < m_negativeEnergyThreshold && (!isMaskedAdc1)) {
508 negOccupModule[partition1].push_back(module);
509 negOccupChannel[partition1].push_back(channel1);
510 }
511
512 if (isOkChannel2 && energy2 < m_negativeEnergyThreshold && (!isMaskedAdc2)) {
513 negOccupModule[partition2].push_back(module);
514 negOccupChannel[partition2].push_back(channel2);
515 }
516
517 if (energy > m_energyThreshold) {
518
519
520 if (isCollision || m_fillTimeHistograms) {
521 if (isOkChannel1 && energy1 > m_energyThresholdForTime && energy1 < m_energyLimitForTime) {
522 if ((gain1 == 0) && (energy1 < 1000.)) {
523 ATH_MSG_DEBUG(
"Low energy in LG for time monitoring: " << Tile::getDrawerString(ros1, drawer)
524 << ", channel = " << channel1 << ", energy = " << energy1 << ", time = " << time1);
525 } else {
526 chanTime[partition1].push_back(time1);
527 chanTimeDrawer[partition1].push_back(drawer);
528 chanTimeChannel[partition1].push_back(channel1);
529 chanTimeDigitizer[partition1].push_back(
getDigitizer(channel1));
530 if (m_fillChannelTimeHistograms) {
531 sampChanTime[partition1][
sample].push_back(time1);
532 }
533 }
534 }
535
536 if (isOkChannel2 && energy2 > m_energyThresholdForTime && energy2 < m_energyLimitForTime) {
537 if ((gain2 == 0) && (energy2 < 1000.)) {
538 ATH_MSG_DEBUG(
"Low energy in LG for time monitoring: " << Tile::getDrawerString(ros2, drawer)
539 << ", channel = " << channel2 << ", energy = " << energy2 << ", time = " << time2);
540 } else {
541 chanTime[partition2].push_back(time2);
542 chanTimeDrawer[partition2].push_back(drawer);
543 chanTimeChannel[partition2].push_back(channel2);
544 chanTimeDigitizer[partition2].push_back(
getDigitizer(channel2));
545 if (m_fillChannelTimeHistograms) {
546 sampChanTime[partition2][
sample].push_back(time2);
547 }
548 }
549 }
550 }
551
554
555 if (isOkChannel1 && energy1 > m_energyThreshold && (!isBadChannel1)) {
556 overThrOccupModule[partition1].push_back(module);
557 overThrOccupChannel[partition1].push_back(channel1);
558 overThrOccupWeight[partition1].push_back(weight);
559
560 if (energy1 > m_energyThresholdForGain[gain1]) {
561 overThrOccupGainModule[partition1][
gain1].push_back(module);
562 overThrOccupGainChannel[partition1][
gain1].push_back(channel1);
563 overThrOccupGainWeight[partition1][
gain1].push_back(weight);
564 }
565
566 if (energy1 > 30000.) {
567 overThr30GeVOccupModule[partition1].push_back(module);
568 overThr30GeVOccupChannel[partition1].push_back(channel1);
569
570 if (energy1 > 300000.) {
571 overThr300GeVOccupModule[partition1].push_back(module);
572 overThr300GeVOccupChannel[partition1].push_back(channel1);
573 }
574 }
575 }
576
577 if (isOkChannel2 && energy2 > m_energyThreshold && (!isBadChannel2)) {
578 overThrOccupModule[partition2].push_back(module);
579 overThrOccupChannel[partition2].push_back(channel2);
580 overThrOccupWeight[partition2].push_back(1.0F);
581
582 if (energy2 > m_energyThresholdForGain[gain2]) {
583 overThrOccupGainModule[partition2][
gain2].push_back(module);
584 overThrOccupGainChannel[partition2][
gain2].push_back(channel2);
585 overThrOccupGainWeight[partition2][
gain2].push_back(1.0F);
586 }
587
588 if (energy2 > 30000.) {
589 overThr30GeVOccupModule[partition2].push_back(module);
590 overThr30GeVOccupChannel[partition2].push_back(channel2);
591
592 if (energy2 > 300000.) {
593 overThr300GeVOccupModule[partition2].push_back(module);
594 overThr300GeVOccupChannel[partition2].push_back(channel2);
595 }
596 }
597 }
598
599 bool fillEneAndTimeDiff(m_fillTimeAndEnergyDiffHistograms);
600
601
602 if ((gain1 == 0 && gain2 == 1 && (energy1 < 2000 || energy2 < 10 || std::abs(energy1 / energy2) > 5))
603 || (gain1 == 1 && gain2 == 0 && (energy2 < 2000 || energy1 < 10 || std::abs(energy2 / energy1) > 5))) {
604
605 fillEneAndTimeDiff = false;
606 }
607
608
609 if (!(isBadChannel1 || isBadChannel2 || single_PMT)) {
610
611 if (std::abs(energyRatio) > m_energyBalanceThreshold) {
612 energyBalModPartModule.push_back(module);
613 energyBalModPartPartition.push_back(partition1);
614 }
615
616 if (std::abs(timeDiff) > m_timeBalanceThreshold
617 && (energy1 > m_energyThresholdForTime || energy2 > m_energyThresholdForTime)
618 && (isCollision || m_fillTimeHistograms)) {
619 timeBalModPartModule.push_back(module);
620 timeBalModPartPartition.push_back(partition1);
621 }
622
623 energyBal[partition1].push_back(energyRatio);
624 energyBalModule[partition1].push_back(module);
625
626 eneDiff[partition1].push_back(energyDiff);
627 eneDiffChannel[partition1].push_back(channel1);
628 eneDiffModule[partition1].push_back(module);
629
630 eneDiff[partition2].push_back(-1.0 * energyDiff);
631 eneDiffChannel[partition2].push_back(channel2);
632 eneDiffModule[partition2].push_back(module);
633
634 if (fillEneAndTimeDiff) {
635 sampEnergyDiff[partition1][
sample].push_back(energyDiff);
636 }
637
638 if ((energy1 > m_energyThresholdForTime || energy2 > m_energyThresholdForTime)
639 && (isCollision || m_fillTimeHistograms)) {
640
641 timeBal[partition1].push_back(timeDiff);
642 timeBalModule[partition1].push_back(module);
643
644 if (fillEneAndTimeDiff) {
645 sampTimeDiff[partition1][
sample].push_back(timeDiff);
646 }
647 }
648
649 moduleCorr[partition1].
inputxy(module);
651 }
652
653 if (partition1 >= 0) {
654
655
656 ++nCellsOverThreshold[partition1];
657 }
658 }
659 }
660
661 if (partition1 >= 0) {
662
664
665
667 }
668 }
669 }
670
671
673
675 nBadCells[PART_ALL] += nBadCells[
partition];
676
677 nBadChannelsOnFly[PART_ALL] += nBadChannelsOnFly[
partition];
678 nCellsOverThreshold[PART_ALL] += nCellsOverThreshold[
partition];
679
680 nMaskedChannelsDueDQ[PART_ALL] += nMaskedChannelsDueDQ[
partition];
681 nMaskedCellsDueDQ[PART_ALL] += nMaskedCellsDueDQ[
partition];
682
686 }
687
688 energySample[PART_ALL][SAMP_ALL] += energySample[
partition][SAMP_ALL];
689 }
690
692
693 msg(MSG::DEBUG) <<
"N Cells: "
699
700 if (nCells[PART_ALL] > 0) {
701
702 msg(MSG::DEBUG) <<
"AboveThr: "
703 <<
" " << nCellsOverThreshold[
PART_LBA]
704 <<
" " << nCellsOverThreshold[
PART_LBC]
705 <<
" " << nCellsOverThreshold[
PART_EBA]
706 <<
" " << nCellsOverThreshold[
PART_EBC]
707 <<
" " << nCellsOverThreshold[PART_ALL] <<
endmsg;
708
709 msg(MSG::DEBUG) <<
"MaskOnFly:"
710 <<
" " << nBadChannelsOnFly[
PART_LBA]
711 <<
" " << nBadChannelsOnFly[
PART_LBC]
712 <<
" " << nBadChannelsOnFly[
PART_EBA]
713 <<
" " << nBadChannelsOnFly[
PART_EBC]
714 <<
" " << nBadChannelsOnFly[PART_ALL] <<
endmsg;
715
716 msg(MSG::DEBUG) <<
"EneSampA:"
722
723 msg(MSG::DEBUG) <<
"EneSampB:"
729
730 msg(MSG::DEBUG) <<
"EneSampD:"
736
737 msg(MSG::DEBUG) <<
"EneSampE:"
743
744 msg(MSG::DEBUG) <<
"EneTotal:"
750
751 }
752 }
753
756
759 fill(
"TileBadCell", monPartition, monBadCells);
760
762
763 if (!energyBalModPartPartition.empty()) {
764 for (int l1TriggerIdx : l1TriggersIndices) {
767 fill(m_tools[m_energyBalModPartGroups[l1TriggerIdx]], monModule, monPartion);
768 }
769 }
770
771 if (!timeBalModPartPartition.empty()) {
772 for (int l1TriggerIdx : l1TriggersIndices) {
775 fill(m_tools[m_timeBalModPartGroups[l1TriggerIdx]], monModule, monPartion);
776 }
777 }
778
779 unsigned int bcid = eventInfo->
bcid();
780
782
783 if (!maskedOnFlyDrawers[partition].
empty()) {
786 fill(m_tools[m_maskedOnFlyGroups[partition]], monModule, monChannel);
787 }
788
789 if (!negOccupModule[partition].
empty()) {
792 fill(m_tools[m_negOccupGroups[partition]], monModule, monChannel);
793 }
794
795 if (!energyBalModule[partition].
empty()) {
798 fill(m_tools[m_energyBalGroups[partition]], monModule, monEnergyBal);
799 }
800
801 if (!timeBalModule[partition].
empty()) {
804 fill(m_tools[m_timeBalGroups[partition]], monModule, monTimeBal);
805 }
806
807 if (!chanTimeDrawer[partition].
empty()) {
812 for (int l1TriggerIdx : l1TriggersIndices) {
813 fill(m_tools[m_chanTimeGroups[partition][l1TriggerIdx]], monModule, monChannel, monTime);
814 fill(m_tools[m_digiTimeGroups[partition][l1TriggerIdx]], monModule, monDigitizer, monTime);
815 }
816 }
817
818 if (!detailOccupModule[partition].
empty()) {
822 for (int l1TriggerIdx : l1TriggersIndices) {
823 fill(m_tools[m_detailOccupGroups[partition][l1TriggerIdx]], monModule, monChannel, monEnergies);
824 }
825 }
826
827 if (!overThrOccupModule[partition].
empty()) {
831 for (int l1TriggerIdx : l1TriggersIndices) {
832 fill(m_tools[m_overThrOccupGroups[partition][l1TriggerIdx]], monModule, monChannel, monWeight);
833 }
834 }
835
836 if (!overThr30GeVOccupModule[partition].
empty()) {
839 for (int l1TriggerIdx : l1TriggersIndices) {
840 fill(m_tools[m_overThr30GeVOccupGroups[partition][l1TriggerIdx]], monModule, monChannel);
841 }
842 }
843
844 if (!overThr300GeVOccupModule[partition].
empty()) {
847 for (int l1TriggerIdx : l1TriggersIndices) {
848 fill(m_tools[m_overThr300GeVOccupGroups[partition][l1TriggerIdx]], monModule, monChannel);
849 }
850 }
851
852 if (!eneDiff[partition].
empty()) {
856 for (int l1TriggerIdx : l1TriggersIndices) {
857 fill(m_tools[m_eneDiffChanModGroups[partition][l1TriggerIdx]], monModule, monChannel, monEnergyDiff);
858 }
859 }
860
861 for (
unsigned int gain = 0;
gain < Tile::MAX_GAIN; ++
gain) {
862 if (!overThrOccupGainModule[partition][gain].
empty()) {
866 for (int l1TriggerIdx : l1TriggersIndices) {
867 fill(m_tools[m_overThrOccupGainGroups[partition][gain][l1TriggerIdx]], monModule, monChannel, monWeight);
868 }
869 }
870
871 if (!detailOccupGainModule[partition][gain].
empty()) {
875 for (int l1TriggerIdx : l1TriggersIndices) {
876 fill(m_tools[m_detailOccupGainGroups[partition][gain][l1TriggerIdx]], monModule, monChannel, monEnergies);
877 }
878 }
879 }
880
881 if (m_fillChannelTimeHistograms) {
883 if (!sampChanTime[partition][sample].
empty()) {
885 for (int l1TriggerIdx : l1TriggersIndices) {
886 fill(m_tools[m_chanTimeSampGroups[partition][sample][l1TriggerIdx]], monChanTime);
887 fill(m_tools[m_chanTimeSampGroups[partition][SAMP_ALL][l1TriggerIdx]], monChanTime);
888 }
889 }
890 }
891 }
892
893 if (m_fillTimeAndEnergyDiffHistograms) {
894 for (
unsigned int sample = 0;
sample < SAMP_ALL; ++
sample) {
895 if (!sampEnergyDiff[partition][sample].
empty()) {
897 for (int l1TriggerIdx : l1TriggersIndices) {
898 fill(m_tools[m_eneDiffSampGroups[partition][sample][l1TriggerIdx]], monEneDiff);
899 fill(m_tools[m_eneDiffSampGroups[partition][SAMP_ALL][l1TriggerIdx]], monEneDiff);
900 }
901 }
902
903 if (!sampTimeDiff[partition][sample].
empty()) {
905 for (int l1TriggerIdx : l1TriggersIndices) {
906 fill(m_tools[m_timeDiffSampGroups[partition][sample][l1TriggerIdx]], monTimeDiff);
907 fill(m_tools[m_timeDiffSampGroups[partition][SAMP_ALL][l1TriggerIdx]], monTimeDiff);
908 }
909 }
910 }
911 }
912
913 }
914
916 auto monMaskedDueDQ = Monitored::Scalar<int>("nMaskedChannelsDueDQ", nMaskedChannelsDueDQ[partition]);
917 fill(m_tools[m_maskedDueDQGroups[partition]], lumiBlock, monMaskedDueDQ);
918
919 auto monMaskedCellsDueDQ = Monitored::Scalar<int>("nMaskedCellsDueDQ", nMaskedCellsDueDQ[partition]);
920 fill(m_tools[m_maskedCellsDueDQGroups[partition]], lumiBlock, monMaskedCellsDueDQ);
921
922 auto monMaskedOnFly = Monitored::Scalar<int>("nMaskedChannelsOnFly", nBadChannelsOnFly[partition]);
923 fill(m_tools[m_maskedOnFlyLBGroups[partition]], lumiBlock, monMaskedOnFly);
924
925 auto monMaskedCellsOnFly = Monitored::Scalar<int>("nMaskedCells", nBadCells[partition]);
926 fill(m_tools[m_maskedCellsLBGroups[partition]], lumiBlock, monMaskedCellsOnFly);
927
928
929 if (moduleCorr[partition].numberOfPairs() > 0) {
933 std::vector<float>
weight(moduleCorr[partition].numberOfPairs(), moduleCorr[partition].
weight());
935 for (int l1TriggerIdx : l1TriggersIndices) {
936 fill(m_tools[m_moduleCorrGroups[partition][l1TriggerIdx]], monModule1, monModule2, monWeight);
937 }
938 }
939
940 for (int l1TriggerIdx : l1TriggersIndices) {
941 auto monCellsNumber = Monitored::Scalar<float>("nCells", nCells[partition]);
942 fill(m_tools[m_nCellsGroups[partition][l1TriggerIdx]], lumiBlock, monCellsNumber);
943
944 auto monBCID = Monitored::Scalar<unsigned int>("BCID", bcid);
945 auto monCellsNumberOvThr = Monitored::Scalar<float>("nCells", nCellsOverThreshold[partition]);
946 fill(m_tools[m_nCellsOverThrGroups[partition][l1TriggerIdx]], monBCID, monCellsNumberOvThr);
947 }
948
949 if (partition > 1) {
950 for (int l1TriggerIdx : l1TriggersIndices) {
951 auto monEnergy = Monitored::Scalar<float>(
"energy", energySample[partition][
TileID::SAMP_E]);
952 fill(m_tools[m_energySampEGroups[partition][l1TriggerIdx]], monEnergy);
953 }
954 }
955 }
956
957 for (
unsigned int sample = 0;
sample < SAMP_ALL; ++
sample) {
958 if (!occupEnergy[sample].
empty()) {
962 for (int l1TriggerIdx : l1TriggersIndices) {
963 fill(m_tools[m_eneEtaPhiGroups[sample][l1TriggerIdx]], monEta, monPhi, monEnergy);
964 fill(m_tools[m_eneEtaPhiGroups[SAMP_ALL][l1TriggerIdx]], monEta, monPhi, monEnergy);
965 }
966 }
967
968 if (!overThrOccupEta[sample].
empty()) {
971 for (int l1TriggerIdx : l1TriggersIndices) {
972 fill(m_tools[m_overThrEtaPhiGroups[sample][l1TriggerIdx]], monEta, monPhi);
973 fill(m_tools[m_overThrEtaPhiGroups[SAMP_ALL][l1TriggerIdx]], monEta, monPhi);
974 }
975 }
976 }
977
978
979
980 fill(
"TileCellMonExecuteTime", timer);
981
982 return StatusCode::SUCCESS;
983}
Scalar eta() const
pseudorapidity method
Scalar phi() const
phi method
#define ATH_CHECK
Evaluate an expression and check for errors.
static const Attributes_t empty
bool msgLvl(const MSG::Level lvl) const
bool is_tile(Identifier id) const
const CaloDetDescrElement * caloDDE() const
get pointer to CaloDetDescrElement (data member)
IdentifierHash onl2() const
cell online identifier 2
IdentifierHash onl1() const
cell online identifier 1
Declare a monitored scalar variable.
const PairVector & pairs() const
Return the pairs as a vector of pairs of integers.
std::vector< XYPair > PairVector
void inputxy(const int ystrip)
Input a new y value.
std::pair< int, int > XYPair
static bool C10_connected(int module)
bool TileGap_connected(const Identifier &id) const
Static class providing several utility functions and constants.
void fillMaskedInDB(const TileBadChannels *badChannels) const
int getDigitizer(int channel) const
const TileCablingService * m_cabling
void fillSynchronization(const std::vector< const CaloCell * > &cells, const std::vector< int > &l1TriggersIndices) const
const TileHWID * m_tileHWID
uint8_t qual1(void) const
get quality of first PMT (data member)
float time1(void) const
get time of first PMT
virtual bool badcell(void) const override final
check if whole cell is bad (i.e.
int gain2(void) const
get gain of second PMT
bool badch1(void) const
check if first PMT is in bad channel list and masked
uint8_t qbit2(void) const
get quality bits of second PMT (data member)
int gain1(void) const
get gain of first PMT
uint8_t qual2(void) const
get quality of second PMT (data member)
float ene1(void) const
get energy of first PMT
bool badch2(void) const
check if second PMT is in bad channel list and masked
float timeDiff(void) const
get time diff for two PMTs (data member)
float time2(void) const
get time of second PMT
uint8_t qbit1(void) const
get quality bits of first PMT (data member)
float ene2(void) const
get energy of second PMT
Class that holds Data Quality fragment information and provides functions to extract the data quality...
bool isAdcDQgood(int partition, int drawer, int ch, int gain) const
returns status of single ADC returns False if there are any errors
int channel(const HWIdentifier &id) const
extract channel field from HW identifier
int drawer(const HWIdentifier &id) const
extract drawer field from HW identifier
HWIdentifier channel_id(int ros, int drawer, int channel) const
channel HWIdentifer
HWIdentifier adc_id(int ros, int drawer, int channel, int adc) const
adc HWIdentifer
int ros(const HWIdentifier &id) const
extract ros field from HW identifier
std::vector< int > getL1TriggerIndices(uint32_t lvl1TriggerType) const
Return indices of histograms to be filled according fired L1 trigger type.
int sample(const Identifier &id) const
int tower(const Identifier &id) const
std::string to_string(const Identifier &id, int level=0) const
int system(const Identifier &id) const
int side(const Identifier &id) const
int section(const Identifier &id) const
int region(int section, int side) const
uint32_t lumiBlock() const
The current event's luminosity block number.
uint32_t bcid() const
The bunch crossing ID of the event.
uint16_t level1TriggerType() const
The Level-1 trigger type.
const std::vector< StreamTag > & streamTags() const
Get the streams that the event was put in.
uint32_t runNumber() const
The current event's run number.
uint64_t eventNumber() const
The current event's event number.
time(flags, cells_name, *args, **kw)
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.
setEventNumber setTimeStamp bcid
setRawEt setRawPhi nCells
void fill(H5::Group &out_file, size_t iterations)
#define CXXUTILS_TRAPPING_FP