Skip to content

Commit 7b4a490

Browse files
DawidSkoradskora
andauthored
Add separate histograms BcVsFeeModules and OutOfBunchColl for each trigger (#1848)
* Add mHistGateTimeRatio2Ch monitoring object to DigitQcTask Extend GenericCheck with check of ratio of bins behind given value. Add specific check for TriggersSoftwareVsTCM MO. * Fix build errors * Add check for MO TriggersSoftwareVsTCM and improve code * Upload changes during work on TriggersSwVsTcmCheck * Fix names and celan up the code * Extend generic check butify function and parametrize EventsInGateTime hist * Parametrize title of EventsInGateTime hist * Parametrize title of EventsInGateTime hist * Refactor code and fix TriggersSwVsTcmCheck * Fix merge conflict * Enable message box on TriggersSwVsTcmCheck * Align code with clang-format * Fix the filling of the EventInGateTime hist Add parametrization of both min and max gate time for EventInGateTime hist. * Remove unused import * Use DeadChannelMap in GenericCheck * Add stub of a BcCheck * Extend BcCheck * Fix build errors for BcCheck * Change hist title and add axis label * Fix MaxTreshold in GenericCheck. Test DeadChannelMap * Change axis labels for EventsInGateTime * Remove unused files * Fix clang format error * Remove unused file * Introduce BcCheck * Introduce BcCheck * Save * Add metadata to BcVsTriggers and BcVsFeemodules * Change approach * Improve and rename BcCheck to OutOfBunchCollFeeModulesCheck * Apply clang-format fixes in code * Provide fix for unreadable metadata key. * Fix clang-format error * Add new histograms to DigitQcTask Add five histograms BCvsFEEmodules. One for each trigger: - OrA - OrAOut - TrgNChan - TrgCharge - OrAIn * Add OutOfBunchColl_FeeModules histograms for each Trigger * Add OutOfBunchCheck histograms for each trigger and align OutOfBunchCheck * Reduce logging --------- Co-authored-by: dskora <dawid.mateusz.skora@cern.ch>
1 parent 3c7821e commit 7b4a490

5 files changed

Lines changed: 222 additions & 11 deletions

File tree

Modules/FIT/FV0/include/FV0/DigitQcTask.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -173,6 +173,11 @@ class DigitQcTask final : public TaskInterface
173173
std::map<unsigned int, TH2F*> mMapHistAmpVsTime;
174174
std::unique_ptr<TH2F> mHistBCvsTrg;
175175
std::unique_ptr<TH2F> mHistBCvsFEEmodules;
176+
std::unique_ptr<TH2F> mHistBcVsFeeForOrATrg;
177+
std::unique_ptr<TH2F> mHistBcVsFeeForOrAOutTrg;
178+
std::unique_ptr<TH2F> mHistBcVsFeeForNChanTrg;
179+
std::unique_ptr<TH2F> mHistBcVsFeeForChargeTrg;
180+
std::unique_ptr<TH2F> mHistBcVsFeeForOrAInTrg;
176181
std::unique_ptr<TH2F> mHistOrbitVsTrg;
177182
std::unique_ptr<TH2F> mHistOrbitVsFEEmodules;
178183
std::unique_ptr<TH2F> mHistPmTcmNchA;

Modules/FIT/FV0/include/FV0/PostProcTask.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,11 @@ class PostProcTask final : public quality_control::postprocessing::PostProcessin
9292
std::unique_ptr<TH2F> mHistBcPatternFee;
9393
std::unique_ptr<TH2F> mHistBcTrgOutOfBunchColl;
9494
std::unique_ptr<TH2F> mHistBcFeeOutOfBunchColl;
95+
std::unique_ptr<TH2F> mHistBcFeeOutOfBunchCollForOrATrg;
96+
std::unique_ptr<TH2F> mHistBcFeeOutOfBunchCollForOrAOutTrg;
97+
std::unique_ptr<TH2F> mHistBcFeeOutOfBunchCollForNChanTrg;
98+
std::unique_ptr<TH2F> mHistBcFeeOutOfBunchCollForChargeTrg;
99+
std::unique_ptr<TH2F> mHistBcFeeOutOfBunchCollForOrAInTrg;
95100

96101
uint8_t mTCMhash;
97102
std::array<uint8_t, sNCHANNELS_FV0_PLUSREF> mChID2PMhash; // map chID->hashed PM value

Modules/FIT/FV0/src/DigitQcTask.cxx

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -267,9 +267,19 @@ void DigitQcTask::initialize(o2::framework::InitContext& /*ctx*/)
267267
}
268268

269269
mHistBCvsFEEmodules = std::make_unique<TH2F>("BCvsFEEmodules", "BC vs FEE module;BC;FEE", sBCperOrbit, 0, sBCperOrbit, mapFEE2hash.size(), 0, mapFEE2hash.size());
270+
mHistBcVsFeeForOrATrg = std::make_unique<TH2F>("BCvsFEEmodulesForOrATrg", "BC vs FEE module for OrA trigger;BC;FEE", sBCperOrbit, 0, sBCperOrbit, mapFEE2hash.size(), 0, mapFEE2hash.size());
271+
mHistBcVsFeeForOrAOutTrg = std::make_unique<TH2F>("BCvsFEEmodulesForOrAOutTrg", "BC vs FEE module for OrAOut trigger;BC;FEE", sBCperOrbit, 0, sBCperOrbit, mapFEE2hash.size(), 0, mapFEE2hash.size());
272+
mHistBcVsFeeForNChanTrg = std::make_unique<TH2F>("BCvsFEEmodulesForNChanTrg", "BC vs FEE module for NChan trigger;BC;FEE", sBCperOrbit, 0, sBCperOrbit, mapFEE2hash.size(), 0, mapFEE2hash.size());
273+
mHistBcVsFeeForChargeTrg = std::make_unique<TH2F>("BCvsFEEmodulesForChargeTrg", "BC vs FEE module for Charge trigger;BC;FEE", sBCperOrbit, 0, sBCperOrbit, mapFEE2hash.size(), 0, mapFEE2hash.size());
274+
mHistBcVsFeeForOrAInTrg = std::make_unique<TH2F>("BCvsFEEmodulesForOrAInTrg", "BC vs FEE module for OrAIn trigger;BC;FEE", sBCperOrbit, 0, sBCperOrbit, mapFEE2hash.size(), 0, mapFEE2hash.size());
270275
mHistOrbitVsFEEmodules = std::make_unique<TH2F>("OrbitVsFEEmodules", "Orbit vs FEE module;Orbit;FEE", sOrbitsPerTF, 0, sOrbitsPerTF, mapFEE2hash.size(), 0, mapFEE2hash.size());
271276
for (const auto& entry : mapFEE2hash) {
272277
mHistBCvsFEEmodules->GetYaxis()->SetBinLabel(entry.second + 1, entry.first.c_str());
278+
mHistBcVsFeeForOrATrg->GetYaxis()->SetBinLabel(entry.second + 1, entry.first.c_str());
279+
mHistBcVsFeeForOrAOutTrg->GetYaxis()->SetBinLabel(entry.second + 1, entry.first.c_str());
280+
mHistBcVsFeeForNChanTrg->GetYaxis()->SetBinLabel(entry.second + 1, entry.first.c_str());
281+
mHistBcVsFeeForChargeTrg->GetYaxis()->SetBinLabel(entry.second + 1, entry.first.c_str());
282+
mHistBcVsFeeForOrAInTrg->GetYaxis()->SetBinLabel(entry.second + 1, entry.first.c_str());
273283
mHistOrbitVsFEEmodules->GetYaxis()->SetBinLabel(entry.second + 1, entry.first.c_str());
274284
}
275285
// mHistTimeSum2Diff = std::make_unique<TH2F>("timeSumVsDiff", "time A/C side: sum VS diff;(TOC-TOA)/2 [ns];(TOA+TOC)/2 [ns]", 400, -52.08, 52.08, 400, -52.08, 52.08); // range of 52.08 ns = 4000*13.02ps = 4000 channels
@@ -358,6 +368,16 @@ void DigitQcTask::initialize(o2::framework::InitContext& /*ctx*/)
358368
getObjectsManager()->setDefaultDrawOptions(mHistAmp2Ch.get(), "COLZ");
359369
getObjectsManager()->startPublishing(mHistBCvsFEEmodules.get());
360370
getObjectsManager()->setDefaultDrawOptions(mHistBCvsFEEmodules.get(), "COLZ");
371+
getObjectsManager()->startPublishing(mHistBcVsFeeForOrATrg.get());
372+
getObjectsManager()->setDefaultDrawOptions(mHistBcVsFeeForOrATrg.get(), "COLZ");
373+
getObjectsManager()->startPublishing(mHistBcVsFeeForOrAOutTrg.get());
374+
getObjectsManager()->setDefaultDrawOptions(mHistBcVsFeeForOrAOutTrg.get(), "COLZ");
375+
getObjectsManager()->startPublishing(mHistBcVsFeeForNChanTrg.get());
376+
getObjectsManager()->setDefaultDrawOptions(mHistBcVsFeeForNChanTrg.get(), "COLZ");
377+
getObjectsManager()->startPublishing(mHistBcVsFeeForChargeTrg.get());
378+
getObjectsManager()->setDefaultDrawOptions(mHistBcVsFeeForChargeTrg.get(), "COLZ");
379+
getObjectsManager()->startPublishing(mHistBcVsFeeForOrAInTrg.get());
380+
getObjectsManager()->setDefaultDrawOptions(mHistBcVsFeeForOrAInTrg.get(), "COLZ");
361381
getObjectsManager()->startPublishing(mHistOrbitVsTrg.get());
362382
getObjectsManager()->setDefaultDrawOptions(mHistOrbitVsTrg.get(), "COLZ");
363383
getObjectsManager()->startPublishing(mHistOrbitVsFEEmodules.get());
@@ -402,6 +422,11 @@ void DigitQcTask::startOfActivity(const Activity& activity)
402422
mHistNumCFD->Reset();
403423
// mHistTimeSum2Diff->Reset();
404424
mHistBCvsFEEmodules->Reset();
425+
mHistBcVsFeeForOrATrg->Reset();
426+
mHistBcVsFeeForOrAOutTrg->Reset();
427+
mHistBcVsFeeForNChanTrg->Reset();
428+
mHistBcVsFeeForChargeTrg->Reset();
429+
mHistBcVsFeeForOrAInTrg->Reset();
405430
mHistOrbitVsTrg->Reset();
406431
mHistOrbitVsFEEmodules->Reset();
407432
mHistTriggersCorrelation->Reset();
@@ -559,6 +584,11 @@ void DigitQcTask::monitorData(o2::framework::ProcessingContext& ctx)
559584
}
560585
for (const auto& feeHash : setFEEmodules) {
561586
mHistBCvsFEEmodules->Fill(static_cast<double>(digit.getIntRecord().bc), static_cast<double>(feeHash));
587+
mHistBcVsFeeForOrATrg->Fill(static_cast<double>(digit.getIntRecord().bc), digit.mTriggers.getOrA());
588+
mHistBcVsFeeForOrAOutTrg->Fill(static_cast<double>(digit.getIntRecord().bc), digit.mTriggers.getOrAOut());
589+
mHistBcVsFeeForNChanTrg->Fill(static_cast<double>(digit.getIntRecord().bc), digit.mTriggers.getTrgNChan());
590+
mHistBcVsFeeForChargeTrg->Fill(static_cast<double>(digit.getIntRecord().bc), digit.mTriggers.getTrgCharge());
591+
mHistBcVsFeeForOrAInTrg->Fill(static_cast<double>(digit.getIntRecord().bc), digit.mTriggers.getOrAIn());
562592
mHistOrbitVsFEEmodules->Fill(static_cast<double>(digit.getIntRecord().orbit % sOrbitsPerTF), static_cast<double>(feeHash));
563593
}
564594

@@ -708,6 +738,11 @@ void DigitQcTask::reset()
708738
mHistCycleDurationRange->Reset();
709739
mHistBCvsTrg->Reset();
710740
mHistBCvsFEEmodules->Reset();
741+
mHistBcVsFeeForOrATrg->Reset();
742+
mHistBcVsFeeForOrAOutTrg->Reset();
743+
mHistBcVsFeeForNChanTrg->Reset();
744+
mHistBcVsFeeForChargeTrg->Reset();
745+
mHistBcVsFeeForOrAInTrg->Reset();
711746
mHistOrbitVsTrg->Reset();
712747
mHistOrbitVsFEEmodules->Reset();
713748
mHistPmTcmNchA->Reset();

Modules/FIT/FV0/src/OutOfBunchCollFeeModulesCheck.cxx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
#include <TList.h>
2929

3030
#include <map>
31+
#include <algorithm>
3132
#include <DataFormatsQualityControl/FlagReasons.h>
3233

3334
using namespace std;
@@ -66,7 +67,7 @@ Quality OutOfBunchCollFeeModulesCheck::check(std::map<std::string, std::shared_p
6667

6768
for (auto& [moName, mo] : *moMap) {
6869
(void)moName;
69-
if (mo->getName() == "OutOfBunchColl_BCvsFeeModules") {
70+
if (mo->getName().find("OutOfBunchColl_BCvsFeeModules") != std::string::npos) {
7071
auto* histogram = dynamic_cast<TH2*>(mo->getObject());
7172

7273
if (!histogram) {
@@ -127,7 +128,7 @@ std::string OutOfBunchCollFeeModulesCheck::getAcceptedType() { return "TH2"; }
127128

128129
void OutOfBunchCollFeeModulesCheck::beautify(std::shared_ptr<MonitorObject> mo, Quality checkResult)
129130
{
130-
if (mo->getName() == "OutOfBunchColl_BCvsFeeModules") {
131+
if (mo->getName().find("OutOfBunchColl_BCvsFeeModules") != std::string::npos) {
131132
auto* histogram = dynamic_cast<TH2*>(mo->getObject());
132133

133134
if (!histogram) {

0 commit comments

Comments
 (0)