diff --git a/Modules/CTP/include/CTP/RawDataReaderCheck.h b/Modules/CTP/include/CTP/RawDataReaderCheck.h index ae1d17fd45..0b2a98b876 100644 --- a/Modules/CTP/include/CTP/RawDataReaderCheck.h +++ b/Modules/CTP/include/CTP/RawDataReaderCheck.h @@ -58,6 +58,7 @@ class RawDataReaderCheck : public o2::quality_control::checker::CheckInterface float mThresholdRateMedium = -1; // threshold for the relative change in ctp input and class rates float mThresholdRateRatioBad = -1; // threshold for the relative change in ctp input and class ratios float mThresholdRateRatioMedium = -1; // threshold for the relative change in ctp input and class ratios + float mNSigBC = -1; // n sigma for BC threshold bool mFlagRatio = false; // flag that a ratio plot is checked bool mFlagInput = false; // flag that an input plot is checked TH1D* mHistInputPrevious = nullptr; // histogram storing ctp input rates from previous cycle @@ -73,7 +74,7 @@ class RawDataReaderCheck : public o2::quality_control::checker::CheckInterface std::bitset mLHCBCs; // LHC filling scheme const char* ctpinputs[49] = { " T0A", " T0C", " TVX", " TSC", " TCE", " VBA", " VOR", " VIR", " VNC", " VCH", "11", "12", " UCE", "DMC", " USC", " UVX", " U0C", " U0A", "COS", "LAS", "EMC", " PH0", "23", "24", "ZED", "ZNC", "PHL", "PHH", "PHM", "30", "31", "32", "33", "34", "35", "36", "EJ1", "EJ2", "EG1", "EG2", "DJ1", "DG1", "DJ2", "DG2", "45", "46", "47", "48", "49" }; // ctp input names - ClassDefOverride(RawDataReaderCheck, 7); + ClassDefOverride(RawDataReaderCheck, 8); }; } // namespace o2::quality_control_modules::ctp diff --git a/Modules/CTP/src/RawDataReaderCheck.cxx b/Modules/CTP/src/RawDataReaderCheck.cxx index 404cef071e..60a67696b3 100644 --- a/Modules/CTP/src/RawDataReaderCheck.cxx +++ b/Modules/CTP/src/RawDataReaderCheck.cxx @@ -62,6 +62,12 @@ void RawDataReaderCheck::configure() if (mThresholdRateRatioMedium > 4 || mThresholdRateRatioMedium < 0) { mThresholdRateRatioMedium = 2; } + + param = mCustomParameters.atOrDefaultValue("nSigmaBC", "2"); + mNSigBC = std::stof(param); + if (mNSigBC < 0) { + mNSigBC = 2; + } } Quality RawDataReaderCheck::check(std::map>* moMap) @@ -89,7 +95,7 @@ Quality RawDataReaderCheck::check(std::mapGetEntries() / mLHCBCs.count(); - mThreshold = sqrt(mThreshold); + mThreshold = mThreshold - mNSigBC * sqrt(mThreshold); for (int i = 0; i < o2::constants::lhc::LHCMaxBunches; i++) { if (mLHCBCs[i] && h->GetBinContent(i + 1) <= mThreshold) { mVecMediumBC.push_back(i); // medium BC occures when BC is expected on this possition but there is less inputs than threshold diff --git a/Modules/CTP/src/qc-ctp.json b/Modules/CTP/src/qc-ctp.json index f42c66a68c..80058381eb 100644 --- a/Modules/CTP/src/qc-ctp.json +++ b/Modules/CTP/src/qc-ctp.json @@ -65,7 +65,8 @@ "thresholdRateBad": "3", "thresholdRateMedium": "2", "thresholdRateRatioBad": "3", - "thresholdRateRatioMedium": "2" + "thresholdRateRatioMedium": "2", + "mNSigBC": "2" } } }