From 0f267b9f4d04edcb024d76eb3f392e2d2236e1d9 Mon Sep 17 00:00:00 2001 From: ALICE Action Bot Date: Tue, 28 Oct 2025 20:52:20 +0100 Subject: [PATCH] Add deta-dphi* distributions in kT ranges --- .../Core/FemtoUniverseDetaDphiStar.h | 83 +++++++++++++++++++ ...irTaskTrackTrackSpherHarMultKtExtended.cxx | 7 +- 2 files changed, 88 insertions(+), 2 deletions(-) diff --git a/PWGCF/FemtoUniverse/Core/FemtoUniverseDetaDphiStar.h b/PWGCF/FemtoUniverse/Core/FemtoUniverseDetaDphiStar.h index 56af8090a79..57c7a22d4de 100644 --- a/PWGCF/FemtoUniverse/Core/FemtoUniverseDetaDphiStar.h +++ b/PWGCF/FemtoUniverse/Core/FemtoUniverseDetaDphiStar.h @@ -187,6 +187,27 @@ class FemtoUniverseDetaDphiStar } } + template + void init_kT(HistogramRegistry* registry, t1& ktbins) + { + mHistogramRegistry = registry; + ktBins = ktbins; + + if constexpr (kPartOneType == o2::aod::femtouniverseparticle::ParticleType::kTrack && kPartTwoType == o2::aod::femtouniverseparticle::ParticleType::kTrack) { + std::string dirName = static_cast(DirNames[0]); + for (int j = 0; j < static_cast(ktBins.size() - 1); j++) { + std::string histSuffixkT1 = std::to_string(static_cast(ktBins[j] * 100.0)); + std::string histSuffixkT2 = std::to_string(static_cast(ktBins[j + 1] * 100.0)); + std::string histFolderkT = "kT_" + histSuffixkT1 + "_" + histSuffixkT2 + "/"; + + histdetadphisamebeforekT[j] = mHistogramRegistry->add((dirName + histFolderkT + "detadphidetadphiBeforeSame").c_str(), "; #Delta #eta; #Delta #phi", kTH2F, {{100, -0.15, 0.15}, {100, -0.15, 0.15}}); + histdetadphimixedbeforekT[j] = mHistogramRegistry->add((dirName + histFolderkT + "detadphidetadphiBeforeMixed").c_str(), "; #Delta #eta; #Delta #phi", kTH2F, {{100, -0.15, 0.15}, {100, -0.15, 0.15}}); + histdetadphisameafterkT[j] = mHistogramRegistry->add((dirName + histFolderkT + "detadphidetadphiAfterSame").c_str(), "; #Delta #eta; #Delta #phi", kTH2F, {{100, -0.15, 0.15}, {100, -0.15, 0.15}}); + histdetadphimixedafterkT[j] = mHistogramRegistry->add((dirName + histFolderkT + "detadphidetadphiAfterMixed").c_str(), "; #Delta #eta; #Delta #phi", kTH2F, {{100, -0.15, 0.15}, {100, -0.15, 0.15}}); + } + } + } + /// Check if pair is close or not template bool isClosePair(Part const& part1, Part const& part2, Parts const& particles, float lmagfield, uint8_t ChosenEventType) @@ -620,6 +641,62 @@ class FemtoUniverseDetaDphiStar } } + /// Templated function to access different kT directory and call addEventPair + /// \param part1 particle 1 + /// \param part2 particle 2 + /// \param ChosenEventType Same or Mixed evet type + /// \param maxl Maximum valie of L component of the spherical harmonics + /// \param multval Multiplicity value + /// \param ktval kT value + template + void kTdetadphi(Part const& part1, Part const& part2, uint8_t ChosenEventType, float ktval) + { + int ktbinval = -1; + if (ktval >= ktBins[0] && ktval < ktBins[1]) { + ktbinval = 0; + } else if (ktval >= ktBins[1] && ktval < ktBins[2]) { + ktbinval = 1; + } else if (ktval >= ktBins[2] && ktval < ktBins[3]) { + ktbinval = 2; + } else if (ktval >= ktBins[3] && ktval < ktBins[4]) { + ktbinval = 3; + } else { + return; + } + isClosePairkT(part1, part2, ChosenEventType, ktbinval); + } + + /// Check if pair is close or not + template + void isClosePairkT(Part const& part1, Part const& part2, uint8_t ChosenEventType, int ktbinval) + { + /// Track-Track combination + // check if provided particles are in agreement with the class instantiation + if (part1.partType() != o2::aod::femtouniverseparticle::ParticleType::kTrack || part2.partType() != o2::aod::femtouniverseparticle::ParticleType::kTrack) { + LOG(fatal) << "FemtoUniverseDetaDphiStar: passed arguments don't agree with FemtoUniverseDetaDphiStar instantiation! Please provide kTrack,kTrack candidates."; + return; + } + auto deta = part1.eta() - part2.eta(); + auto dphiAvg = averagePhiStar(part1, part2, 0); + if (ChosenEventType == femto_universe_container::EventType::same) { + histdetadphisamebeforekT[ktbinval]->Fill(deta, dphiAvg); + } else if (ChosenEventType == femto_universe_container::EventType::mixed) { + histdetadphimixedbeforekT[ktbinval]->Fill(deta, dphiAvg); + } else { + LOG(fatal) << "FemtoUniverseDetaDphiStar: passed arguments don't agree with FemtoUniverseDetaDphiStar's type of events! Please provide same or mixed."; + } + + if (std::pow(dphiAvg, 2) / std::pow(cutDeltaPhiStarMax, 2) + std::pow(deta, 2) / std::pow(cutDeltaEtaMax, 2) > 1.) { + if (ChosenEventType == femto_universe_container::EventType::same) { + histdetadphisameafterkT[ktbinval]->Fill(deta, dphiAvg); + } else if (ChosenEventType == femto_universe_container::EventType::mixed) { + histdetadphimixedafterkT[ktbinval]->Fill(deta, dphiAvg); + } else { + LOG(fatal) << "FemtoUniverseDetaDphiStar: passed arguments don't agree with FemtoUniverseDetaDphiStar's type of events! Please provide same or mixed."; + } + } + } + /// Check if pair is close or not template void ClosePairqLCMS(Part const& part1, Part const& part2, float lmagfield, uint8_t ChosenEventType, double qlcms) // add typename Parts and variable parts for adding MClabels @@ -698,9 +775,15 @@ class FemtoUniverseDetaDphiStar float cutPhiInvMassLow; float cutPhiInvMassHigh; bool isSameSignCPR = false; + std::vector ktBins; std::array, 2>, 7> histdetadpisame{}; std::array, 2>, 7> histdetadpimixed{}; + std::array, 4> histdetadphisamebeforekT{}; + std::array, 4> histdetadphimixedbeforekT{}; + std::array, 4> histdetadphisameafterkT{}; + std::array, 4> histdetadphimixedafterkT{}; + std::array, 9>, 7> histdetadpiRadii{}; std::shared_ptr histdetadpiqlcmssame{}; diff --git a/PWGCF/FemtoUniverse/Tasks/femtoUniversePairTaskTrackTrackSpherHarMultKtExtended.cxx b/PWGCF/FemtoUniverse/Tasks/femtoUniversePairTaskTrackTrackSpherHarMultKtExtended.cxx index 0f44093e466..35b8c394693 100644 --- a/PWGCF/FemtoUniverse/Tasks/femtoUniversePairTaskTrackTrackSpherHarMultKtExtended.cxx +++ b/PWGCF/FemtoUniverse/Tasks/femtoUniversePairTaskTrackTrackSpherHarMultKtExtended.cxx @@ -454,6 +454,7 @@ struct femtoUniversePairTaskTrackTrackSpherHarMultKtExtended { pairCleaner.init(&qaRegistry); if (twotracksconfigs.ConfIsCPR.value) { pairCloseRejection.init(&resultRegistry, &qaRegistry, twotracksconfigs.ConfCPRdeltaPhiCutMin.value, twotracksconfigs.ConfCPRdeltaPhiCutMax.value, twotracksconfigs.ConfCPRdeltaEtaCutMin.value, twotracksconfigs.ConfCPRdeltaEtaCutMax.value, twotracksconfigs.ConfCPRChosenRadii.value, twotracksconfigs.ConfCPRPlotPerRadii.value); + pairCloseRejection.init_kT(&resultRegistry, ConfKtKstarBins); } vPIDPartOne = trackonefilter.ConfPIDPartOne.value; @@ -549,7 +550,9 @@ struct femtoUniversePairTaskTrackTrackSpherHarMultKtExtended { continue; } + float kT = FemtoUniverseMath::getkT(p1, mass1, p2, mass2); if (twotracksconfigs.ConfIsCPR.value) { + pairCloseRejection.kTdetadphi(p1, p2, femto_universe_container::EventType::same, kT); if (confCPRIsAtITS.value) { if (pairCloseRejection.isClosePairAtITS(p1, p2, magFieldTesla, femto_universe_container::EventType::same)) { continue; @@ -566,7 +569,6 @@ struct femtoUniversePairTaskTrackTrackSpherHarMultKtExtended { continue; } - float kT = FemtoUniverseMath::getkT(p1, mass1, p2, mass2); double rand; rand = randgen->Rndm(); @@ -919,7 +921,9 @@ struct femtoUniversePairTaskTrackTrackSpherHarMultKtExtended { continue; } + float kT = FemtoUniverseMath::getkT(p1, mass1, p2, mass2); if (twotracksconfigs.ConfIsCPR.value) { + pairCloseRejection.kTdetadphi(p1, p2, femto_universe_container::EventType::mixed, kT); if (confCPRIsAtITS.value) { if (pairCloseRejection.isClosePairAtITS(p1, p2, magFieldTesla, femto_universe_container::EventType::mixed)) { continue; @@ -931,7 +935,6 @@ struct femtoUniversePairTaskTrackTrackSpherHarMultKtExtended { } } - float kT = FemtoUniverseMath::getkT(p1, mass1, p2, mass2); double rand; rand = randgen->Rndm();