Skip to content

Commit 3778abe

Browse files
rolavickalibuild
andauthored
[PWGUD] Modification of the stat plot in dgcandproducer (#5776)
* modification of the stat plot * Please consider the following formatting changes --------- Co-authored-by: ALICE Action Bot <alibuild@cern.ch>
1 parent eaf803f commit 3778abe

1 file changed

Lines changed: 16 additions & 1 deletion

File tree

PWGUD/TableProducer/DGCandProducer.cxx

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,10 +190,14 @@ struct DGCandProducer {
190190

191191
void init(InitContext&)
192192
{
193+
LOGF(debug, "<DGCandProducer> beginning of init reached");
194+
193195
diffCuts = (DGCutparHolder)DGCuts;
194196

197+
const int nXbinsInStatH = 25;
198+
195199
// add histograms for the different process functions
196-
registry.add("reco/Stat", "Cut statistics; Selection criterion; Collisions", {HistType::kTH1F, {{15, -0.5, 14.5}}});
200+
registry.add("reco/Stat", "Cut statistics;; Collisions", {HistType::kTH1F, {{nXbinsInStatH, -0.5, static_cast<float>(nXbinsInStatH - 0.5)}}});
197201
registry.add("reco/pt1Vspt2", "2 prong events, p_{T} versus p_{T}", {HistType::kTH2F, {{100, -3., 3.}, {100, -3., 3.0}}});
198202
registry.add("reco/TPCsignal1", "2 prong events, TPC signal versus p_{T} of particle 1", {HistType::kTH2F, {{200, -3., 3.}, {200, 0., 100.0}}});
199203
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 {
212216
registry.add("reco/ft0C", "FT0C amplitudes", {HistType::kTH2F, {{20001, -0.5, 20000.5}, {13, -0.5, 12.5}}});
213217
registry.add("reco/fddA", "FDDA amplitudes", {HistType::kTH2F, {{20001, -0.5, 20000.5}, {13, -0.5, 12.5}}});
214218
registry.add("reco/fddC", "FDDC amplitudes", {HistType::kTH2F, {{20001, -0.5, 20000.5}, {13, -0.5, 12.5}}});
219+
220+
std::string labels[nXbinsInStatH] = {"all", "hasBC", "selected", "FITveto", "MID trk", "global PV trk", "not global PB trk",
221+
"ITS-only PV trk", "TOF PV trk fraction", "n PV trks", "PID", "pt", "eta", "net charge",
222+
"inv mass", "TF border", "no pile-up", "ITSROF", "z-vtx", "ITSTPC vtx", "", "", "", "", ""};
223+
224+
registry.get<TH1>(HIST("reco/Stat"))->SetNdivisions(nXbinsInStatH, "X");
225+
for (int iXbin(1); iXbin < nXbinsInStatH + 1; iXbin++) {
226+
registry.get<TH1>(HIST("reco/Stat"))->GetXaxis()->ChangeLabel(iXbin, 45, 0.03, 33, -1, -1, labels[iXbin - 1]);
227+
}
228+
229+
LOGF(debug, "<DGCandProducer> end of init reached");
215230
}
216231

217232
// process function for real data

0 commit comments

Comments
 (0)