Skip to content

Commit 2dfa3d8

Browse files
[PWGLF] strangeness analysis update (#8467)
Co-authored-by: ALICE Action Bot <alibuild@cern.ch>
1 parent a5312ca commit 2dfa3d8

File tree

3 files changed

+79
-49
lines changed

3 files changed

+79
-49
lines changed

PWGLF/TableProducer/Strangeness/cascqaanalysis.cxx

Lines changed: 21 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@
1616
/// \modified by Roman Nepeivoda (roman.nepeivoda@cern.ch)
1717
/// \since June 1, 2023
1818

19+
#include <algorithm>
20+
#include <vector>
21+
1922
#include "Framework/runDataProcessing.h"
2023
#include "Framework/AnalysisTask.h"
2124
#include "Common/DataModel/TrackSelectionTables.h"
@@ -57,6 +60,7 @@ struct cascqaanalysis {
5760
Configurable<bool> isTriggerTVX{"isTriggerTVX", 1, "TVX trigger"};
5861
Configurable<bool> isNoTimeFrameBorder{"isNoTimeFrameBorder", 1, "TF border cut"};
5962
Configurable<bool> isNoITSROFrameBorder{"isNoITSROFrameBorder", 1, "ITS ROF border cut"};
63+
Configurable<bool> isNoCollInTimeRangeNarrow{"isNoCollInTimeRangeNarrow", 1, "No collisions in +-2us window"};
6064

6165
// Cascade selection criteria
6266
Configurable<float> scalefactor{"scalefactor", 1.0, "Scaling factor"};
@@ -115,9 +119,9 @@ struct cascqaanalysis {
115119

116120
TString hCandidateCounterLabels[4] = {"All candidates", "passed topo cuts", "has associated MC particle", "associated with Xi(Omega)"};
117121
TString hNEventsMCLabels[6] = {"All", "z vrtx", "INEL", "INEL>0", "INEL>1", "Associated with rec. collision"};
118-
TString hNEventsLabels[12] = {"All", "kIsTriggerTVX", "kNoTimeFrameBorder", "kNoITSROFrameBorder", "kIsVertexITSTPC", "kNoSameBunchPileup", "kIsGoodZvtxFT0vsPV", "isVertexTOFmatched", "z vrtx", "INEL", "INEL>0", "INEL>1"};
122+
TString hNEventsLabels[13] = {"All", "kIsTriggerTVX", "kNoTimeFrameBorder", "kNoITSROFrameBorder", "kIsVertexITSTPC", "kNoSameBunchPileup", "kIsGoodZvtxFT0vsPV", "isVertexTOFmatched", "kNoCollInTimeRangeNarrow", "z vrtx", "INEL", "INEL>0", "INEL>1"};
119123

120-
registry.add("hNEvents", "hNEvents", {HistType::kTH1F, {{12, 0.f, 12.f}}});
124+
registry.add("hNEvents", "hNEvents", {HistType::kTH1F, {{13, 0.f, 13.f}}});
121125

122126
for (Int_t n = 1; n <= registry.get<TH1>(HIST("hNEvents"))->GetNbinsX(); n++) {
123127
registry.get<TH1>(HIST("hNEvents"))->GetXaxis()->SetBinLabel(n, hNEventsLabels[n - 1]);
@@ -174,7 +178,7 @@ struct cascqaanalysis {
174178
aod::cascdata::dcaV0daughters < dcav0dau &&
175179
aod::cascdata::dcacascdaughters < dcacascdau);
176180

177-
Partition<DauTracks> pvContribTracksIUEta1 = (nabs(aod::track::eta) < 1.0f) && ((aod::track::flags & (uint32_t)o2::aod::track::PVContributor) == (uint32_t)o2::aod::track::PVContributor);
181+
Partition<DauTracks> pvContribTracksIUEta1 = (nabs(aod::track::eta) < 1.0f) && ((aod::track::flags & static_cast<uint32_t>(o2::aod::track::PVContributor)) == static_cast<uint32_t>(o2::aod::track::PVContributor));
178182
Partition<DauTracks> globalTracksIUEta05 = (nabs(aod::track::eta) < 0.5f) && (requireGlobalTrackInFilter());
179183

180184
template <class TCascTracksTo, typename TCascade>
@@ -252,14 +256,14 @@ struct cascqaanalysis {
252256
{
253257
// 0 - INEL, 1 - INEL>0, 2 - INEL>1
254258
int evFlag = 0;
255-
registry.fill(HIST("hNEvents"), 9.5); // INEL
259+
registry.fill(HIST("hNEvents"), 10.5); // INEL
256260
if (collision.isInelGt0()) {
257261
evFlag += 1;
258-
registry.fill(HIST("hNEvents"), 10.5); // INEL>0
262+
registry.fill(HIST("hNEvents"), 11.5); // INEL>0
259263
}
260264
if (collision.isInelGt1()) {
261265
evFlag += 1;
262-
registry.fill(HIST("hNEvents"), 11.5); // INEL>1
266+
registry.fill(HIST("hNEvents"), 12.5); // INEL>1
263267
}
264268
return evFlag;
265269
}
@@ -326,13 +330,20 @@ struct cascqaanalysis {
326330
if (isFillEventSelectionQA) {
327331
registry.fill(HIST("hNEvents"), 7.5);
328332
}
333+
// kNoCollInTimeRangeNarrow selection
334+
if (isNoCollInTimeRangeNarrow && !collision.selection_bit(aod::evsel::kNoCollInTimeRangeNarrow)) {
335+
return false;
336+
}
337+
if (isFillEventSelectionQA) {
338+
registry.fill(HIST("hNEvents"), 8.5);
339+
}
329340

330341
// Z vertex selection
331342
if (TMath::Abs(collision.posZ()) > cutzvertex) {
332343
return false;
333344
}
334345
if (isFillEventSelectionQA) {
335-
registry.fill(HIST("hNEvents"), 8.5);
346+
registry.fill(HIST("hNEvents"), 9.5);
336347
registry.fill(HIST("hZCollision"), collision.posZ());
337348
}
338349

@@ -472,15 +483,15 @@ struct cascqaanalysis {
472483
uint16_t nchFV0 = GetGenNchInFV0Aregion(mcPartSlice);
473484

474485
int evType = 0;
475-
registry.fill(HIST("hNEvents"), 9.5); // INEL
486+
registry.fill(HIST("hNEvents"), 10.5); // INEL
476487
// Rec. collision associated with INEL>0 gen. one
477488
if (pwglf::isINELgtNmc(mcPartSlice, 0, pdgDB)) {
478-
registry.fill(HIST("hNEvents"), 10.5); // INEL
489+
registry.fill(HIST("hNEvents"), 11.5); // INEL
479490
evType++;
480491
}
481492
// Rec. collision associated with INEL>1 gen. one
482493
if (pwglf::isINELgtNmc(mcPartSlice, 1, pdgDB)) {
483-
registry.fill(HIST("hNEvents"), 11.5); // INEL
494+
registry.fill(HIST("hNEvents"), 12.5); // INEL
484495
evType++;
485496
}
486497

PWGLF/Tasks/Strangeness/cascpostprocessing.cxx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -216,8 +216,8 @@ struct cascpostprocessing {
216216
registry.add("hPtCascPlusTrueRec", "hPtCascPlusTrueRec", {HistType::kTH3F, {ptAxis, rapidityAxis, centFT0MAxis}});
217217
registry.add("hPtCascMinusTrueRec", "hPtCascMinusTrueRec", {HistType::kTH3F, {ptAxis, rapidityAxis, centFT0MAxis}});
218218

219-
registry.add("hCascMinusMassvsPtTrueRec", "hCascMinusMassvsPtTrueRec", {HistType::kTH2F, {ptAxis, massAxis}});
220-
registry.add("hCascPlusMassvsPtTrueRec", "hCascPlusMassvsPtTrueRec", {HistType::kTH2F, {ptAxis, massAxis}});
219+
registry.add("hCascMinusMassvsPtTrueRec", "hCascMinusMassvsPtTrueRec", {HistType::kTH3F, {ptAxis, massAxis, centFT0MAxis}});
220+
registry.add("hCascPlusMassvsPtTrueRec", "hCascPlusMassvsPtTrueRec", {HistType::kTH3F, {ptAxis, massAxis, centFT0MAxis}});
221221
registry.add("hCascMinusMassvsPtBG", "hCascMinusMassvsPtBG", {HistType::kTH2F, {ptAxis, massAxis}});
222222
registry.add("hCascPlusMassvsPtBG", "hCascPlusMassvsPtBG", {HistType::kTH2F, {ptAxis, massAxis}});
223223
if (isMC) {
@@ -489,7 +489,7 @@ struct cascpostprocessing {
489489
if (candidate.sign() < 0) {
490490
if (isCorrectlyRec) {
491491
registry.fill(HIST("hPtCascMinusTrueRec"), candidate.pt(), rapidity, candidate.centFT0M()); // 3rd axis is from MC calibration
492-
registry.fill(HIST("hCascMinusMassvsPtTrueRec"), candidate.pt(), invmass);
492+
registry.fill(HIST("hCascMinusMassvsPtTrueRec"), candidate.pt(), invmass, candidate.centFT0M());
493493
} else {
494494
registry.fill(HIST("hCascMinusMassvsPtBG"), candidate.pt(), invmass);
495495
}
@@ -500,7 +500,7 @@ struct cascpostprocessing {
500500
if (candidate.sign() > 0) {
501501
if (isCorrectlyRec) {
502502
registry.fill(HIST("hPtCascPlusTrueRec"), candidate.pt(), rapidity, candidate.centFT0M()); // 3rd axis is from MC calibration
503-
registry.fill(HIST("hCascPlusMassvsPtTrueRec"), candidate.pt(), invmass);
503+
registry.fill(HIST("hCascPlusMassvsPtTrueRec"), candidate.pt(), invmass, candidate.centFT0M());
504504
} else {
505505
registry.fill(HIST("hCascPlusMassvsPtBG"), candidate.pt(), invmass);
506506
}

0 commit comments

Comments
 (0)