From 109cf3d59580fc43faf9737ec4ea7244fb46cccb Mon Sep 17 00:00:00 2001 From: Roman Lavicka Date: Mon, 22 Apr 2024 16:36:51 +0200 Subject: [PATCH 1/2] modification of the stat plot --- PWGUD/TableProducer/DGCandProducer.cxx | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/PWGUD/TableProducer/DGCandProducer.cxx b/PWGUD/TableProducer/DGCandProducer.cxx index de2cb03f21f..05aabaa416f 100644 --- a/PWGUD/TableProducer/DGCandProducer.cxx +++ b/PWGUD/TableProducer/DGCandProducer.cxx @@ -190,10 +190,14 @@ struct DGCandProducer { void init(InitContext&) { + LOGF(debug, " beginning of init reached"); + diffCuts = (DGCutparHolder)DGCuts; + const int nXbinsInStatH = 25; + // add histograms for the different process functions - registry.add("reco/Stat", "Cut statistics; Selection criterion; Collisions", {HistType::kTH1F, {{15, -0.5, 14.5}}}); + registry.add("reco/Stat", "Cut statistics;; Collisions", {HistType::kTH1F, {{nXbinsInStatH, -0.5, static_cast(nXbinsInStatH - 0.5)}}}); registry.add("reco/pt1Vspt2", "2 prong events, p_{T} versus p_{T}", {HistType::kTH2F, {{100, -3., 3.}, {100, -3., 3.0}}}); registry.add("reco/TPCsignal1", "2 prong events, TPC signal versus p_{T} of particle 1", {HistType::kTH2F, {{200, -3., 3.}, {200, 0., 100.0}}}); registry.add("reco/TPCsignal2", "2 prong events, TPC signal versus p_{T} of particle 2", {HistType::kTH2F, {{200, -3., 3.}, {200, 0., 100.0}}}); @@ -212,6 +216,17 @@ struct DGCandProducer { registry.add("reco/ft0C", "FT0C amplitudes", {HistType::kTH2F, {{20001, -0.5, 20000.5}, {13, -0.5, 12.5}}}); registry.add("reco/fddA", "FDDA amplitudes", {HistType::kTH2F, {{20001, -0.5, 20000.5}, {13, -0.5, 12.5}}}); registry.add("reco/fddC", "FDDC amplitudes", {HistType::kTH2F, {{20001, -0.5, 20000.5}, {13, -0.5, 12.5}}}); + + std::string labels[nXbinsInStatH] = {"all","hasBC","selected","FITveto","MID trk","global PV trk","not global PB trk", + "ITS-only PV trk","TOF PV trk fraction","n PV trks","PID","pt","eta","net charge", + "inv mass","TF border","no pile-up","ITSROF","z-vtx","ITSTPC vtx","","","","",""}; + + registry.get(HIST("reco/Stat"))->SetNdivisions(nXbinsInStatH,"X"); + for (int iXbin(1); iXbin < nXbinsInStatH+1; iXbin++){ + registry.get(HIST("reco/Stat"))->GetXaxis()->ChangeLabel(iXbin,45,0.03,33,-1,-1,labels[iXbin-1]); + } + + LOGF(debug, " end of init reached"); } // process function for real data From 972b53aebb2e9b66a653869ac990e3da11b82cef Mon Sep 17 00:00:00 2001 From: ALICE Action Bot Date: Mon, 22 Apr 2024 14:41:35 +0000 Subject: [PATCH 2/2] Please consider the following formatting changes --- PWGUD/TableProducer/DGCandProducer.cxx | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/PWGUD/TableProducer/DGCandProducer.cxx b/PWGUD/TableProducer/DGCandProducer.cxx index 05aabaa416f..744505c3704 100644 --- a/PWGUD/TableProducer/DGCandProducer.cxx +++ b/PWGUD/TableProducer/DGCandProducer.cxx @@ -217,13 +217,13 @@ struct DGCandProducer { registry.add("reco/fddA", "FDDA amplitudes", {HistType::kTH2F, {{20001, -0.5, 20000.5}, {13, -0.5, 12.5}}}); registry.add("reco/fddC", "FDDC amplitudes", {HistType::kTH2F, {{20001, -0.5, 20000.5}, {13, -0.5, 12.5}}}); - std::string labels[nXbinsInStatH] = {"all","hasBC","selected","FITveto","MID trk","global PV trk","not global PB trk", - "ITS-only PV trk","TOF PV trk fraction","n PV trks","PID","pt","eta","net charge", - "inv mass","TF border","no pile-up","ITSROF","z-vtx","ITSTPC vtx","","","","",""}; + std::string labels[nXbinsInStatH] = {"all", "hasBC", "selected", "FITveto", "MID trk", "global PV trk", "not global PB trk", + "ITS-only PV trk", "TOF PV trk fraction", "n PV trks", "PID", "pt", "eta", "net charge", + "inv mass", "TF border", "no pile-up", "ITSROF", "z-vtx", "ITSTPC vtx", "", "", "", "", ""}; - registry.get(HIST("reco/Stat"))->SetNdivisions(nXbinsInStatH,"X"); - for (int iXbin(1); iXbin < nXbinsInStatH+1; iXbin++){ - registry.get(HIST("reco/Stat"))->GetXaxis()->ChangeLabel(iXbin,45,0.03,33,-1,-1,labels[iXbin-1]); + registry.get(HIST("reco/Stat"))->SetNdivisions(nXbinsInStatH, "X"); + for (int iXbin(1); iXbin < nXbinsInStatH + 1; iXbin++) { + registry.get(HIST("reco/Stat"))->GetXaxis()->ChangeLabel(iXbin, 45, 0.03, 33, -1, -1, labels[iXbin - 1]); } LOGF(debug, " end of init reached");