Skip to content

Commit 5a6c923

Browse files
authored
[PWGLF] Fix collisions table for pp (#11023)
1 parent 22a7a65 commit 5a6c923

File tree

1 file changed

+32
-38
lines changed

1 file changed

+32
-38
lines changed

PWGLF/Tasks/GlobalEventProperties/heavyionMultiplicity.cxx

Lines changed: 32 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -49,11 +49,13 @@ using namespace o2::aod::track;
4949
using namespace o2::aod::evsel;
5050

5151
using CollisionDataTable = soa::Join<aod::Collisions, aod::EvSels, aod::Mults, aod::CentFT0Cs, aod::CentFT0CVariant1s, aod::CentFT0Ms, aod::CentNGlobals, aod::CentMFTs>;
52+
using ColDataTablepp = soa::Join<aod::Collisions, aod::EvSels, aod::Mults, aod::CentFT0Ms>;
5253
using TrackDataTable = soa::Join<aod::Tracks, aod::TracksExtra, aod::TracksDCA, aod::TrackSelection>;
5354
using FilTrackDataTable = soa::Filtered<TrackDataTable>;
5455
using CollisionMCTrueTable = aod::McCollisions;
5556
using TrackMCTrueTable = aod::McParticles;
5657
using CollisionMCRecTable = soa::SmallGroups<soa::Join<aod::McCollisionLabels, aod::Collisions, aod::EvSels, aod::Mults, aod::CentFT0Cs, aod::CentFT0CVariant1s, aod::CentFT0Ms, aod::CentNGlobals, aod::CentMFTs>>;
58+
using ColMCRecTablepp = soa::SmallGroups<soa::Join<aod::McCollisionLabels, aod::Collisions, aod::EvSels, aod::Mults, aod::CentFT0Ms>>;
5759
using TrackMCRecTable = soa::Join<aod::Tracks, aod::TracksExtra, aod::TracksDCA, aod::McTrackLabels, aod::TrackSelection>;
5860
using FilTrackMCRecTable = soa::Filtered<TrackMCRecTable>;
5961
using V0TrackCandidates = soa::Join<aod::Tracks, aod::TracksExtra, aod::TracksDCA, aod::TrackSelection, aod::pidTPCFullPi, aod::pidTPCFullPr>;
@@ -113,8 +115,6 @@ AxisSpec axisMassLambda = {200, 1.07, 1.17, "Lambda/AntiLamda Mass", "Lambda/Ant
113115
AxisSpec axisTracks{9, 0.5, 9.5, "#tracks", "TrackAxis"};
114116
auto static constexpr kMinCharge = 3.f;
115117
auto static constexpr kMinpTcut = 0.1f;
116-
auto static constexpr kMinCent = 0.0f;
117-
auto static constexpr kMaxCent = 100.0f;
118118
auto static constexpr kEtaInelgt0 = 1.0f;
119119
auto static constexpr kNItslayers = 7;
120120

@@ -184,11 +184,10 @@ struct HeavyionMultiplicity {
184184
x->SetBinLabel(2, "sel8");
185185
x->SetBinLabel(3, "kNoSameBunchPileup"); // reject collisions in case of pileup with another collision in the same foundBC
186186
x->SetBinLabel(4, "kIsGoodZvtxFT0vsPV"); // small difference between z-vertex from PV and from FT0
187-
x->SetBinLabel(5, "Centrality");
188-
x->SetBinLabel(6, "ApplyExtraCorrCut");
189-
x->SetBinLabel(7, "ApplyNoCollInTimeRangeStandard");
190-
x->SetBinLabel(8, "ApplyNoCollInRofStandard");
191-
x->SetBinLabel(9, "ApplyNoHighMultCollInPrevRof");
187+
x->SetBinLabel(5, "ApplyExtraCorrCut");
188+
x->SetBinLabel(6, "ApplyNoCollInTimeRangeStandard");
189+
x->SetBinLabel(7, "ApplyNoCollInRofStandard");
190+
x->SetBinLabel(8, "ApplyNoHighMultCollInPrevRof");
192191

193192
if (doprocessData) {
194193
histos.add("CentPercentileHist", "CentPercentileHist", kTH1D, {axisCent}, false);
@@ -275,30 +274,25 @@ struct HeavyionMultiplicity {
275274
}
276275
histos.fill(HIST("EventHist"), 4);
277276

278-
if (selColCent(col) < kMinCent || selColCent(col) > kMaxCent) {
279-
return false;
280-
}
281-
histos.fill(HIST("EventHist"), 5);
282-
283277
if (isApplyExtraCorrCut && col.multNTracksPV() > npvTracksCut && col.multFT0C() < (10 * col.multNTracksPV() - ft0cCut)) {
284278
return false;
285279
}
286-
histos.fill(HIST("EventHist"), 6);
280+
histos.fill(HIST("EventHist"), 5);
287281

288282
if (isApplyNoCollInTimeRangeStandard && !col.selection_bit(o2::aod::evsel::kNoCollInTimeRangeStandard)) {
289283
return false;
290284
}
291-
histos.fill(HIST("EventHist"), 7);
285+
histos.fill(HIST("EventHist"), 6);
292286

293287
if (isApplyNoCollInRofStandard && !col.selection_bit(o2::aod::evsel::kNoCollInRofStandard)) {
294288
return false;
295289
}
296-
histos.fill(HIST("EventHist"), 8);
290+
histos.fill(HIST("EventHist"), 7);
297291

298292
if (isApplyNoHighMultCollInPrevRof && !col.selection_bit(o2::aod::evsel::kNoHighMultCollInPrevRof)) {
299293
return false;
300294
}
301-
histos.fill(HIST("EventHist"), 9);
295+
histos.fill(HIST("EventHist"), 8);
302296
return true;
303297
}
304298

@@ -649,7 +643,7 @@ struct HeavyionMultiplicity {
649643
}
650644
PROCESS_SWITCH(HeavyionMultiplicity, processStrangeYield, "Strange particle yield", false);
651645

652-
void processppData(CollisionDataTable::iterator const& cols, FilTrackDataTable const& tracks)
646+
void processppData(ColDataTablepp::iterator const& cols, FilTrackDataTable const& tracks)
653647
{
654648
if (!isEventSelected(cols)) {
655649
return;
@@ -667,28 +661,28 @@ struct HeavyionMultiplicity {
667661
} // track loop
668662

669663
if (nTrks > 0) {
670-
histos.fill(HIST("EventHist"), 10);
664+
histos.fill(HIST("EventHist"), 9);
671665
histos.fill(HIST("VtxZHist"), cols.posZ());
672-
histos.fill(HIST("MultPercentileHist"), selColCent(cols));
673-
histos.fill(HIST("hdatazvtxmultpp"), cols.posZ(), selColCent(cols));
666+
histos.fill(HIST("MultPercentileHist"), cols.centFT0M());
667+
histos.fill(HIST("hdatazvtxmultpp"), cols.posZ(), cols.centFT0M());
674668

675669
for (const auto& track : tracks) {
676670
if (!isTrackSelected(track)) {
677671
continue;
678672
}
679673
histos.fill(HIST("PhiVsEtaHistpp"), track.phi(), track.eta());
680-
histos.fill(HIST("hdatadndetapp"), cols.posZ(), selColCent(cols), track.eta(), track.phi(), kGlobalplusITS);
674+
histos.fill(HIST("hdatadndetapp"), cols.posZ(), cols.centFT0M(), track.eta(), track.phi(), kGlobalplusITS);
681675
if (track.hasTPC()) {
682-
histos.fill(HIST("hdatadndetapp"), cols.posZ(), selColCent(cols), track.eta(), track.phi(), kGlobalonly);
676+
histos.fill(HIST("hdatadndetapp"), cols.posZ(), cols.centFT0M(), track.eta(), track.phi(), kGlobalonly);
683677
} else {
684-
histos.fill(HIST("hdatadndetapp"), cols.posZ(), selColCent(cols), track.eta(), track.phi(), kITSonly);
678+
histos.fill(HIST("hdatadndetapp"), cols.posZ(), cols.centFT0M(), track.eta(), track.phi(), kITSonly);
685679
}
686680
} // track loop
687681
} // nTrks>0
688682
}
689683
PROCESS_SWITCH(HeavyionMultiplicity, processppData, "process pp data", false);
690684

691-
void processppMonteCarlo(CollisionMCTrueTable::iterator const&, CollisionMCRecTable const& RecCols, TrackMCTrueTable const& GenParticles, FilTrackMCRecTable const& RecTracks)
685+
void processppMonteCarlo(CollisionMCTrueTable::iterator const&, ColMCRecTablepp const& RecCols, TrackMCTrueTable const& GenParticles, FilTrackMCRecTable const& RecTracks)
692686
{
693687
for (const auto& RecCol : RecCols) {
694688
if (!isEventSelected(RecCol)) {
@@ -709,21 +703,21 @@ struct HeavyionMultiplicity {
709703
}
710704

711705
if (nTrks > 0) {
712-
histos.fill(HIST("EventHist"), 10);
706+
histos.fill(HIST("EventHist"), 9);
713707
histos.fill(HIST("VtxZHist"), RecCol.posZ());
714-
histos.fill(HIST("MultPercentileMCRecHist"), selColCent(RecCol));
715-
histos.fill(HIST("hmczvtxmultpp"), RecCol.posZ(), selColCent(RecCol));
708+
histos.fill(HIST("MultPercentileMCRecHist"), RecCol.centFT0M());
709+
histos.fill(HIST("hmczvtxmultpp"), RecCol.posZ(), RecCol.centFT0M());
716710

717711
for (const auto& Rectrack : recTracksPart) {
718712
if (!isTrackSelected(Rectrack)) {
719713
continue;
720714
}
721715
histos.fill(HIST("MCrecPhiVsEtaHistpp"), Rectrack.phi(), Rectrack.eta());
722-
histos.fill(HIST("hmcrecdndetapp"), RecCol.posZ(), selColCent(RecCol), Rectrack.eta(), Rectrack.phi(), static_cast<double>(kSpAll), kGlobalplusITS);
716+
histos.fill(HIST("hmcrecdndetapp"), RecCol.posZ(), RecCol.centFT0M(), Rectrack.eta(), Rectrack.phi(), static_cast<double>(kSpAll), kGlobalplusITS);
723717
if (Rectrack.hasTPC()) {
724-
histos.fill(HIST("hmcrecdndetapp"), RecCol.posZ(), selColCent(RecCol), Rectrack.eta(), Rectrack.phi(), static_cast<double>(kSpAll), kGlobalonly);
718+
histos.fill(HIST("hmcrecdndetapp"), RecCol.posZ(), RecCol.centFT0M(), Rectrack.eta(), Rectrack.phi(), static_cast<double>(kSpAll), kGlobalonly);
725719
} else {
726-
histos.fill(HIST("hmcrecdndetapp"), RecCol.posZ(), selColCent(RecCol), Rectrack.eta(), Rectrack.phi(), static_cast<double>(kSpAll), kITSonly);
720+
histos.fill(HIST("hmcrecdndetapp"), RecCol.posZ(), RecCol.centFT0M(), Rectrack.eta(), Rectrack.phi(), static_cast<double>(kSpAll), kITSonly);
727721
}
728722

729723
if (Rectrack.has_mcParticle()) {
@@ -757,9 +751,9 @@ struct HeavyionMultiplicity {
757751
pid = kBkg;
758752
}
759753
mclabels.push_back(Rectrack.mcParticleId());
760-
histos.fill(HIST("hmcrecdndetapp"), RecCol.posZ(), selColCent(RecCol), Rectrack.eta(), Rectrack.phi(), static_cast<double>(pid), kGlobalplusITS);
754+
histos.fill(HIST("hmcrecdndetapp"), RecCol.posZ(), RecCol.centFT0M(), Rectrack.eta(), Rectrack.phi(), static_cast<double>(pid), kGlobalplusITS);
761755
} else {
762-
histos.fill(HIST("hmcrecdndetapp"), RecCol.posZ(), selColCent(RecCol), Rectrack.eta(), Rectrack.phi(), static_cast<double>(kBkg), kGlobalplusITS);
756+
histos.fill(HIST("hmcrecdndetapp"), RecCol.posZ(), RecCol.centFT0M(), Rectrack.eta(), Rectrack.phi(), static_cast<double>(kBkg), kGlobalplusITS);
763757
}
764758
} // track (mcrec) loop
765759
} // nTrks>0
@@ -780,13 +774,13 @@ struct HeavyionMultiplicity {
780774
if (!isGenTrackSelected(particle)) {
781775
continue;
782776
}
783-
histos.fill(HIST("hmcgendndetapp"), RecCol.posZ(), selColCent(RecCol), particle.eta(), particle.phi(), static_cast<double>(kSpAll), kNoGenpTVar);
777+
histos.fill(HIST("hmcgendndetapp"), RecCol.posZ(), RecCol.centFT0M(), particle.eta(), particle.phi(), static_cast<double>(kSpAll), kNoGenpTVar);
784778
if (particle.pt() < kMinpTcut) {
785-
histos.fill(HIST("hmcgendndetapp"), RecCol.posZ(), selColCent(RecCol), particle.eta(), particle.phi(), static_cast<double>(kSpAll), kGenpTup, -10.0 * particle.pt() + 2);
786-
histos.fill(HIST("hmcgendndetapp"), RecCol.posZ(), selColCent(RecCol), particle.eta(), particle.phi(), static_cast<double>(kSpAll), kGenpTdown, 5.0 * particle.pt() + 0.5);
779+
histos.fill(HIST("hmcgendndetapp"), RecCol.posZ(), RecCol.centFT0M(), particle.eta(), particle.phi(), static_cast<double>(kSpAll), kGenpTup, -10.0 * particle.pt() + 2);
780+
histos.fill(HIST("hmcgendndetapp"), RecCol.posZ(), RecCol.centFT0M(), particle.eta(), particle.phi(), static_cast<double>(kSpAll), kGenpTdown, 5.0 * particle.pt() + 0.5);
787781
} else {
788-
histos.fill(HIST("hmcgendndetapp"), RecCol.posZ(), selColCent(RecCol), particle.eta(), particle.phi(), static_cast<double>(kSpAll), kGenpTup);
789-
histos.fill(HIST("hmcgendndetapp"), RecCol.posZ(), selColCent(RecCol), particle.eta(), particle.phi(), static_cast<double>(kSpAll), kGenpTdown);
782+
histos.fill(HIST("hmcgendndetapp"), RecCol.posZ(), RecCol.centFT0M(), particle.eta(), particle.phi(), static_cast<double>(kSpAll), kGenpTup);
783+
histos.fill(HIST("hmcgendndetapp"), RecCol.posZ(), RecCol.centFT0M(), particle.eta(), particle.phi(), static_cast<double>(kSpAll), kGenpTdown);
790784
}
791785

792786
int pid = 0;
@@ -804,7 +798,7 @@ struct HeavyionMultiplicity {
804798
pid = kSpOther;
805799
break;
806800
}
807-
histos.fill(HIST("hmcgendndetapp"), RecCol.posZ(), selColCent(RecCol), particle.eta(), particle.phi(), static_cast<double>(pid), kNoGenpTVar);
801+
histos.fill(HIST("hmcgendndetapp"), RecCol.posZ(), RecCol.centFT0M(), particle.eta(), particle.phi(), static_cast<double>(pid), kNoGenpTVar);
808802
} // track (mcgen) loop
809803
} // npart>0
810804
} // collision loop

0 commit comments

Comments
 (0)