Skip to content

Commit

Permalink
PWGMM: dndeta: use PV contributors as multiplicity estimator (AliceO2…
Browse files Browse the repository at this point in the history
  • Loading branch information
aalkin authored May 22, 2024
1 parent 1ce5a5a commit bdf600d
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 2 deletions.
3 changes: 3 additions & 0 deletions PWGMM/Mult/Core/include/Histograms.h
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,9 @@ static constexpr std::string_view SplitMult = "Events/SplitMult";
static constexpr std::string_view EventChi2 = "Events/Control/Chi2"; // collisions chi2 distribution
static constexpr std::string_view EventTimeRes = "Events/Control/TimeResolution"; // collisions time resolution distribution

static constexpr std::string_view NpvcZvtx = "Events/NpvcZvtx"; // N PV contributors vs vtx Z for selected collisions
static constexpr std::string_view NpvcZvxtGen = "Events/NpvcZvtxGen"; // -- simulated collisions

static constexpr std::string_view MCVertex = "MCEvents/Vertex"; // MC vertex position
static constexpr std::string_view RecoVertex = "Events/Vertex"; // Reco vertex position
static constexpr std::string_view MCCorrelates = "MCEvents/Properties/Correlates"; // Correlation of generated multiplicity and other event properties
Expand Down
16 changes: 14 additions & 2 deletions PWGMM/Mult/Tasks/dndeta.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,7 @@ struct MultiplicityCounter {
x->SetBinLabel(static_cast<int>(EvSelBins::kRejected), EvSelBinLabels[static_cast<int>(EvSelBins::kRejected)].data());

inclusiveRegistry.add({NtrkZvtx.data(), "; N_{trk}; Z_{vtx} (cm); events", {HistType::kTH2F, {MultAxis, ZAxis}}});
inclusiveRegistry.add({NpvcZvtx.data(), "; N_{PVc}; Z_{vtx} (cm); events", {HistType::kTH2F, {MultAxis, ZAxis}}});
inclusiveRegistry.add({EtaZvtx.data(), "; #eta; Z_{vtx} (cm); tracks", {HistType::kTH2F, {EtaAxis, ZAxis}}});
inclusiveRegistry.add({EtaZvtx_gt0.data(), "; #eta; Z_{vtx} (cm); tracks", {HistType::kTH2F, {EtaAxis, ZAxis}}});
inclusiveRegistry.add({EtaZvtx_PVgt0.data(), "; #eta; Z_{vtx} (cm); tracks", {HistType::kTH2F, {EtaAxis, ZAxis}}});
Expand Down Expand Up @@ -171,6 +172,7 @@ struct MultiplicityCounter {
x->SetBinLabel(static_cast<int>(EvSelBins::kRejected), EvSelBinLabels[static_cast<int>(EvSelBins::kRejected)].data());

binnedRegistry.add({NtrkZvtx.data(), "; N_{trk}; Z_{vtx} (cm); centrality", {HistType::kTHnSparseF, {MultAxis, ZAxis, CentAxis}}});
binnedRegistry.add({NpvcZvtx.data(), "; N_{PVc}; Z_{vtx} (cm); centrality", {HistType::kTHnSparseF, {MultAxis, ZAxis, CentAxis}}});
binnedRegistry.add({EtaZvtx.data(), "; #eta; Z_{vtx} (cm); centrality", {HistType::kTHnSparseF, {EtaAxis, ZAxis, CentAxis}}});
binnedRegistry.add({EtaZvtx_gt0.data(), "; #eta; Z_{vtx} (cm); centrality", {HistType::kTHnSparseF, {EtaAxis, ZAxis, CentAxis}}});
binnedRegistry.add({EtaZvtx_PVgt0.data(), "; #eta; Z_{vtx} (cm); centrality", {HistType::kTHnSparseF, {EtaAxis, ZAxis, CentAxis}}});
Expand Down Expand Up @@ -200,6 +202,7 @@ struct MultiplicityCounter {
}
inclusiveRegistry.add({NtrkZvtxGen.data(), "; N_{trk}; Z_{vtx} (cm); events", {HistType::kTH2F, {MultAxis, ZAxis}}});
inclusiveRegistry.add({NtrkZvtxGen_t.data(), effLabels.c_str(), {HistType::kTHnSparseF, effAxes}});
inclusiveRegistry.add({NpvcZvxtGen.data(), "; N_{PVc}; Z_{vtx} (cm); events", {HistType::kTH2F, {MultAxis, ZAxis}}});
inclusiveRegistry.add({EtaZvtxGen.data(), "; #eta; Z_{vtx} (cm); tracks", {HistType::kTH2F, {EtaAxis, ZAxis}}});
inclusiveRegistry.add({EtaZvtxGen_t.data(), "; #eta; Z_{vtx} (cm); tracks", {HistType::kTH2F, {EtaAxis, ZAxis}}});
inclusiveRegistry.add({EtaZvtxGen_gt0.data(), "; #eta; Z_{vtx} (cm); tracks", {HistType::kTH2F, {EtaAxis, ZAxis}}});
Expand Down Expand Up @@ -247,6 +250,7 @@ struct MultiplicityCounter {
}
binnedRegistry.add({NtrkZvtxGen.data(), "; N_{trk}; Z_{vtx} (cm); centrality", {HistType::kTHnSparseF, {MultAxis, ZAxis, CentAxis}}});
binnedRegistry.add({NtrkZvtxGen_t.data(), "; N_{part}; Z_{vtx} (cm); centrality", {HistType::kTHnSparseF, {MultAxis, ZAxis, CentAxis}}});
binnedRegistry.add({NpvcZvxtGen.data(), "; N_{PVc}; Z_{vtx} (cm); centrality", {HistType::kTHnSparseF, {MultAxis, ZAxis, CentAxis}}});
binnedRegistry.add({EtaZvtxGen.data(), "; #eta; Z_{vtx} (cm); centrality", {HistType::kTHnSparseF, {EtaAxis, ZAxis, CentAxis}}});
binnedRegistry.add({EtaZvtxGen_t.data(), "; #eta; Z_{vtx} (cm); centrality", {HistType::kTHnSparseF, {EtaAxis, ZAxis, CentAxis}}});
binnedRegistry.add({EtaZvtxGen_gt0.data(), "; #eta; Z_{vtx} (cm); centrality", {HistType::kTHnSparseF, {EtaAxis, ZAxis, CentAxis}}});
Expand Down Expand Up @@ -513,6 +517,7 @@ struct MultiplicityCounter {
}
}
binnedRegistry.fill(HIST(NtrkZvtx), Ntrks, z, c);
binnedRegistry.fill(HIST(NpvcZvtx), groupPVContrib.size(), z, c);
} else {
if (Ntrks > 0 || INELgt0PV) {
if (INELgt0PV) {
Expand All @@ -531,6 +536,7 @@ struct MultiplicityCounter {
}
}
inclusiveRegistry.fill(HIST(NtrkZvtx), Ntrks, z);
inclusiveRegistry.fill(HIST(NpvcZvtx), groupPVContrib.size(), z);
}
} else {
if constexpr (hasRecoCent<C>()) {
Expand Down Expand Up @@ -704,6 +710,7 @@ struct MultiplicityCounter {
}
}
binnedRegistry.fill(HIST(NtrkZvtx), Ntrks, z, c);
binnedRegistry.fill(HIST(NpvcZvtx), groupPVContrib.size(), z, c);
} else {
if (Ntrks > 0 || INELgt0PV) {
if (INELgt0PV) {
Expand Down Expand Up @@ -736,6 +743,7 @@ struct MultiplicityCounter {
}
}
inclusiveRegistry.fill(HIST(NtrkZvtx), Ntrks, z);
inclusiveRegistry.fill(HIST(NpvcZvtx), groupPVContrib.size(), z);
}
} else {
if constexpr (hasRecoCent<C>()) {
Expand Down Expand Up @@ -1525,7 +1533,7 @@ struct MultiplicityCounter {
auto perCollisionSample = tracks.sliceBy(perCol, collision.globalIndex());
auto Nrec = countTracksAmbiguous<C, false>(perCollisionSample, perCollisionASample, z, c_rec);
NrecPerCol.emplace_back(Nrec);
NPVPerCol.emplace_back(collision.numContrib());
NPVPerCol.emplace_back(groupPVcontrib.size());
fillFIT(collision, NFT0APerCol, NFT0CPerCol, NFDDAPerCol, NFDDCPerCol);

if constexpr (hasRecoCent<C>()) {
Expand All @@ -1545,8 +1553,10 @@ struct MultiplicityCounter {

if constexpr (hasRecoCent<C>()) {
binnedRegistry.fill(HIST(NtrkZvtxGen), Nrec, collision.posZ(), c_rec);
binnedRegistry.fill(HIST(NpvcZvxtGen), groupPVcontrib.size(), collision.posZ(), c_rec);
} else {
inclusiveRegistry.fill(HIST(NtrkZvtxGen), Nrec, collision.posZ());
inclusiveRegistry.fill(HIST(NpvcZvxtGen), groupPVcontrib.size(), collision.posZ());
}
}
}
Expand Down Expand Up @@ -1714,7 +1724,7 @@ struct MultiplicityCounter {
auto perCollisionSample = tracks.sliceBy(perCol, collision.globalIndex());
auto Nrec = countTracks<C, false>(perCollisionSample, z, c_rec);
NrecPerCol.emplace_back(Nrec);
NPVPerCol.emplace_back(collision.numContrib());
NPVPerCol.emplace_back(groupPVcontrib.size());
fillFIT(collision, NFT0APerCol, NFT0CPerCol, NFDDAPerCol, NFDDCPerCol);

if constexpr (hasRecoCent<C>()) {
Expand All @@ -1734,8 +1744,10 @@ struct MultiplicityCounter {

if constexpr (hasRecoCent<C>()) {
binnedRegistry.fill(HIST(NtrkZvtxGen), Nrec, collision.posZ(), c_rec);
binnedRegistry.fill(HIST(NpvcZvxtGen), groupPVcontrib.size(), collision.posZ(), c_rec);
} else {
inclusiveRegistry.fill(HIST(NtrkZvtxGen), Nrec, collision.posZ());
inclusiveRegistry.fill(HIST(NpvcZvxtGen), groupPVcontrib.size(), collision.posZ());
}
}
}
Expand Down

0 comments on commit bdf600d

Please sign in to comment.