Skip to content

Commit 18d2551

Browse files
committed
fix certain histogram axes being misaligned and filled incorrectly
1 parent 7456567 commit 18d2551

File tree

1 file changed

+21
-17
lines changed

1 file changed

+21
-17
lines changed

PWGCF/GenericFramework/Tasks/flowGenericFramework.cxx

Lines changed: 21 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -311,17 +311,7 @@ struct FlowGenericFramework {
311311
int histBin;
312312
int flag; // just store the enum
313313
};
314-
std::vector<EventCut> eventcutflags = {
315-
{cfgEventCutFlags.cfgNoSameBunchPileupCut, kNoSameBunchPileup, o2::aod::evsel::kNoSameBunchPileup},
316-
{cfgEventCutFlags.cfgIsGoodZvtxFT0vsPV, kIsGoodZvtxFT0vsPV, o2::aod::evsel::kIsGoodZvtxFT0vsPV},
317-
{cfgEventCutFlags.cfgNoCollInTimeRangeStandard, kNoCollInTimeRangeStandard, o2::aod::evsel::kNoCollInTimeRangeStandard},
318-
{cfgEventCutFlags.cfgNoCollInRofStandard, kNoCollInRofStandard, o2::aod::evsel::kNoCollInRofStandard},
319-
{cfgEventCutFlags.cfgNoHighMultCollInPrevRof, kNoHighMultCollInPrevRof, o2::aod::evsel::kNoHighMultCollInPrevRof},
320-
{cfgEventCutFlags.cfgNoTimeFrameBorder, kNoTimeFrameBorder, o2::aod::evsel::kIsVertexITSTPC},
321-
{cfgEventCutFlags.cfgNoITSROFrameBorder, kNoITSROFrameBorder, o2::aod::evsel::kIsGoodITSLayersAll},
322-
{cfgEventCutFlags.cfgIsVertexITSTPC, kIsVertexITSTPC, o2::aod::evsel::kNoTimeFrameBorder},
323-
{cfgEventCutFlags.cfgIsGoodITSLayersAll, kIsGoodITSLayersAll, o2::aod::evsel::kNoITSROFrameBorder},
324-
};
314+
std::vector<EventCut> eventcutflags;
325315
enum Particles {
326316
PIONS,
327317
KAONS,
@@ -483,6 +473,20 @@ struct FlowGenericFramework {
483473
LOGF(info, "pt-pt subevent: {%.1f,%.1f}", etamin, etamax);
484474
}
485475

476+
// Setup event cuts
477+
eventcutflags.push_back({cfgEventCutFlags.cfgNoSameBunchPileupCut, kNoSameBunchPileup, o2::aod::evsel::kNoSameBunchPileup});
478+
eventcutflags.push_back({cfgEventCutFlags.cfgIsGoodZvtxFT0vsPV, kIsGoodZvtxFT0vsPV, o2::aod::evsel::kIsGoodZvtxFT0vsPV});
479+
eventcutflags.push_back({cfgEventCutFlags.cfgNoCollInTimeRangeStandard, kNoCollInTimeRangeStandard, o2::aod::evsel::kNoCollInTimeRangeStandard});
480+
eventcutflags.push_back({cfgEventCutFlags.cfgNoCollInRofStandard, kNoCollInRofStandard, o2::aod::evsel::kNoCollInRofStandard});
481+
eventcutflags.push_back({cfgEventCutFlags.cfgNoHighMultCollInPrevRof, kNoHighMultCollInPrevRof, o2::aod::evsel::kNoHighMultCollInPrevRof});
482+
eventcutflags.push_back({cfgEventCutFlags.cfgNoTimeFrameBorder, kNoTimeFrameBorder, o2::aod::evsel::kIsVertexITSTPC});
483+
eventcutflags.push_back({cfgEventCutFlags.cfgNoITSROFrameBorder, kNoITSROFrameBorder, o2::aod::evsel::kIsGoodITSLayersAll});
484+
eventcutflags.push_back({cfgEventCutFlags.cfgIsVertexITSTPC, kIsVertexITSTPC, o2::aod::evsel::kNoTimeFrameBorder});
485+
eventcutflags.push_back({cfgEventCutFlags.cfgIsGoodITSLayersAll, kIsGoodITSLayersAll, o2::aod::evsel::kNoITSROFrameBorder});
486+
for (const auto& cut : eventcutflags) {
487+
LOGF(info, "Flag %d is %senabled", cut.histBin, (cut.enabled) ? "" : "not ");
488+
}
489+
486490
AxisSpec phiAxis = {o2::analysis::gfw::phibins, o2::analysis::gfw::philow, o2::analysis::gfw::phiup, "#phi"};
487491
AxisSpec phiModAxis = {100, 0, constants::math::PI / 9, "fmod(#varphi,#pi/9)"};
488492
AxisSpec etaAxis = {o2::analysis::gfw::etabins, -cfgEta, cfgEta, "#eta"};
@@ -1771,13 +1775,13 @@ struct FlowGenericFramework {
17711775
registry.fill(HIST("K0/PiMinusTPC_K0"), negtrack.pt(), negtrack.tpcNSigmaKa());
17721776
registry.fill(HIST("K0/PiMinusTOF_K0"), negtrack.pt(), negtrack.tofNSigmaKa());
17731777

1774-
registry.fill(HIST("K0/hK0s"), 1);
1778+
registry.fill(HIST("K0/hK0s"), 0.5, 1);
17751779
if (cfgUsePIDEfficiencies) {
17761780
double weffDaughter1 = getEfficiency(postrack, 1);
17771781
double weffDaughter2 = getEfficiency(negtrack, 1);
17781782
weff = weffDaughter1 * weffDaughter2;
17791783
if (weff > 0)
1780-
registry.fill(HIST("K0/hK0s_corrected"), weff);
1784+
registry.fill(HIST("K0/hK0s_corrected"), 0.5, weff);
17811785
}
17821786

17831787
return true;
@@ -1859,13 +1863,13 @@ struct FlowGenericFramework {
18591863
registry.fill(HIST("Lambda/PiMinusTPC_L"), negtrack.pt(), negtrack.tpcNSigmaKa());
18601864
registry.fill(HIST("Lambda/PiMinusTOF_L"), negtrack.pt(), negtrack.tofNSigmaKa());
18611865

1862-
registry.fill(HIST("Lambda/hLambdas"), 1);
1866+
registry.fill(HIST("Lambda/hLambdas"), 0.5, 1);
18631867
if (cfgUsePIDEfficiencies) {
18641868
double weffDaughter1 = getEfficiency(postrack, 3);
18651869
double weffDaughter2 = getEfficiency(negtrack, 1);
18661870
weff = weffDaughter1 * weffDaughter2;
18671871
if (weff > 0)
1868-
registry.fill(HIST("Lambda/hLambdas_corrected"), weff);
1872+
registry.fill(HIST("Lambda/hLambdas_corrected"), 0.5, weff);
18691873
}
18701874
}
18711875
if (isAL) {
@@ -1877,13 +1881,13 @@ struct FlowGenericFramework {
18771881
registry.fill(HIST("Lambda/PrMinusTPC_AL"), negtrack.pt(), negtrack.tpcNSigmaKa());
18781882
registry.fill(HIST("Lambda/PrMinusTOF_AL"), negtrack.pt(), negtrack.tofNSigmaKa());
18791883

1880-
registry.fill(HIST("Lambda/hLambdas"), 1);
1884+
registry.fill(HIST("Lambda/hLambdas"), 0.5, 1);
18811885
if (cfgUsePIDEfficiencies) {
18821886
double weffDaughter1 = getEfficiency(postrack, 1);
18831887
double weffDaughter2 = getEfficiency(negtrack, 3);
18841888
weff = weffDaughter1 * weffDaughter2;
18851889
if (weff > 0)
1886-
registry.fill(HIST("Lambda/hLambdas_corrected"), weff);
1890+
registry.fill(HIST("Lambda/hLambdas_corrected"), 0.5, weff);
18871891
}
18881892
}
18891893
return true;

0 commit comments

Comments
 (0)