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

Adding plots vs TPC occupancy #13552

Open
wants to merge 5 commits into
base: dev
Choose a base branch
from

Conversation

chiarazampolli
Copy link
Collaborator

No description provided.

@chiarazampolli chiarazampolli requested review from davidrohr and a team as code owners October 1, 2024 13:08
Copy link
Contributor

github-actions bot commented Oct 1, 2024

REQUEST FOR PRODUCTION RELEASES:
To request your PR to be included in production software, please add the corresponding labels called "async-" to your PR. Add the labels directly (if you have the permissions) or add a comment of the form (note that labels are separated by a ",")

+async-label <label1>, <label2>, !<label3> ...

This will add <label1> and <label2> and removes <label3>.

The following labels are available
async-2023-pbpb-apass4
async-2023-pp-apass4
async-2024-pp-apass1
async-2022-pp-apass7
async-2024-pp-cpass0

@chiarazampolli
Copy link
Collaborator Author

Do not review yet, I need to see if it compiles with QC.

@chiarazampolli
Copy link
Collaborator Author

Hello @shahor02 ,

If it compiles fine, this would be ready for review.

Chiara

@chiarazampolli
Copy link
Collaborator Author

chiarazampolli commented Oct 4, 2024

An example from 3 TFs from PbPb (before fixing the Z axis title which is in the last commit):

Screenshot 2024-10-04 at 10 46 17

And from pp:
Screenshot 2024-10-04 at 10 48 44

I am not sure why the multiplicity shows an underflow (in pp; in PbPb there are 15)... The limit is 0, so I would assume there is no underflow.

@chiarazampolli
Copy link
Collaborator Author

As for the underflow, can it be some artifact? If I take the projectionZ itself, I see that the bin with 15 entries is not the underflow one:

{code}
root [3] .x plot.C
ibinZ = 0 low edge = -1e+06 content = 0
ibinZ = 1 low edge = 0 content = 15
ibinZ = 2 low edge = 1e+06 content = 466
ibinZ = 3 low edge = 2e+06 content = 1148
ibinZ = 4 low edge = 3e+06 content = 1139
ibinZ = 5 low edge = 4e+06 content = 951
ibinZ = 6 low edge = 5e+06 content = 2816
{code}

The macro I used to plot and then print the bins is:

{code}
void plot(bool isPbPb = true) {

TFile* f = new TFile("ITSTPCmatched_allTracks_enableK0.root");
TString plotName = "mK0MassVsPtVsOccPbPb";
if (isPbPb == false) {
plotName = "mK0MassVsPtVsOccpp";
}
TH3F* h1 = (TH3F*)f->Get(Form("%s", plotName.Data()));
TH1D* hx = (TH1D*)h1->ProjectionX();
TH1D* hy = (TH1D*)h1->ProjectionY();
TH1D* hz = (TH1D*)h1->ProjectionZ();
gStyle->SetOptStat(1111111);

TCanvas* c = new TCanvas("c", "c", 50, 50, 1150, 1150);
c->Divide(2, 2);
c->cd(1);
h1->Draw();
c->cd(2);
hx->Draw();
c->cd(3);
hy->Draw();
c->cd(4);
hz->Draw();

for (int ibinX = 1; ibinX <= h1->GetNbinsX(); ++ibinX) {
for (int ibinY = 1; ibinY <= h1->GetNbinsY(); ++ibinY) {
if (h1->GetBinContent(ibinX, ibinY, 0) != 0) {
std::cout << "ibinX = " << ibinX << " ibiny = " << ibinY << " content with binZ=0 = " << h1->GetBinContent(ibinX, ibinY, 0) << std::endl;
}
}
}
for (int ibinZ = 0; ibinZ <= hz->GetNbinsX(); ++ibinZ) {
std::cout << "ibinZ = " << ibinZ << " low edge = " << hz->GetXaxis()->GetBinLowEdge(ibinZ) << " content = " << hz->GetBinContent(ibinZ) << std::endl;
}
// c->SaveAs("K0s.png");
//c->SaveAs("K0s.pdf");
return;
}
{code}

@chiarazampolli
Copy link
Collaborator Author

The observation about underflow is simply caused by the fact that I have changed to start from occupancy 0 but probably did not re-run all tests (I am doing 4, pp, PbPb, with and without QC each). Re-running everything, all is good, and when the occ axis starts from 0, there are no underflows.

pp:
Screenshot 2024-10-04 at 14 35 46

with:
ibinZ = 0 low edge = -166667 content = 0
ibinZ = 1 low edge = 0 content = 1
ibinZ = 2 low edge = 166667 content = 2
ibinZ = 3 low edge = 333333 content = 37
ibinZ = 4 low edge = 500000 content = 164
ibinZ = 5 low edge = 666667 content = 35
ibinZ = 6 low edge = 833333 content = 2

PbPb:
Screenshot 2024-10-04 at 14 37 26

with:

ibinZ = 0 low edge = -1e+06 content = 0
ibinZ = 1 low edge = 0 content = 15
ibinZ = 2 low edge = 1e+06 content = 466
ibinZ = 3 low edge = 2e+06 content = 1148
ibinZ = 4 low edge = 3e+06 content = 1139
ibinZ = 5 low edge = 4e+06 content = 951
ibinZ = 6 low edge = 5e+06 content = 2816

@chiarazampolli
Copy link
Collaborator Author

Moving to WIP. The current binning in PbPb, with the reco of a full CTF at ~ 26 kHz shows 1.7% of overflow in TPC occupancy. I am testing with a wider range.

@chiarazampolli chiarazampolli changed the title Adding plots vs TPC occupancy WIP Adding plots vs TPC occupancy Oct 4, 2024
@chiarazampolli chiarazampolli changed the title WIP Adding plots vs TPC occupancy Adding plots vs TPC occupancy Oct 7, 2024
@chiarazampolli
Copy link
Collaborator Author

Hello @shahor02 ,

For me this can be merged.
You will see that there are 2 histograms 3D, one for pp and one for PbPb, where the binning in TPC occupancy is different. Within the QC framework, one could decide which one to use, but it needs to be checked and implemented in the async merging stage.
Without the QC framework, one could then use the configParam.
For now, we have two histograms, one will be empty.

Chiara

@chiarazampolli
Copy link
Collaborator Author

With a second thought, maybe it is better to add the cuts on DCA and cosPA before merging...

@shahor02
Copy link
Collaborator

shahor02 commented Oct 7, 2024

OK, I would make the cuts the parameters of the json.
To avoid defining 2 histos: cannot we use different jsons (passing the binning) depending on the $BEAMTYPE in the qc-workflow.sh ?

@chiarazampolli
Copy link
Collaborator Author

Yes, sure, the cuts will be a parameter.
And yes, 2 jsons were the first thought I had, then I found this:
https://github.com/AliceO2Group/QualityControl/blob/master/doc/Advanced.md#definition-and-access-of-user-defined-configuration-extendedtaskparameters
which in online would work very well, but for async we need to see for the merging, it seems.
I think that maintaining 2 json is very error prone, this is why I would not do it unless this extra histogram is really a problem.

@chiarazampolli
Copy link
Collaborator Author

chiarazampolli commented Oct 10, 2024

With the cut on DCA and cosPA, 1 full CTF from zzo (PbPb): statistics decrease from ~170k to ~3k candidates:

Screenshot 2024-10-10 at 13 42 50

@alibuild
Copy link
Collaborator

Error while checking build/O2/fullCI for b807484 at 2024-10-10 14:03:

## sw/BUILD/O2-latest/log
c++: error: unrecognized command-line option '--rtlib=compiler-rt'
c++: error: unrecognized command-line option '--rtlib=compiler-rt'
input_line_9:367:51: error: cannot assign to non-static data member within const member function 'setK0MinCosPA'
Error: /sw/slc8_x86-64/ROOT/v6-32-06-alice1-7/bin/rootcling: compilation failure (/sw/BUILD/ecff9fc079851887d3c56be5995620165734b40e/O2/Detectors/GLOQC/G__O2GLOQCfb38b73dd3_dictUmbrella.h)
ninja: build stopped: subcommand failed.

Full log here.

@chiarazampolli
Copy link
Collaborator Author

Hello @shahor02 ,
Can you review?
Thanks!
Chiara

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.

3 participants