Skip to content

Commit 5e330c0

Browse files
authored
[DPG] Update timeDependentQa.cxx - adjusting binning for 2D histos (AliceO2Group#10550)
1 parent b554139 commit 5e330c0

File tree

1 file changed

+54
-25
lines changed

1 file changed

+54
-25
lines changed

DPG/Tasks/AOTEvent/timeDependentQa.cxx

Lines changed: 54 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,8 @@ const AxisSpec axisSparseDcaR{100, -1., 1., "DCA_{r}, cm"};
5252
const AxisSpec axisSparseDcaZ{100, -1., 1., "DCA_{z}, cm"};
5353

5454
struct TimeDependentQaTask {
55-
Configurable<float> confTimeBinWidthInSec{"TimeBinWidthInSec", 0.25, "Width of time bins in seconds"}; // o2-linter: disable=name/configurable (temporary fix)
55+
Configurable<float> confTimeBinWidthInSec{"TimeBinWidthInSec", 0.5, "Width of time bins in seconds"}; // o2-linter: disable=name/configurable (temporary fix)
56+
Configurable<float> confTimeWiderBinFactor{"TimeWideBinFactor", 4, "Factor for wider time bins for some 2D histograms"}; // o2-linter: disable=name/configurable (temporary fix)
5657
Configurable<int> confTakeVerticesWithUPCsettings{"ConsiderVerticesWithUPCsettings", 0, "Take vertices: 0 - all , 1 - only without UPC settings, 2 - only with UPC settings"}; // o2-linter: disable=name/configurable (temporary fix)
5758
Configurable<int> confFlagFillPhiVsTimeHist{"FlagFillPhiVsTimeHist", 2, "0 - don't fill , 1 - fill only for global/7cls/TRD/TOF tracks, 2 - fill also layer-by-layer"}; // o2-linter: disable=name/configurable (temporary fix)
5859
Configurable<int> confFlagFillEtaPhiVsTimeHist{"FlagFillEtaPhiVsTimeHist", 0, "0 - don't fill , 1 - fill"}; // o2-linter: disable=name/configurable (temporary fix)
@@ -179,9 +180,11 @@ struct TimeDependentQaTask {
179180
minSec = floor(tsSOR / 1000.);
180181
maxSec = ceil(tsEOR / 1000.);
181182
int nTimeBins = static_cast<int>((maxSec - minSec) / confTimeBinWidthInSec);
183+
int nTimeWideBins = static_cast<int>((maxSec - minSec) / confTimeBinWidthInSec / confTimeWiderBinFactor);
182184
double timeInterval = nTimeBins * confTimeBinWidthInSec;
183185

184186
const AxisSpec axisSeconds{nTimeBins, 0, timeInterval, "seconds"};
187+
const AxisSpec axisSecondsWideBins{nTimeWideBins, 0, timeInterval, "seconds"};
185188
histos.add("hSecondsBCsTVX", "", kTH1D, {axisSeconds});
186189
histos.add("hSecondsBCsTVXandTFborderCuts", "", kTH1D, {axisSeconds});
187190

@@ -207,7 +210,7 @@ struct TimeDependentQaTask {
207210

208211
// ### QA event selection bits
209212
int nEvSelBits = enNumEvSelBits;
210-
histos.add("hSecondsEventSelBits", "", kTH2F, {axisSeconds, {nEvSelBits, -0.5, nEvSelBits - 0.5, "Monitoring of event selection bits"}});
213+
histos.add("hSecondsEventSelBits", "", kTH2F, {axisSecondsWideBins, {nEvSelBits, -0.5, nEvSelBits - 0.5, "Monitoring of event selection bits"}});
211214
TAxis* axSelBits = reinterpret_cast<TAxis*>(histos.get<TH2>(HIST("hSecondsEventSelBits"))->GetYaxis());
212215
axSelBits->SetBinLabel(1 + enCollisionsAll, "collisionsAll");
213216
axSelBits->SetBinLabel(1 + enIsTriggerTVX, "IsTriggerTVX");
@@ -243,7 +246,7 @@ struct TimeDependentQaTask {
243246

244247
// ### QA RCT flags
245248
int nRctFlagsTotal = enNumRctFlagsTotal;
246-
histos.add("hSecondsRCTflags", "", kTH2F, {axisSeconds, {nRctFlagsTotal + 1, -0.5, nRctFlagsTotal + 1 - 0.5, "Monitoring of RCT flags"}});
249+
histos.add("hSecondsRCTflags", "", kTH2F, {axisSecondsWideBins, {nRctFlagsTotal + 1, -0.5, nRctFlagsTotal + 1 - 0.5, "Monitoring of RCT flags"}});
247250
axRctFlags = reinterpret_cast<TAxis*>(histos.get<TH2>(HIST("hSecondsRCTflags"))->GetYaxis());
248251
axRctFlags->SetBinLabel(1, "NcollisionsSel8");
249252
axRctFlags->SetBinLabel(2 + kCPVBad, "CPVBad");
@@ -285,84 +288,96 @@ struct TimeDependentQaTask {
285288
const AxisSpec axisFraction{20, 0, 1., "Fraction shared cls Tpc"};
286289
histos.add("allTracks/hSecondsTracks", "", kTH1D, {axisSeconds});
287290
if (confFlagCheckQoverPtHist) {
288-
histos.add("allTracks/hSecondsQoverPtSumDcaR", "", kTH2D, {axisSeconds, axisSparseQoverPt});
289-
histos.add("allTracks/hSecondsQoverPtSumDcaZ", "", kTH2D, {axisSeconds, axisSparseQoverPt});
291+
histos.add("allTracks/hSecondsQoverPtSumDcaR", "", kTH2D, {axisSecondsWideBins, axisSparseQoverPt});
292+
histos.add("allTracks/hSecondsQoverPtSumDcaZ", "", kTH2D, {axisSecondsWideBins, axisSparseQoverPt});
290293
}
291294
histos.add("allTracks/hSecondsSumDcaR", "", kTH1D, {axisSeconds});
292295
histos.add("allTracks/hSecondsSumDcaZ", "", kTH1D, {axisSeconds});
293296
histos.add("allTracks/hSecondsSumPt", "", kTH1D, {axisSeconds});
294-
histos.add("allTracks/hSecondsNumClsIts", "", kTH2D, {axisSeconds, axisNclsITS});
297+
histos.add("allTracks/hSecondsNumClsIts", "", kTH1D, {axisSeconds});
298+
histos.add("allTracks/hSeconds2DNumClsIts", "", kTH2D, {axisSecondsWideBins, axisNclsITS});
295299
histos.add("allTracks/hSecondsChi2NClIts", "", kTH1D, {axisSeconds});
296300
if (confFlagCheckMshape)
297301
histos.add("allTracks/hSecondsTracksMshape", "", kTH1D, {axisSeconds});
298302

299303
// QA for PV contributors
300304
histos.add("PVcontrib/hSecondsTracks", "", kTH1D, {axisSeconds});
301-
// histos.add("PVcontrib/hSecondsQoverPtSumDcaR", "", kTH2D, {axisSeconds, axisSparseQoverPt});
302-
// histos.add("PVcontrib/hSecondsQoverPtSumDcaZ", "", kTH2D, {axisSeconds, axisSparseQoverPt});
303305
histos.add("PVcontrib/hSecondsSumDcaR", "", kTH1D, {axisSeconds});
304306
histos.add("PVcontrib/hSecondsSumDcaZ", "", kTH1D, {axisSeconds});
305307
histos.add("PVcontrib/hSecondsSumPt", "", kTH1D, {axisSeconds});
306-
histos.add("PVcontrib/hSecondsNumClsIts", "", kTH2D, {axisSeconds, axisNclsITS});
308+
histos.add("PVcontrib/hSecondsNumClsIts", "", kTH1D, {axisSeconds});
309+
histos.add("PVcontrib/hSeconds2DNumClsIts", "", kTH2D, {axisSecondsWideBins, axisNclsITS});
307310
histos.add("PVcontrib/hSecondsChi2NClIts", "", kTH1D, {axisSeconds});
308311

309312
// QA for global tracks
310313
// ### A side
311314
// global tracks
312315
histos.add("A/global/hSecondsNumTracks", "", kTH1D, {axisSeconds});
313316
if (confFlagCheckQoverPtHist) {
314-
histos.add("A/global/hSecondsQoverPtSumDcaR", "", kTH2D, {axisSeconds, axisSparseQoverPt});
315-
histos.add("A/global/hSecondsQoverPtSumDcaZ", "", kTH2D, {axisSeconds, axisSparseQoverPt});
317+
histos.add("A/global/hSecondsQoverPtSumDcaR", "", kTH2D, {axisSecondsWideBins, axisSparseQoverPt});
318+
histos.add("A/global/hSecondsQoverPtSumDcaZ", "", kTH2D, {axisSecondsWideBins, axisSparseQoverPt});
316319
}
317320
histos.add("A/global/hSecondsSumDcaR", "", kTH1D, {axisSeconds});
318321
histos.add("A/global/hSecondsSumDcaZ", "", kTH1D, {axisSeconds});
319322
histos.add("A/global/hSecondsSumPt", "", kTH1D, {axisSeconds});
320-
histos.add("A/global/hSecondsNumClsIts", "", kTH2D, {axisSeconds, axisNclsITS});
323+
histos.add("A/global/hSecondsNumClsIts", "", kTH1D, {axisSeconds});
324+
histos.add("A/global/hSeconds2DNumClsIts", "", kTH2D, {axisSecondsWideBins, axisNclsITS});
321325
histos.add("A/global/hSecondsChi2NClIts", "", kTH1D, {axisSeconds});
322-
histos.add("A/global/hSecondsNumClsTpc", "", kTH2D, {axisSeconds, axisNclsTPC});
326+
histos.add("A/global/hSecondsNumClsTpc", "", kTH1D, {axisSeconds});
327+
histos.add("A/global/hSeconds2DNumClsTpc", "", kTH2D, {axisSecondsWideBins, axisNclsTPC});
323328
histos.add("A/global/hSecondsChi2NClTpc", "", kTH1D, {axisSeconds});
324-
histos.add("A/global/hSecondsTpcFractionSharedCls", "", kTH2D, {axisSeconds, axisFraction});
329+
histos.add("A/global/hSecondsTpcFractionSharedCls", "", kTH1D, {axisSeconds});
330+
histos.add("A/global/hSeconds2DTpcFractionSharedCls", "", kTH2D, {axisSecondsWideBins, axisFraction});
325331
histos.add("A/global/hSecondsDeDx", "", kTH1D, {axisSeconds});
326332

327333
// global && PV tracks
328334
histos.add("A/globalPV/hSecondsNumPVcontributors", "", kTH1D, {axisSeconds});
329335
histos.add("A/globalPV/hSecondsSumDcaR", "", kTH1D, {axisSeconds});
330336
histos.add("A/globalPV/hSecondsSumDcaZ", "", kTH1D, {axisSeconds});
331337
histos.add("A/globalPV/hSecondsSumPt", "", kTH1D, {axisSeconds});
332-
histos.add("A/globalPV/hSecondsNumClsIts", "", kTH2D, {axisSeconds, axisNclsITS});
338+
histos.add("A/globalPV/hSecondsNumClsIts", "", kTH1D, {axisSeconds});
339+
histos.add("A/globalPV/hSeconds2DNumClsIts", "", kTH2D, {axisSecondsWideBins, axisNclsITS});
333340
histos.add("A/globalPV/hSecondsChi2NClIts", "", kTH1D, {axisSeconds});
334-
histos.add("A/globalPV/hSecondsNumClsTpc", "", kTH2D, {axisSeconds, axisNclsTPC});
341+
histos.add("A/globalPV/hSecondsNumClsTpc", "", kTH1D, {axisSeconds});
342+
histos.add("A/globalPV/hSeconds2DNumClsTpc", "", kTH2D, {axisSecondsWideBins, axisNclsTPC});
335343
histos.add("A/globalPV/hSecondsChi2NClTpc", "", kTH1D, {axisSeconds});
336-
histos.add("A/globalPV/hSecondsTpcFractionSharedCls", "", kTH2D, {axisSeconds, axisFraction});
344+
histos.add("A/globalPV/hSecondsTpcFractionSharedCls", "", kTH1D, {axisSeconds});
345+
histos.add("A/globalPV/hSeconds2DTpcFractionSharedCls", "", kTH2D, {axisSecondsWideBins, axisFraction});
337346
histos.add("A/globalPV/hSecondsDeDx", "", kTH1D, {axisSeconds});
338347

339348
// ### C side
340349
// global tracks
341350
histos.add("C/global/hSecondsNumTracks", "", kTH1D, {axisSeconds});
342351
if (confFlagCheckQoverPtHist) {
343-
histos.add("C/global/hSecondsQoverPtSumDcaR", "", kTH2D, {axisSeconds, axisSparseQoverPt});
344-
histos.add("C/global/hSecondsQoverPtSumDcaZ", "", kTH2D, {axisSeconds, axisSparseQoverPt});
352+
histos.add("C/global/hSecondsQoverPtSumDcaR", "", kTH2D, {axisSecondsWideBins, axisSparseQoverPt});
353+
histos.add("C/global/hSecondsQoverPtSumDcaZ", "", kTH2D, {axisSecondsWideBins, axisSparseQoverPt});
345354
}
346355
histos.add("C/global/hSecondsSumDcaR", "", kTH1D, {axisSeconds});
347356
histos.add("C/global/hSecondsSumDcaZ", "", kTH1D, {axisSeconds});
348357
histos.add("C/global/hSecondsSumPt", "", kTH1D, {axisSeconds});
349-
histos.add("C/global/hSecondsNumClsIts", "", kTH2D, {axisSeconds, axisNclsITS});
358+
histos.add("C/global/hSecondsNumClsIts", "", kTH1D, {axisSeconds});
359+
histos.add("C/global/hSeconds2DNumClsIts", "", kTH2D, {axisSecondsWideBins, axisNclsITS});
350360
histos.add("C/global/hSecondsChi2NClIts", "", kTH1D, {axisSeconds});
351-
histos.add("C/global/hSecondsNumClsTpc", "", kTH2D, {axisSeconds, axisNclsTPC});
361+
histos.add("C/global/hSecondsNumClsTpc", "", kTH1D, {axisSeconds});
362+
histos.add("C/global/hSeconds2DNumClsTpc", "", kTH2D, {axisSecondsWideBins, axisNclsTPC});
352363
histos.add("C/global/hSecondsChi2NClTpc", "", kTH1D, {axisSeconds});
353-
histos.add("C/global/hSecondsTpcFractionSharedCls", "", kTH2D, {axisSeconds, axisFraction});
364+
histos.add("C/global/hSecondsTpcFractionSharedCls", "", kTH1D, {axisSeconds});
365+
histos.add("C/global/hSeconds2DTpcFractionSharedCls", "", kTH2D, {axisSecondsWideBins, axisFraction});
354366
histos.add("C/global/hSecondsDeDx", "", kTH1D, {axisSeconds});
355367

356368
// global && PV tracks
357369
histos.add("C/globalPV/hSecondsNumPVcontributors", "", kTH1D, {axisSeconds});
358370
histos.add("C/globalPV/hSecondsSumDcaR", "", kTH1D, {axisSeconds});
359371
histos.add("C/globalPV/hSecondsSumDcaZ", "", kTH1D, {axisSeconds});
360372
histos.add("C/globalPV/hSecondsSumPt", "", kTH1D, {axisSeconds});
361-
histos.add("C/globalPV/hSecondsNumClsIts", "", kTH2D, {axisSeconds, axisNclsITS});
373+
histos.add("C/globalPV/hSecondsNumClsIts", "", kTH1D, {axisSeconds});
374+
histos.add("C/globalPV/hSeconds2DNumClsIts", "", kTH2D, {axisSecondsWideBins, axisNclsITS});
362375
histos.add("C/globalPV/hSecondsChi2NClIts", "", kTH1D, {axisSeconds});
363-
histos.add("C/globalPV/hSecondsNumClsTpc", "", kTH2D, {axisSeconds, axisNclsTPC});
376+
histos.add("C/globalPV/hSecondsNumClsTpc", "", kTH1D, {axisSeconds});
377+
histos.add("C/globalPV/hSeconds2DNumClsTpc", "", kTH2D, {axisSecondsWideBins, axisNclsTPC});
364378
histos.add("C/globalPV/hSecondsChi2NClTpc", "", kTH1D, {axisSeconds});
365-
histos.add("C/globalPV/hSecondsTpcFractionSharedCls", "", kTH2D, {axisSeconds, axisFraction});
379+
histos.add("C/globalPV/hSecondsTpcFractionSharedCls", "", kTH1D, {axisSeconds});
380+
histos.add("C/globalPV/hSeconds2DTpcFractionSharedCls", "", kTH2D, {axisSecondsWideBins, axisFraction});
366381
histos.add("C/globalPV/hSecondsDeDx", "", kTH1D, {axisSeconds});
367382

368383
// phi holes vs time
@@ -558,6 +573,7 @@ struct TimeDependentQaTask {
558573
histos.fill(HIST("allTracks/hSecondsQoverPtSumDcaZ"), secFromSOR, qpt, dcaZabs);
559574
}
560575
histos.fill(HIST("allTracks/hSecondsNumClsIts"), secFromSOR, track.itsNCls());
576+
histos.fill(HIST("allTracks/hSeconds2DNumClsIts"), secFromSOR, track.itsNCls());
561577
histos.fill(HIST("allTracks/hSecondsChi2NClIts"), secFromSOR, track.itsChi2NCl());
562578
if (confFlagCheckMshape && isMshape) {
563579
histos.fill(HIST("allTracks/hSecondsTracksMshape"), secFromSOR);
@@ -575,6 +591,7 @@ struct TimeDependentQaTask {
575591
// histos.fill(HIST("PVcontrib/hSecondsQoverPtSumDcaR"), secFromSOR, qpt, dcaRabs);
576592
// histos.fill(HIST("PVcontrib/hSecondsQoverPtSumDcaZ"), secFromSOR, qpt, dcaZabs);
577593
histos.fill(HIST("PVcontrib/hSecondsNumClsIts"), secFromSOR, track.itsNCls());
594+
histos.fill(HIST("PVcontrib/hSeconds2DNumClsIts"), secFromSOR, track.itsNCls());
578595
histos.fill(HIST("PVcontrib/hSecondsChi2NClIts"), secFromSOR, track.itsChi2NCl());
579596
}
580597

@@ -594,11 +611,14 @@ struct TimeDependentQaTask {
594611
histos.fill(HIST("A/global/hSecondsSumDcaZ"), secFromSOR, dcaZabs);
595612
histos.fill(HIST("A/global/hSecondsSumPt"), secFromSOR, track.pt());
596613
histos.fill(HIST("A/global/hSecondsNumClsIts"), secFromSOR, track.itsNCls());
614+
histos.fill(HIST("A/global/hSeconds2DNumClsIts"), secFromSOR, track.itsNCls());
597615
histos.fill(HIST("A/global/hSecondsChi2NClIts"), secFromSOR, track.itsChi2NCl());
598616
histos.fill(HIST("A/global/hSecondsNumClsTpc"), secFromSOR, track.tpcNClsFound());
617+
histos.fill(HIST("A/global/hSeconds2DNumClsTpc"), secFromSOR, track.tpcNClsFound());
599618
histos.fill(HIST("A/global/hSecondsChi2NClTpc"), secFromSOR, track.tpcChi2NCl());
600619
if (track.tpcNClsFound() >= confCutOnNtpcClsForSharedFractAndDeDxCalc) {
601620
histos.fill(HIST("A/global/hSecondsTpcFractionSharedCls"), secFromSOR, track.tpcFractionSharedCls());
621+
histos.fill(HIST("A/global/hSeconds2DTpcFractionSharedCls"), secFromSOR, track.tpcFractionSharedCls());
602622
if (dedx < 1.e4) // protection from weird values
603623
histos.fill(HIST("A/global/hSecondsDeDx"), secFromSOR, dedx);
604624
}
@@ -612,11 +632,14 @@ struct TimeDependentQaTask {
612632
histos.fill(HIST("A/globalPV/hSecondsSumDcaZ"), secFromSOR, dcaZabs);
613633
histos.fill(HIST("A/globalPV/hSecondsSumPt"), secFromSOR, track.pt());
614634
histos.fill(HIST("A/globalPV/hSecondsNumClsIts"), secFromSOR, track.itsNCls());
635+
histos.fill(HIST("A/globalPV/hSeconds2DNumClsIts"), secFromSOR, track.itsNCls());
615636
histos.fill(HIST("A/globalPV/hSecondsChi2NClIts"), secFromSOR, track.itsChi2NCl());
616637
histos.fill(HIST("A/globalPV/hSecondsNumClsTpc"), secFromSOR, track.tpcNClsFound());
638+
histos.fill(HIST("A/globalPV/hSeconds2DNumClsTpc"), secFromSOR, track.tpcNClsFound());
617639
histos.fill(HIST("A/globalPV/hSecondsChi2NClTpc"), secFromSOR, track.tpcChi2NCl());
618640
if (track.tpcNClsFound() >= confCutOnNtpcClsForSharedFractAndDeDxCalc) {
619641
histos.fill(HIST("A/globalPV/hSecondsTpcFractionSharedCls"), secFromSOR, track.tpcFractionSharedCls());
642+
histos.fill(HIST("A/globalPV/hSeconds2DTpcFractionSharedCls"), secFromSOR, track.tpcFractionSharedCls());
620643
if (dedx < 1.e4) // protection from weird values
621644
histos.fill(HIST("A/globalPV/hSecondsDeDx"), secFromSOR, dedx);
622645
}
@@ -634,11 +657,14 @@ struct TimeDependentQaTask {
634657
histos.fill(HIST("C/global/hSecondsSumDcaZ"), secFromSOR, dcaZabs);
635658
histos.fill(HIST("C/global/hSecondsSumPt"), secFromSOR, track.pt());
636659
histos.fill(HIST("C/global/hSecondsNumClsIts"), secFromSOR, track.itsNCls());
660+
histos.fill(HIST("C/global/hSeconds2DNumClsIts"), secFromSOR, track.itsNCls());
637661
histos.fill(HIST("C/global/hSecondsChi2NClIts"), secFromSOR, track.itsChi2NCl());
638662
histos.fill(HIST("C/global/hSecondsNumClsTpc"), secFromSOR, track.tpcNClsFound());
663+
histos.fill(HIST("C/global/hSeconds2DNumClsTpc"), secFromSOR, track.tpcNClsFound());
639664
histos.fill(HIST("C/global/hSecondsChi2NClTpc"), secFromSOR, track.tpcChi2NCl());
640665
if (track.tpcNClsFound() >= confCutOnNtpcClsForSharedFractAndDeDxCalc) {
641666
histos.fill(HIST("C/global/hSecondsTpcFractionSharedCls"), secFromSOR, track.tpcFractionSharedCls());
667+
histos.fill(HIST("C/global/hSeconds2DTpcFractionSharedCls"), secFromSOR, track.tpcFractionSharedCls());
642668
if (dedx < 1.e4) // protection from weird values
643669
histos.fill(HIST("C/global/hSecondsDeDx"), secFromSOR, dedx);
644670
}
@@ -652,11 +678,14 @@ struct TimeDependentQaTask {
652678
histos.fill(HIST("C/globalPV/hSecondsSumDcaZ"), secFromSOR, dcaZabs);
653679
histos.fill(HIST("C/globalPV/hSecondsSumPt"), secFromSOR, track.pt());
654680
histos.fill(HIST("C/globalPV/hSecondsNumClsIts"), secFromSOR, track.itsNCls());
681+
histos.fill(HIST("C/globalPV/hSeconds2DNumClsIts"), secFromSOR, track.itsNCls());
655682
histos.fill(HIST("C/globalPV/hSecondsChi2NClIts"), secFromSOR, track.itsChi2NCl());
656683
histos.fill(HIST("C/globalPV/hSecondsNumClsTpc"), secFromSOR, track.tpcNClsFound());
684+
histos.fill(HIST("C/globalPV/hSeconds2DNumClsTpc"), secFromSOR, track.tpcNClsFound());
657685
histos.fill(HIST("C/globalPV/hSecondsChi2NClTpc"), secFromSOR, track.tpcChi2NCl());
658686
if (track.tpcNClsFound() >= confCutOnNtpcClsForSharedFractAndDeDxCalc) {
659687
histos.fill(HIST("C/globalPV/hSecondsTpcFractionSharedCls"), secFromSOR, track.tpcFractionSharedCls());
688+
histos.fill(HIST("C/globalPV/hSeconds2DTpcFractionSharedCls"), secFromSOR, track.tpcFractionSharedCls());
660689
if (dedx < 1.e4) // protection from weird values
661690
histos.fill(HIST("C/globalPV/hSecondsDeDx"), secFromSOR, dedx);
662691
}

0 commit comments

Comments
 (0)