Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ZDC] Qc additions #2510

Open
wants to merge 12 commits into
base: master
Choose a base branch
from

Conversation

stefan-zugravel
Copy link
Contributor

-> Addition of BC alignment Plot (with json configurable check)
-> Addition of configurable cut window for centroid (Central_envent_config)
-> Beautyfied centroids

@stefan-zugravel stefan-zugravel changed the title Qc additions [ZDC] Qc additions Feb 18, 2025
namespace o2::quality_control_modules::zdc
{

/// \brief Example QC Check
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You forgot to update the class description

if (mo->getName() == mVectHistoCheck.at(ih).nameHisto) {
// std::ofstream debugFile;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Coding guidelines encourage the removal of commented out code.

if (!std::equal(std::begin(ratio_array), std::end(ratio_array), std::begin(COMPARATOR_ARRAY))) {
mVectHistoCheck.at(ih).numE += 1;
mVectHistoCheck.at(ih).stringE = mVectHistoCheck.at(ih).stringE + mVectHistoCheck.at(ih).paramch.at(x).ch + " ";
// std::ofstream debugFile;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same comment

mVectHistoCheck.at(ih).quality = 3;
}
}
}
}
// dumpStruct();
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

idem

} else {
msgr->SetTextColor(kRed);
}
h->GetListOfFunctions()->Add(msgr);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you are potentially adding a msg for every bin in the plot. That is potentially very dangerous. A plot with a large number of "functions" becomes impossible to display and usually crashes the QCG, respectively the ROOT browser. How many bins are there ?
Please consider another way if indicating problems.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Screenshot 2025-02-21 at 11 36 36 The plot would look like this. There are 12x26 bins

@@ -600,6 +621,12 @@ bool ZDCRecDataTask::add2DHisto(std::string typeH, std::string name, std::string
h2d.ch1 = ch1;
h2d.typech2 = typeCh2;
h2d.ch2 = ch2;
// Begin Stefan addition
if (typeH == "CENTR_ZNA") {
// h2d.histo->GetXaxis()->SetTitle("test2");
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this code does nothing.

} else {
SetConfigCentralEvent(0.0, 0);
}
// End Stefan addition
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do not add such comments. Git keeps track of this for you.

@@ -850,7 +886,7 @@ int ZDCRecDataTask::process(const gsl::span<const o2::zdc::BCRecData>& RecBC,
mEv.centroidZNC(x, y);
mHisto2D.at(i).histo->Fill(x, y);
} else {
if (((float)mEv.tdcV(5, 0) > -2.5 && (float)mEv.tdcV(5, 0) < 2.5) && ((float)mEv.tdcV(4, 0) > -2.5 && (float)mEv.tdcV(4, 0) < 2.5)) {
if (IsEventCentral()) { // STEFAN
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants