diff --git a/PWGCF/FemtoUniverse/Core/FemtoUniverseDetaDphiStar.h b/PWGCF/FemtoUniverse/Core/FemtoUniverseDetaDphiStar.h index 92ee2401b6a..e7b1e9a0c09 100644 --- a/PWGCF/FemtoUniverse/Core/FemtoUniverseDetaDphiStar.h +++ b/PWGCF/FemtoUniverse/Core/FemtoUniverseDetaDphiStar.h @@ -780,6 +780,31 @@ class FemtoUniverseDetaDphiStar } } + template + bool isGammaPair(PartType track1, PartType track2, double maxEEMinv, double maxDTheta) + { + double me = o2::constants::physics::MassElectron; + + double magTrack1 = track1.px() * track1.px() + track1.py() * track1.py() + track1.pz() * track1.pz(); + double magTrack2 = track2.px() * track2.px() + track2.py() * track2.py() + track2.pz() * track2.pz(); + double dotTr1Tr2 = track1.px() * track2.px() + track1.py() * track2.py() + track1.pz() * track2.pz(); + + if ((track1.sign() * track2.sign()) < 0.0) { + double theta1 = track1.theta(); + double theta2 = track2.theta(); + double dtheta = TMath::Abs(theta1 - theta2); + + double e1 = TMath::Sqrt(me * me + magTrack1); + double e2 = TMath::Sqrt(me * me + magTrack2); + + double minv = 2 * me * me + 2 * (e1 * e2 - dotTr1Tr2); + if ((TMath::Abs(minv) < maxEEMinv) && (dtheta < maxDTheta)) { + return true; + } + } + return false; + } + /// 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 diff --git a/PWGCF/FemtoUniverse/Tasks/femtoUniversePairTaskTrackTrackMultKtExtended.cxx b/PWGCF/FemtoUniverse/Tasks/femtoUniversePairTaskTrackTrackMultKtExtended.cxx index cf31b851958..1fadaf92605 100644 --- a/PWGCF/FemtoUniverse/Tasks/femtoUniversePairTaskTrackTrackMultKtExtended.cxx +++ b/PWGCF/FemtoUniverse/Tasks/femtoUniversePairTaskTrackTrackMultKtExtended.cxx @@ -189,6 +189,10 @@ struct FemtoUniversePairTaskTrackTrackMultKtExtended { Configurable cfgProcessKtBins{"cfgProcessKtBins", false, "Process kstar histograms in kT bins (if 'cfgProcessMultBins' is false, it will not be processed regardless of 'cfgProcessKtBins' state)"}; Configurable cfgProcessKtMt3DCF{"cfgProcessKtMt3DCF", false, "Process 3D histograms in kT and MultBins"}; + Configurable confRejectGammaPair{"confRejectGammaPair", false, "Additional check to reject e+e- pairs base on theta and minv"}; + Configurable confMaxEEMinv{"confMaxEEMinv", 0.002, "Max. minv of e-e+ pair for gamma pair rejection"}; + Configurable confMaxDTheta{"confMaxDTheta", 0.008, "Max. DeltaTheta of pair for gamma pair rejection"}; + ConfigurableAxis confDeltaEtaAxis{"confDeltaEtaAxis", {100, -0.15, 0.15}, "DeltaEta"}; ConfigurableAxis confDeltaPhiStarAxis{"confDeltaPhiStarAxis", {100, -0.15, 0.15}, "DeltaPhiStar"}; @@ -483,6 +487,15 @@ struct FemtoUniversePairTaskTrackTrackMultKtExtended { continue; } + if (confRejectGammaPair && pairCloseRejection.isGammaPair(p1, p2, confMaxEEMinv, confMaxDTheta)) { + continue; + } + + // track cleaning + if (!pairCleaner.isCleanPair(p1, p2, parts)) { + continue; + } + if (confIsCPR.value) { double rand; auto part1 = p1; @@ -503,11 +516,6 @@ struct FemtoUniversePairTaskTrackTrackMultKtExtended { } } - // track cleaning - if (!pairCleaner.isCleanPair(p1, p2, parts)) { - continue; - } - float kstar = FemtoUniverseMath::getkstar(p1, mass1, p2, mass2); float kT = FemtoUniverseMath::getkT(p1, mass1, p2, mass2); @@ -676,6 +684,10 @@ struct FemtoUniversePairTaskTrackTrackMultKtExtended { continue; } + if (confRejectGammaPair && pairCloseRejection.isGammaPair(p1, p2, confMaxEEMinv, confMaxDTheta)) { + continue; + } + if (confIsCPR.value) { double rand; auto part1 = p1; @@ -758,7 +770,7 @@ struct FemtoUniversePairTaskTrackTrackMultKtExtended { void processMixedEvent(soa::Filtered const& cols, FilteredFemtoFullParticles const& parts) { - for (const auto& [collision1, collision2] : soa::selfCombinations(colBinning, 5, -1, cols, cols)) { + for (const auto& [collision1, collision2] : soa::selfCombinations(colBinning, confNEventsMix, -1, cols, cols)) { const int multiplicityCol = collision1.multV0M(); if (confFillDebug) { @@ -799,7 +811,7 @@ struct FemtoUniversePairTaskTrackTrackMultKtExtended { FemtoRecoParticles const& parts, o2::aod::FdMCParticles const&) { - for (const auto& [collision1, collision2] : soa::selfCombinations(colBinning, 5, -1, cols, cols)) { + for (const auto& [collision1, collision2] : soa::selfCombinations(colBinning, confNEventsMix, -1, cols, cols)) { const int multiplicityCol = collision1.multV0M(); if (confFillDebug) { @@ -908,7 +920,7 @@ struct FemtoUniversePairTaskTrackTrackMultKtExtended { } }; - for (const auto& [collision1, collision2] : soa::selfCombinations(colBinning, 5, -1, cols, cols)) { + for (const auto& [collision1, collision2] : soa::selfCombinations(colBinning, confNEventsMix, -1, cols, cols)) { const int multiplicityCol = collision1.multV0M(); if (confFillDebug) { mixQaRegistry.fill(HIST("MixingQA/hMECollisionBins"), colBinning.getBin({collision1.posZ(), multiplicityCol})); @@ -1003,7 +1015,7 @@ struct FemtoUniversePairTaskTrackTrackMultKtExtended { void processFractionsMCTruth(o2::aod::FdCollisions const& cols, FemtoTruthParticles const&) { - for (const auto& [collision1, collision2] : soa::selfCombinations(colBinning, 5, -1, cols, cols)) { + for (const auto& [collision1, collision2] : soa::selfCombinations(colBinning, confNEventsMix, -1, cols, cols)) { const int multiplicityCol = collision1.multV0M(); if (confFillDebug) { diff --git a/PWGCF/FemtoUniverse/Tasks/femtoUniversePairTaskTrackTrackSpherHarMultKtExtended.cxx b/PWGCF/FemtoUniverse/Tasks/femtoUniversePairTaskTrackTrackSpherHarMultKtExtended.cxx index f03ad811289..9bfc5fc58a1 100644 --- a/PWGCF/FemtoUniverse/Tasks/femtoUniversePairTaskTrackTrackSpherHarMultKtExtended.cxx +++ b/PWGCF/FemtoUniverse/Tasks/femtoUniversePairTaskTrackTrackSpherHarMultKtExtended.cxx @@ -247,6 +247,10 @@ struct femtoUniversePairTaskTrackTrackSpherHarMultKtExtended { Configurable cfgProcessKtBins{"cfgProcessKtBins", true, "Process kstar histograms in kT bins (if cfgProcessMultBins is set false, this will not be processed regardless this Configurable state)"}; Configurable cfgProcessKtMt3DCF{"cfgProcessKtMt3DCF", false, "Process 3D histograms in kT and Mult bins"}; + Configurable confRejectGammaPair{"confRejectGammaPair", false, "Additional check to reject e+e- pairs base on theta and minv"}; + Configurable confMaxEEMinv{"confMaxEEMinv", 0.002, "Max. minv of e-e+ pair for gamma pair rejection"}; + Configurable confMaxDTheta{"confMaxDTheta", 0.008, "Max. DeltaTheta of pair for gamma pair rejection"}; + FemtoUniverseSHContainer sameEventCont; FemtoUniverseSHContainer mixedEventCont; @@ -579,6 +583,10 @@ struct femtoUniversePairTaskTrackTrackSpherHarMultKtExtended { continue; } + if (confRejectGammaPair && pairCloseRejection.isGammaPair(p1, p2, confMaxEEMinv, confMaxDTheta)) { + continue; + } + float kT = FemtoUniverseMath::getkT(p1, mass1, p2, mass2); float lastElement = confKtKstarBins.value.back(); float firstRealElement = confKtKstarBins.value[1]; @@ -612,6 +620,7 @@ struct femtoUniversePairTaskTrackTrackSpherHarMultKtExtended { if (!pairCleaner.isCleanPair(p1, p2, parts)) { continue; } + sameEventMultCont.fillMultNumDen(p1, p2, femto_universe_sh_container::EventType::same, 2, multCol, kT, twotracksconfigs.confisIdenLCMS, twotracksconfigs.confIs1D, twotracksconfigs.confIsWeight, twotracksconfigs.confisIdenPRF); } } else { @@ -994,6 +1003,10 @@ struct femtoUniversePairTaskTrackTrackSpherHarMultKtExtended { continue; } + if (confRejectGammaPair && pairCloseRejection.isGammaPair(p1, p2, confMaxEEMinv, confMaxDTheta)) { + continue; + } + float kT = FemtoUniverseMath::getkT(p1, mass1, p2, mass2); float lastElement = confKtKstarBins.value.back(); float firstRealElement = confKtKstarBins.value[1];