From ba76a2ade6c54704aa362fe6b0b38fb20775b051 Mon Sep 17 00:00:00 2001 From: Magnus <57144728+ThePhDane@users.noreply.github.com> Date: Fri, 17 Jan 2025 11:54:05 +0100 Subject: [PATCH] [PWGDQ] Added a few PID cuts to the cuts library (#9362) --- PWGDQ/Core/CutsLibrary.cxx | 180 +++++++++++++++++++++++++++++++++++++ 1 file changed, 180 insertions(+) diff --git a/PWGDQ/Core/CutsLibrary.cxx b/PWGDQ/Core/CutsLibrary.cxx index 3107bedeb3e..1a864a36c3a 100644 --- a/PWGDQ/Core/CutsLibrary.cxx +++ b/PWGDQ/Core/CutsLibrary.cxx @@ -1016,6 +1016,153 @@ AnalysisCompositeCut* o2::aod::dqcuts::GetCompositeCut(const char* cutName) } } + // Magnus composite cuts ----------------------------------------------------------------------------------------------------------------- + + AnalysisCompositeCut* magnus_PID111 = new AnalysisCompositeCut("magnus_PID111", ""); + magnus_PID111->AddCut(GetAnalysisCut("pidJpsi_magnus_ele1")); + magnus_PID111->AddCut(GetAnalysisCut("pidJpsi_magnus_pion1")); + magnus_PID111->AddCut(GetAnalysisCut("pidJpsi_magnus_prot1")); + if (!nameStr.compare("MagnussOptimization111")) { + cut->AddCut(GetAnalysisCut("kineJpsiEle_ionut")); + cut->AddCut(GetAnalysisCut("dcaCut1_ionut")); + cut->AddCut(GetAnalysisCut("trackQuality_ionut")); + cut->AddCut(magnus_PID111); + return cut; + } + + AnalysisCompositeCut* magnus_PID211 = new AnalysisCompositeCut("magnus_PID211", ""); + magnus_PID211->AddCut(GetAnalysisCut("pidJpsi_magnus_ele2")); + magnus_PID211->AddCut(GetAnalysisCut("pidJpsi_magnus_pion1")); + magnus_PID211->AddCut(GetAnalysisCut("pidJpsi_magnus_prot1")); + if (!nameStr.compare("MagnussOptimization211")) { + cut->AddCut(GetAnalysisCut("kineJpsiEle_ionut")); + cut->AddCut(GetAnalysisCut("dcaCut1_ionut")); + cut->AddCut(GetAnalysisCut("trackQuality_ionut")); + cut->AddCut(magnus_PID211); + return cut; + } + + AnalysisCompositeCut* magnus_PID311 = new AnalysisCompositeCut("magnus_PID311", ""); + magnus_PID311->AddCut(GetAnalysisCut("pidJpsi_magnus_ele3")); + magnus_PID311->AddCut(GetAnalysisCut("pidJpsi_magnus_pion1")); + magnus_PID311->AddCut(GetAnalysisCut("pidJpsi_magnus_prot1")); + if (!nameStr.compare("MagnussOptimization311")) { + cut->AddCut(GetAnalysisCut("kineJpsiEle_ionut")); + cut->AddCut(GetAnalysisCut("dcaCut1_ionut")); + cut->AddCut(GetAnalysisCut("trackQuality_ionut")); + cut->AddCut(magnus_PID311); + return cut; + } + + AnalysisCompositeCut* magnus_PID121 = new AnalysisCompositeCut("magnus_PID121", ""); + magnus_PID121->AddCut(GetAnalysisCut("pidJpsi_magnus_ele1")); + magnus_PID121->AddCut(GetAnalysisCut("pidJpsi_magnus_pion2")); + magnus_PID121->AddCut(GetAnalysisCut("pidJpsi_magnus_prot1")); + if (!nameStr.compare("MagnussOptimization121")) { + cut->AddCut(GetAnalysisCut("kineJpsiEle_ionut")); + cut->AddCut(GetAnalysisCut("dcaCut1_ionut")); + cut->AddCut(GetAnalysisCut("trackQuality_ionut")); + cut->AddCut(magnus_PID121); + return cut; + } + + AnalysisCompositeCut* magnus_PID112 = new AnalysisCompositeCut("magnus_PID112", ""); + magnus_PID112->AddCut(GetAnalysisCut("pidJpsi_magnus_ele1")); + magnus_PID112->AddCut(GetAnalysisCut("pidJpsi_magnus_pion1")); + magnus_PID112->AddCut(GetAnalysisCut("pidJpsi_magnus_prot2")); + if (!nameStr.compare("MagnussOptimization112")) { + cut->AddCut(GetAnalysisCut("kineJpsiEle_ionut")); + cut->AddCut(GetAnalysisCut("dcaCut1_ionut")); + cut->AddCut(GetAnalysisCut("trackQuality_ionut")); + cut->AddCut(magnus_PID112); + return cut; + } + + AnalysisCompositeCut* magnus_PID122 = new AnalysisCompositeCut("magnus_PID122", ""); + magnus_PID122->AddCut(GetAnalysisCut("pidJpsi_magnus_ele1")); + magnus_PID122->AddCut(GetAnalysisCut("pidJpsi_magnus_pion2")); + magnus_PID122->AddCut(GetAnalysisCut("pidJpsi_magnus_prot2")); + if (!nameStr.compare("MagnussOptimization122")) { + cut->AddCut(GetAnalysisCut("kineJpsiEle_ionut")); + cut->AddCut(GetAnalysisCut("dcaCut1_ionut")); + cut->AddCut(GetAnalysisCut("trackQuality_ionut")); + cut->AddCut(magnus_PID122); + return cut; + } + + AnalysisCompositeCut* magnus_PID222 = new AnalysisCompositeCut("magnus_PID222", ""); + magnus_PID222->AddCut(GetAnalysisCut("pidJpsi_magnus_ele2")); + magnus_PID222->AddCut(GetAnalysisCut("pidJpsi_magnus_pion2")); + magnus_PID222->AddCut(GetAnalysisCut("pidJpsi_magnus_prot2")); + if (!nameStr.compare("MagnussOptimization222")) { + cut->AddCut(GetAnalysisCut("kineJpsiEle_ionut")); + cut->AddCut(GetAnalysisCut("dcaCut1_ionut")); + cut->AddCut(GetAnalysisCut("trackQuality_ionut")); + cut->AddCut(magnus_PID222); + return cut; + } + + AnalysisCompositeCut* magnus_PID212 = new AnalysisCompositeCut("magnus_PID212", ""); + magnus_PID212->AddCut(GetAnalysisCut("pidJpsi_magnus_ele2")); + magnus_PID212->AddCut(GetAnalysisCut("pidJpsi_magnus_pion1")); + magnus_PID212->AddCut(GetAnalysisCut("pidJpsi_magnus_prot2")); + if (!nameStr.compare("MagnussOptimization212")) { + cut->AddCut(GetAnalysisCut("kineJpsiEle_ionut")); + cut->AddCut(GetAnalysisCut("dcaCut1_ionut")); + cut->AddCut(GetAnalysisCut("trackQuality_ionut")); + cut->AddCut(magnus_PID212); + return cut; + } + + AnalysisCompositeCut* magnus_PID221 = new AnalysisCompositeCut("magnus_PID221", ""); + magnus_PID221->AddCut(GetAnalysisCut("pidJpsi_magnus_ele2")); + magnus_PID221->AddCut(GetAnalysisCut("pidJpsi_magnus_pion2")); + magnus_PID221->AddCut(GetAnalysisCut("pidJpsi_magnus_prot1")); + if (!nameStr.compare("MagnussOptimization221")) { + cut->AddCut(GetAnalysisCut("kineJpsiEle_ionut")); + cut->AddCut(GetAnalysisCut("dcaCut1_ionut")); + cut->AddCut(GetAnalysisCut("trackQuality_ionut")); + cut->AddCut(magnus_PID221); + return cut; + } + + AnalysisCompositeCut* magnus_PID321 = new AnalysisCompositeCut("magnus_PID321", ""); + magnus_PID321->AddCut(GetAnalysisCut("pidJpsi_magnus_ele3")); + magnus_PID321->AddCut(GetAnalysisCut("pidJpsi_magnus_pion2")); + magnus_PID321->AddCut(GetAnalysisCut("pidJpsi_magnus_prot1")); + if (!nameStr.compare("MagnussOptimization321")) { + cut->AddCut(GetAnalysisCut("kineJpsiEle_ionut")); + cut->AddCut(GetAnalysisCut("dcaCut1_ionut")); + cut->AddCut(GetAnalysisCut("trackQuality_ionut")); + cut->AddCut(magnus_PID321); + return cut; + } + + AnalysisCompositeCut* magnus_PID312 = new AnalysisCompositeCut("magnus_PID312", ""); + magnus_PID312->AddCut(GetAnalysisCut("pidJpsi_magnus_ele3")); + magnus_PID312->AddCut(GetAnalysisCut("pidJpsi_magnus_pion1")); + magnus_PID312->AddCut(GetAnalysisCut("pidJpsi_magnus_prot2")); + if (!nameStr.compare("MagnussOptimization312")) { + cut->AddCut(GetAnalysisCut("kineJpsiEle_ionut")); + cut->AddCut(GetAnalysisCut("dcaCut1_ionut")); + cut->AddCut(GetAnalysisCut("trackQuality_ionut")); + cut->AddCut(magnus_PID312); + return cut; + } + + AnalysisCompositeCut* magnus_PID322 = new AnalysisCompositeCut("magnus_PID322", ""); + magnus_PID322->AddCut(GetAnalysisCut("pidJpsi_magnus_ele1")); + magnus_PID322->AddCut(GetAnalysisCut("pidJpsi_magnus_pion2")); + magnus_PID322->AddCut(GetAnalysisCut("pidJpsi_magnus_prot2")); + if (!nameStr.compare("MagnussOptimization322")) { + cut->AddCut(GetAnalysisCut("kineJpsiEle_ionut")); + cut->AddCut(GetAnalysisCut("dcaCut1_ionut")); + cut->AddCut(GetAnalysisCut("trackQuality_ionut")); + cut->AddCut(magnus_PID322); + return cut; + } + //------------------------------------------------------------------------------------------------------- + //--------------------------------------------------------------- // Cuts for the selection of legs from dalitz decay // @@ -4431,6 +4578,39 @@ AnalysisCut* o2::aod::dqcuts::GetAnalysisCut(const char* cutName) return cut; } + // Magnus cuts ---------------------------------------------------------- + + if (!nameStr.compare("pidJpsi_magnus_ele1")) { + cut->AddCut(VarManager::kTPCnSigmaEl, -3.0, 4.0); + return cut; + } + if (!nameStr.compare("pidJpsi_magnus_ele2")) { + cut->AddCut(VarManager::kTPCnSigmaEl, -2.0, 4.0); + return cut; + } + if (!nameStr.compare("pidJpsi_magnus_ele3")) { + cut->AddCut(VarManager::kTPCnSigmaEl, -1.0, 4.0); + return cut; + } + if (!nameStr.compare("pidJpsi_magnus_prot1")) { + cut->AddCut(VarManager::kTPCnSigmaPr, 3.0, 1000.0); + return cut; + } + if (!nameStr.compare("pidJpsi_magnus_prot2")) { + cut->AddCut(VarManager::kTPCnSigmaPr, 3.5, 1000.0); + return cut; + } + if (!nameStr.compare("pidJpsi_magnus_pion1")) { + cut->AddCut(VarManager::kTPCnSigmaPi, 3.0, 1000.0); + return cut; + } + if (!nameStr.compare("pidJpsi_magnus_pion2")) { + cut->AddCut(VarManager::kTPCnSigmaPi, 3.5, 1000.0); + return cut; + } + + // ---------------------------------------------------------------------------------- + if (!nameStr.compare("standardPrimaryTrackDCAz")) { cut->AddCut(VarManager::kTrackDCAxy, -3.0, 3.0); cut->AddCut(VarManager::kTrackDCAz, -1.0, 1.0);