Skip to content

Commit 4a10f4e

Browse files
committed
Add 3d histograms vs momentum and eta
1 parent 8fb6e00 commit 4a10f4e

File tree

1 file changed

+26
-12
lines changed

1 file changed

+26
-12
lines changed

DPG/Tasks/AOTTrack/PID/TOF/qaPIDTOF.cxx

Lines changed: 26 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -15,16 +15,17 @@
1515
/// \brief Implementation for QA tasks of the TOF PID quantities
1616
///
1717

18-
#include "Framework/AnalysisTask.h"
19-
#include "Framework/runDataProcessing.h"
20-
#include "Framework/HistogramRegistry.h"
21-
#include "Framework/StaticFor.h"
22-
#include "Common/DataModel/TrackSelectionTables.h"
2318
#include "Common/DataModel/EventSelection.h"
24-
#include "Common/DataModel/PIDResponse.h"
2519
#include "Common/DataModel/FT0Corrected.h"
20+
#include "Common/DataModel/PIDResponse.h"
21+
#include "Common/DataModel/TrackSelectionTables.h"
2622
#include "Common/TableProducer/PID/pidTOFBase.h"
2723

24+
#include "Framework/AnalysisTask.h"
25+
#include "Framework/HistogramRegistry.h"
26+
#include "Framework/StaticFor.h"
27+
#include "Framework/runDataProcessing.h"
28+
2829
using namespace o2;
2930
using namespace o2::framework;
3031
using namespace o2::framework::expressions;
@@ -135,7 +136,7 @@ struct tofPidQa {
135136
Configurable<float> ptDeltaTEtaPhiMapMin{"ptDeltaTEtaPhiMapMin", 1.45f, "Threshold in pT to build the map of the delta time as a function of eta and phi"};
136137
Configurable<float> ptDeltaTEtaPhiMapMax{"ptDeltaTEtaPhiMapMax", 1.55f, "Threshold in pT to build the map of the delta time as a function of eta and phi"};
137138
Configurable<bool> splitSignalPerCharge{"splitSignalPerCharge", true, "Split the signal per charge (reduces memory footprint if off)"};
138-
Configurable<bool> enableVsMomentumHistograms{"enableVsMomentumHistograms", false, "Enables plots vs momentum instead of just pT (reduces memory footprint if off)"};
139+
Configurable<int> enableVsMomentumHistograms{"enableVsMomentumHistograms", 0, "1: Enables plots vs momentum instead of just pT 2: Enables plots vs momentum vs eta instead of just pT (reduces memory footprint if off)"};
139140
Configurable<bool> requireGoodMatchTracks{"requireGoodMatchTracks", false, "Require good match tracks"};
140141
Configurable<float> pvContributorsMin{"pvContributorsMin", -10, "Minimum pvContributors"};
141142
Configurable<float> pvContributorsMax{"pvContributorsMax", 10000, "Maximum pvContributors"};
@@ -238,11 +239,16 @@ struct tofPidQa {
238239
return;
239240
}
240241

241-
if (enableVsMomentumHistograms) {
242+
if (enableVsMomentumHistograms == 1) {
242243
histos.add(hdelta_evtime_fill[id].data(), axisTitle, kTH2F, {pAxis, deltaAxis});
243244
histos.add(hdelta_evtime_tof[id].data(), axisTitle, kTH2F, {pAxis, deltaAxis});
244245
histos.add(hdelta_evtime_ft0[id].data(), axisTitle, kTH2F, {pAxis, deltaAxis});
245246
histos.add(hdelta_evtime_tofft0[id].data(), axisTitle, kTH2F, {pAxis, deltaAxis});
247+
} else if (enableVsMomentumHistograms == 2) {
248+
histos.add(hdelta_evtime_fill[id].data(), axisTitle, kTH3F, {pAxis, etaAxis, deltaAxis});
249+
histos.add(hdelta_evtime_tof[id].data(), axisTitle, kTH3F, {pAxis, etaAxis, deltaAxis});
250+
histos.add(hdelta_evtime_ft0[id].data(), axisTitle, kTH3F, {pAxis, etaAxis, deltaAxis});
251+
histos.add(hdelta_evtime_tofft0[id].data(), axisTitle, kTH3F, {pAxis, etaAxis, deltaAxis});
246252
}
247253

248254
if (splitSignalPerCharge) {
@@ -598,35 +604,43 @@ struct tofPidQa {
598604
// Filling info split per ev. time
599605
if (enableEvTimeSplitting) {
600606
if (t.isEvTimeTOF() && t.isEvTimeT0AC()) { // TOF + FT0 Ev. Time
601-
if (enableVsMomentumHistograms) {
607+
if (enableVsMomentumHistograms == 1) {
602608
histos.fill(HIST(hdelta_evtime_tofft0[id]), t.p(), diff);
609+
} else if (enableVsMomentumHistograms == 2) {
610+
histos.fill(HIST(hdelta_evtime_tofft0[id]), t.p(), t.eta(), diff);
603611
}
604612
if (splitSignalPerCharge) {
605613
histos.fill(HIST(hdelta_pt_evtime_tofft0[id]), t.pt(), diff, t.sign());
606614
} else {
607615
histos.fill(HIST(hdelta_pt_evtime_tofft0[id]), t.pt(), diff);
608616
}
609617
} else if (t.isEvTimeT0AC()) { // FT0 Ev. Time
610-
if (enableVsMomentumHistograms) {
618+
if (enableVsMomentumHistograms == 1) {
611619
histos.fill(HIST(hdelta_evtime_ft0[id]), t.p(), diff);
620+
} else if (enableVsMomentumHistograms == 2) {
621+
histos.fill(HIST(hdelta_evtime_ft0[id]), t.p(), t.eta(), diff);
612622
}
613623
if (splitSignalPerCharge) {
614624
histos.fill(HIST(hdelta_pt_evtime_ft0[id]), t.pt(), diff, t.sign());
615625
} else {
616626
histos.fill(HIST(hdelta_pt_evtime_ft0[id]), t.pt(), diff);
617627
}
618628
} else if (t.isEvTimeTOF()) { // TOF Ev. Time
619-
if (enableVsMomentumHistograms) {
629+
if (enableVsMomentumHistograms == 1) {
620630
histos.fill(HIST(hdelta_evtime_tof[id]), t.p(), diff);
631+
} else if (enableVsMomentumHistograms == 2) {
632+
histos.fill(HIST(hdelta_evtime_tof[id]), t.p(), t.eta(), diff);
621633
}
622634
if (splitSignalPerCharge) {
623635
histos.fill(HIST(hdelta_pt_evtime_tof[id]), t.pt(), diff, t.sign());
624636
} else {
625637
histos.fill(HIST(hdelta_pt_evtime_tof[id]), t.pt(), diff);
626638
}
627639
} else { // No Ev. Time -> Fill Ev. Time
628-
if (enableVsMomentumHistograms) {
640+
if (enableVsMomentumHistograms == 1) {
629641
histos.fill(HIST(hdelta_evtime_fill[id]), t.p(), diff);
642+
} else if (enableVsMomentumHistograms == 2) {
643+
histos.fill(HIST(hdelta_evtime_fill[id]), t.p(), t.eta(), diff);
630644
}
631645
if (splitSignalPerCharge) {
632646
histos.fill(HIST(hdelta_pt_evtime_fill[id]), t.pt(), diff, t.sign());

0 commit comments

Comments
 (0)