Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion Modules/ITS/include/ITS/ITSFhrTask.h
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ class ITSFhrTask final : public TaskInterface
ChipPixelData* mChipDataBuffer = nullptr;
std::vector<ChipPixelData> mChipsBuffer;
int mHitNumberOfChip[7][48][2][14][14] = { { { { { 0 } } } } }; //layer, stave, substave, hic, chip
int mTimeFrameId = 0;
unsigned int mTimeFrameId = 0;
uint32_t mTriggerTypeCount[13] = { 0 };

int mNError = 19;
Expand All @@ -117,6 +117,11 @@ class ITSFhrTask final : public TaskInterface
int*** mErrorCount /* = new int**[NStaves[lay]]*/; //IB : errorcount[stave][FEE][errorid]
int mNoisyPixelNumber[7][48] = { { 0 } };

int mMaxGeneralAxisRange = -3; //the range of TH2Poly plots z axis range, pow(10, mMinGeneralAxisRange) ~ pow(10, mMaxGeneralAxisRange)
int mMinGeneralAxisRange = -12; //
int mMaxGeneralNoisyAxisRange = 4000;
int mMinGeneralNoisyAxisRange = 0;

TString mTriggerType[NTrigger] = { "ORBIT", "HB", "HBr", "HC", "PHYSICS", "PP", "CAL", "SOT", "EOT", "SOC", "EOC", "TF", "INT" };

//General plots
Expand Down
67 changes: 41 additions & 26 deletions Modules/ITS/src/ITSFhrCheck.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
#include <TH1.h>
#include <TList.h>
#include <TPaveText.h>
#include <TLatex.h>
#include <TH2Poly.h>

namespace o2::quality_control_modules::its
Expand Down Expand Up @@ -60,45 +61,59 @@ std::string ITSFhrCheck::getAcceptedType() { return "TH1"; }

void ITSFhrCheck::beautify(std::shared_ptr<MonitorObject> mo, Quality checkResult)
{
TLatex* text[5];
if (mo->getName() == "General/ErrorPlots") {
auto* h = dynamic_cast<TH1D*>(mo->getObject());
auto* msg = new TPaveText(0.5, 0.5, 0.9, 0.75, "NDC");
msg->SetName(Form("%s_msg", mo->GetName()));
if (checkResult == Quality::Good) {
msg->Clear();
msg->AddText("Quality::Good");
msg->AddText("There is no Error found");
msg->SetTextColor(kGreen);
text[0] = new TLatex(0, 0, "Quality::Good");
text[1] = new TLatex(0, -100, "There is no Error found");
for (int i = 0; i < 2; ++i) {
text[i]->SetTextAlign(23);
text[i]->SetTextSize(0.08);
text[i]->SetTextColor(kGreen);
h->GetListOfFunctions()->Add(text[i]);
}
} else if (checkResult == Quality::Bad) {
msg->Clear();
msg->AddText("Quality::Bad");
msg->SetTextColor(kRed);
msg->AddText("Decoding ERROR detected");
msg->AddText("please inform SL");
text[0] = new TLatex(0, 100, "Quality::Bad");
text[1] = new TLatex(0, 0, "Decoding ERROR detected");
text[2] = new TLatex(0, -100, "please inform SL");
for (int i = 0; i < 3; ++i) {
text[i]->SetTextAlign(23);
text[i]->SetTextSize(0.08);
text[i]->SetTextColor(kRed);
h->GetListOfFunctions()->Add(text[i]);
}
}
h->GetListOfFunctions()->Add(msg);
} else if (mo->getName() == "General/General_Occupancy") {
auto* h = dynamic_cast<TH2Poly*>(mo->getObject());
auto* msg = new TPaveText(0.5, 0.5, 0.9, 0.75, "NDC");
msg->SetName(Form("%s_msg", mo->GetName()));
if (checkResult == Quality::Good) {
msg->Clear();
msg->AddText("Quality::Good");
msg->SetTextColor(kGreen);
text[0] = new TLatex(0, 0, "Quality::Good");
text[0]->SetTextAlign(23);
text[0]->SetTextSize(0.08);
text[0]->SetTextColor(kGreen);
h->GetListOfFunctions()->Add(text[0]);
} else if (checkResult == Quality::Bad) {
msg->Clear();
msg->AddText("Quality::Bad");
msg->SetTextColor(kRed);
msg->AddText("Max Occupancy over 10^{-5}");
msg->AddText("or ERROR detected");
msg->AddText("Please Inform SL");
text[0] = new TLatex(0, 100, "Quality::Bad");
text[1] = new TLatex(0, 0, "Max Occupancy over 10^{-5}");
text[2] = new TLatex(0, -100, "or ERROR detected, Please Inform SL");
for (int i = 0; i < 3; ++i) {
text[i]->SetTextAlign(23);
text[i]->SetTextSize(0.08);
text[i]->SetTextColor(kRed);
h->GetListOfFunctions()->Add(text[i]);
}
} else if (checkResult == Quality::Medium) {
msg->Clear();
msg->AddText("Quality::Medium");
msg->SetTextColor(kOrange);
msg->AddText("Max Occupancy over 10^{-6}");
text[0] = new TLatex(0, 0, "Quality::Medium");
text[1] = new TLatex(0, -100, "Max Occupancy over 10^{-6}");
for (int i = 0; i < 2; ++i) {
text[i]->SetTextAlign(23);
text[i]->SetTextSize(0.08);
text[i]->SetTextColor(kOrange);
h->GetListOfFunctions()->Add(text[i]);
}
}
h->GetListOfFunctions()->Add(msg);
}
}

Expand Down
16 changes: 14 additions & 2 deletions Modules/ITS/src/ITSFhrTask.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -88,10 +88,14 @@ void ITSFhrTask::initialize(o2::framework::InitContext& /*ctx*/)
mGeneralOccupancy = new TH2Poly();
mGeneralOccupancy->SetTitle("General Occupancy;mm;mm");
mGeneralOccupancy->SetName("General/General_Occupancy");
mGeneralOccupancy->SetStats(0);
mGeneralOccupancy->GetZaxis()->SetRangeUser(pow(10, mMinGeneralAxisRange), pow(10, mMaxGeneralAxisRange));

mGeneralNoisyPixel = new TH2Poly();
mGeneralNoisyPixel->SetTitle("Noisy Pixel Number;mm;mm");
mGeneralNoisyPixel->SetName("General/Noisy_Pixel");
mGeneralNoisyPixel->SetStats(0);
mGeneralNoisyPixel->GetZaxis()->SetRangeUser(mMinGeneralNoisyAxisRange, mMaxGeneralNoisyAxisRange);

createGeneralPlots();
createOccupancyPlots();
Expand Down Expand Up @@ -630,8 +634,8 @@ void ITSFhrTask::monitorData(o2::framework::ProcessingContext& ctx)
mChipStaveOccupancy[lay]->SetBinContent(ichip + 1, istave + 1, mOccupancy[istave][ichip]);
int ilink = ichip / 3;
for (int ierror = 0; ierror < o2::itsmft::GBTLinkDecodingStat::NErrorsDefined; ierror++) {
if (mErrorVsFeeid && (mErrorCount[istave][ilink][ierror] > 0)) {
mErrorVsFeeid->SetBinContent((istave * 3) + ilink + 1, ierror + 1, mErrorCount[istave][ilink][ierror]);
if (mErrorVsFeeid && (mErrorCount[istave][ilink][ierror] != 0)) {
mErrorVsFeeid->SetBinContent(((istave + StaveBoundary[lay]) * 3) + ilink + 1, ierror + 1, mErrorCount[istave][ilink][ierror]);
}
}
}
Expand Down Expand Up @@ -689,6 +693,10 @@ void ITSFhrTask::getParameters()
mGeomPath = mCustomParameters["geomPath"];
mHitCutForNoisyPixel = std::stoi(mCustomParameters["HitNumberCutForNoisyPixel"]);
mOccupancyCutForNoisyPixel = std::stof(mCustomParameters["OccupancyNumberCutForNoisyPixel"]);
mMaxGeneralAxisRange = std::stof(mCustomParameters["MaxGeneralAxisRange"]);
mMinGeneralAxisRange = std::stof(mCustomParameters["MinGeneralAxisRange"]);
mMaxGeneralNoisyAxisRange = std::stof(mCustomParameters["MaxGeneralNoisyAxisRange"]);
mMinGeneralNoisyAxisRange = std::stof(mCustomParameters["MinGeneralNoisyAxisRange"]);
}

void ITSFhrTask::endOfCycle()
Expand Down Expand Up @@ -739,6 +747,10 @@ void ITSFhrTask::reset()
resetGeneralPlots();
resetOccupancyPlots();

mGeneralOccupancy->Reset("content");
mGeneralNoisyPixel->Reset("content");
mDecoder->clearStat();

if (mLayer < NLayerIB) {
for (int istave = 0; istave < NStaves[mLayer]; istave++) {
for (int ilink = 0; ilink < 3; ilink++) {
Expand Down