diff --git a/PWGMM/Mult/Core/include/Histograms.h b/PWGMM/Mult/Core/include/Histograms.h index d7155280ca0..c47f2a8e315 100644 --- a/PWGMM/Mult/Core/include/Histograms.h +++ b/PWGMM/Mult/Core/include/Histograms.h @@ -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 diff --git a/PWGMM/Mult/Tasks/dndeta.cxx b/PWGMM/Mult/Tasks/dndeta.cxx index 22d631a1a6f..8c9618ccc5d 100644 --- a/PWGMM/Mult/Tasks/dndeta.cxx +++ b/PWGMM/Mult/Tasks/dndeta.cxx @@ -140,6 +140,7 @@ struct MultiplicityCounter { x->SetBinLabel(static_cast(EvSelBins::kRejected), EvSelBinLabels[static_cast(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}}}); @@ -171,6 +172,7 @@ struct MultiplicityCounter { x->SetBinLabel(static_cast(EvSelBins::kRejected), EvSelBinLabels[static_cast(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}}}); @@ -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}}}); @@ -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}}}); @@ -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) { @@ -531,6 +536,7 @@ struct MultiplicityCounter { } } inclusiveRegistry.fill(HIST(NtrkZvtx), Ntrks, z); + inclusiveRegistry.fill(HIST(NpvcZvtx), groupPVContrib.size(), z); } } else { if constexpr (hasRecoCent()) { @@ -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) { @@ -736,6 +743,7 @@ struct MultiplicityCounter { } } inclusiveRegistry.fill(HIST(NtrkZvtx), Ntrks, z); + inclusiveRegistry.fill(HIST(NpvcZvtx), groupPVContrib.size(), z); } } else { if constexpr (hasRecoCent()) { @@ -1525,7 +1533,7 @@ struct MultiplicityCounter { auto perCollisionSample = tracks.sliceBy(perCol, collision.globalIndex()); auto Nrec = countTracksAmbiguous(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()) { @@ -1545,8 +1553,10 @@ struct MultiplicityCounter { if constexpr (hasRecoCent()) { 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()); } } } @@ -1714,7 +1724,7 @@ struct MultiplicityCounter { auto perCollisionSample = tracks.sliceBy(perCol, collision.globalIndex()); auto Nrec = countTracks(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()) { @@ -1734,8 +1744,10 @@ struct MultiplicityCounter { if constexpr (hasRecoCent()) { 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()); } } }