From 6e77d424e3be268b2fb077d423f485fb922076c1 Mon Sep 17 00:00:00 2001 From: Isakov Artem Date: Mon, 27 Jan 2025 11:38:07 +0100 Subject: [PATCH 1/4] Added user defined checks for Cluster and FEE tasks --- Modules/ITS/itsCluster.json | 54 ++++++++++++++++++++++++++++- Modules/ITS/itsFee.json | 26 ++++++++++++-- Modules/ITS/src/ITSClusterCheck.cxx | 5 ++- Modules/ITS/src/ITSFeeCheck.cxx | 7 ++-- 4 files changed, 86 insertions(+), 6 deletions(-) diff --git a/Modules/ITS/itsCluster.json b/Modules/ITS/itsCluster.json index e6a0360a38..3095d2ae28 100644 --- a/Modules/ITS/itsCluster.json +++ b/Modules/ITS/itsCluster.json @@ -10,7 +10,8 @@ }, "Activity": { "number": "42", - "type": "NONE" + "type": "PHYSICS", + "beamType" : "PbPb", "": "Beam type: `PROTON-PROTON`, `Pb-Pb`, `Pb-PROTON` " }, "monitoring": { "url": "infologger:///debug?qc" @@ -68,6 +69,57 @@ "textMessage": "" }, + "extendedCheckParameters": { + "default": { + "default": { + "maxcluoccL0": "5", + "maxcluoccL1": "3", + "maxcluoccL2": "3", + "maxcluoccL3": "0.3", + "maxcluoccL4": "0.3", + "maxcluoccL5": "0.2", + "maxcluoccL6": "0.2" + } + }, + "PHYSICS": { + "default": { + "maxcluoccL0": "5", + "maxcluoccL1": "3", + "maxcluoccL2": "3", + "maxcluoccL3": "0.3", + "maxcluoccL4": "0.3", + "maxcluoccL5": "0.2", + "maxcluoccL6": "0.2" + }, + "PROTON-PROTON": { + "maxcluoccL0": "5", + "maxcluoccL1": "3", + "maxcluoccL2": "3", + "maxcluoccL3": "0.3", + "maxcluoccL4": "0.3", + "maxcluoccL5": "0.2", + "maxcluoccL6": "0.2" + }, + "Pb-Pb": { + "maxcluoccL0": "65", + "maxcluoccL1": "35", + "maxcluoccL2": "25", + "maxcluoccL3": "1", + "maxcluoccL4": "1", + "maxcluoccL5": "1", + "maxcluoccL6": "1" + } + }, + "COSMICS": { + "maxcluoccL0": "5", + "maxcluoccL1": "3", + "maxcluoccL2": "3", + "maxcluoccL3": "0.3", + "maxcluoccL4": "0.3", + "maxcluoccL5": "0.2", + "maxcluoccL6": "0.2" + } + }, "dataSource": [ { "type": "Task", diff --git a/Modules/ITS/itsFee.json b/Modules/ITS/itsFee.json index b2d9a35671..578dc90e61 100644 --- a/Modules/ITS/itsFee.json +++ b/Modules/ITS/itsFee.json @@ -9,8 +9,9 @@ "name": "not_applicable" }, "Activity": { - "number": "42", - "type": "NONE" + "number": "42", + "type": "PHYSICS", + "beamType" : "PbPb", "": "Beam type: `PROTON-PROTON`, `Pb-Pb`, `Pb-PROTON` " }, "monitoring": { "url": "infologger:///debug?qc" @@ -66,6 +67,27 @@ "plotWithTextMessage": "", "textMessage": "" }, + "extendedCheckParameters": { + "default": { + "default": { + "expectedROFperOrbit": "18" + } + }, + "PHYSICS": { + "default": { + "expectedROFperOrbit": "18" + }, + "PROTON-PROTON": { + "expectedROFperOrbit": "18" + }, + "Pb-Pb": { + "expectedROFperOrbit": "6" + } + }, + "COSMICS": { + "expectedROFperOrbit": "18" + } + }, "dataSource": [ { "type": "Task", diff --git a/Modules/ITS/src/ITSClusterCheck.cxx b/Modules/ITS/src/ITSClusterCheck.cxx index 7198a86ae3..a183d39c38 100644 --- a/Modules/ITS/src/ITSClusterCheck.cxx +++ b/Modules/ITS/src/ITSClusterCheck.cxx @@ -69,6 +69,7 @@ Quality ITSClusterCheck::check(std::mapsecond->getName().find("General_Occupancy") != std::string::npos) { auto* hp = dynamic_cast(iter->second->getObject()); + auto activity = iter->second->getActivity(); if (hp == nullptr) { ILOG(Error, Support) << "could not cast general occupancy to TH2D*" << ENDM; continue; @@ -90,7 +91,9 @@ Quality ITSClusterCheck::check(std::map(mCustomParameters, Form("maxcluoccL%d", ilayer), maxcluocc[ilayer]); + // maxcluocc[ilayer] = o2::quality_control_modules::common::getFromConfig(mCustomParameters, Form("maxcluoccL%d", ilayer), maxcluocc[ilayer]); + + maxcluocc[ilayer] = stof(mCustomParameters.at(Form("maxcluoccL%d", ilayer), activity)); if (hp->GetBinContent(ix, iy) > maxcluocc[ilayer]) { result.set(Quality::Medium); result.updateMetadata(Form("Layer%d%s", ilayer, tb.c_str()), "medium"); diff --git a/Modules/ITS/src/ITSFeeCheck.cxx b/Modules/ITS/src/ITSFeeCheck.cxx index 47747b518c..2d6e04b68b 100644 --- a/Modules/ITS/src/ITSFeeCheck.cxx +++ b/Modules/ITS/src/ITSFeeCheck.cxx @@ -32,6 +32,7 @@ namespace o2::quality_control_modules::its Quality ITSFeeCheck::check(std::map>* moMap) { + Quality result = Quality::Null; bool badStaveCount, badStaveIB, badStaveML, badStaveOL; @@ -252,6 +253,8 @@ Quality ITSFeeCheck::check(std::map> } if (((string)mo->getName()).find("TrailerCount") != std::string::npos) { + + auto activity = mo->getActivity(); auto* h = dynamic_cast(mo->getObject()); if (h == nullptr) { ILOG(Error, Support) << "could not cast TrailerCount to TH2I*" << ENDM; @@ -259,7 +262,7 @@ Quality ITSFeeCheck::check(std::map> } result.set(Quality::Good); result.addMetadata("CheckROFRate", "good"); - expectedROFperOrbit = o2::quality_control_modules::common::getFromConfig(mCustomParameters, "expectedROFperOrbit", expectedROFperOrbit); + expectedROFperOrbit = stoi(mCustomParameters.at("expectedROFperOrbit", activity)); if (h->Integral(1, 432, 1, h->GetYaxis()->FindBin(expectedROFperOrbit) - 1) > 0 || h->Integral(1, 432, h->GetYaxis()->FindBin(expectedROFperOrbit) + 1, h->GetYaxis()->GetLast()) > 0) { result.set(Quality::Bad); result.updateMetadata("expectedROFperOrbit", "bad"); @@ -379,7 +382,7 @@ void ITSFeeCheck::beautify(std::shared_ptr mo, Quality checkResul tInfoLayers[ilayer]->SetNDC(); hp->GetListOfFunctions()->Add(tInfoLayers[ilayer]->Clone()); } // end check result over layer - } // end of loop over layers + } // end of loop over layers } tInfo = std::make_shared(0.05, 0.95, Form("#bf{%s}", status.Data())); tInfo->SetTextColor(textColor); From 831b4d68f9e7f941f8a1b2d8f9c25a9320236271 Mon Sep 17 00:00:00 2001 From: Isakov Artem Date: Mon, 27 Jan 2025 11:43:49 +0100 Subject: [PATCH 2/4] Clang format --- Modules/ITS/src/ITSFeeCheck.cxx | 1 - 1 file changed, 1 deletion(-) diff --git a/Modules/ITS/src/ITSFeeCheck.cxx b/Modules/ITS/src/ITSFeeCheck.cxx index 2d6e04b68b..9633455571 100644 --- a/Modules/ITS/src/ITSFeeCheck.cxx +++ b/Modules/ITS/src/ITSFeeCheck.cxx @@ -32,7 +32,6 @@ namespace o2::quality_control_modules::its Quality ITSFeeCheck::check(std::map>* moMap) { - Quality result = Quality::Null; bool badStaveCount, badStaveIB, badStaveML, badStaveOL; From 26153e89712efdc7fded9078d75d95383806527c Mon Sep 17 00:00:00 2001 From: Isakov Artem Date: Mon, 27 Jan 2025 11:52:28 +0100 Subject: [PATCH 3/4] Clang2 --- Modules/ITS/src/ITSFeeCheck.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Modules/ITS/src/ITSFeeCheck.cxx b/Modules/ITS/src/ITSFeeCheck.cxx index 9633455571..fa3b021402 100644 --- a/Modules/ITS/src/ITSFeeCheck.cxx +++ b/Modules/ITS/src/ITSFeeCheck.cxx @@ -381,7 +381,7 @@ void ITSFeeCheck::beautify(std::shared_ptr mo, Quality checkResul tInfoLayers[ilayer]->SetNDC(); hp->GetListOfFunctions()->Add(tInfoLayers[ilayer]->Clone()); } // end check result over layer - } // end of loop over layers + }// end of loop over layers } tInfo = std::make_shared(0.05, 0.95, Form("#bf{%s}", status.Data())); tInfo->SetTextColor(textColor); From a8896bad44d9968bcb9fb5d142125bf2042af49b Mon Sep 17 00:00:00 2001 From: Isakov Artem Date: Mon, 27 Jan 2025 11:54:15 +0100 Subject: [PATCH 4/4] Clang3 --- Modules/ITS/src/ITSFeeCheck.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Modules/ITS/src/ITSFeeCheck.cxx b/Modules/ITS/src/ITSFeeCheck.cxx index fa3b021402..a7f319da41 100644 --- a/Modules/ITS/src/ITSFeeCheck.cxx +++ b/Modules/ITS/src/ITSFeeCheck.cxx @@ -381,7 +381,7 @@ void ITSFeeCheck::beautify(std::shared_ptr mo, Quality checkResul tInfoLayers[ilayer]->SetNDC(); hp->GetListOfFunctions()->Add(tInfoLayers[ilayer]->Clone()); } // end check result over layer - }// end of loop over layers + } // end of loop over layers } tInfo = std::make_shared(0.05, 0.95, Form("#bf{%s}", status.Data())); tInfo->SetTextColor(textColor);