From 959403efa693313986fca94272789fd4ac12c1a8 Mon Sep 17 00:00:00 2001 From: feisenhu Date: Tue, 29 Oct 2024 13:06:31 +0100 Subject: [PATCH 1/2] [PWGDQ] add TPCnCRoverFindCls as variable and add cut setting to do a comparison between DQ and EM framework --- PWGDQ/Core/CutsLibrary.cxx | 48 ++++++++++++++++++++++++++++ PWGDQ/Core/VarManager.cxx | 2 ++ PWGDQ/Core/VarManager.h | 2 ++ PWGEM/Dilepton/Tasks/MCtemplates.cxx | 2 +- 4 files changed, 53 insertions(+), 1 deletion(-) diff --git a/PWGDQ/Core/CutsLibrary.cxx b/PWGDQ/Core/CutsLibrary.cxx index 7b0c206235d..d1be8072abe 100644 --- a/PWGDQ/Core/CutsLibrary.cxx +++ b/PWGDQ/Core/CutsLibrary.cxx @@ -2512,6 +2512,22 @@ AnalysisCompositeCut* o2::aod::dqcuts::GetCompositeCut(const char* cutName) return cut; } + if (!nameStr.compare("trackCut_compareDQEMframework")) { //cut setting to check least common factor between reduced data sets of PWGEM and PWGDQ + cut->AddCut(GetAnalysisCut("lmeeStandardKine")); + cut->AddCut(GetAnalysisCut("trackQuality_compareDQEMframework")); + cut->AddCut(GetAnalysisCut("trackDCA1cm")); + AnalysisCompositeCut* cut_tpc_nSigma = new AnalysisCompositeCut("pid_TPCnSigma", "pid_TPCnSigma", kTRUE); + cut_tpc_nSigma->AddCut(GetAnalysisCut("lmee_commonDQEM_PID_TPC")); + + AnalysisCompositeCut* cut_tof_nSigma = new AnalysisCompositeCut("pid_TOFnSigma", "pid_TOFnSigma", kTRUE); + cut_tof_nSigma->AddCut(GetAnalysisCut("lmee_commonDQEM_PID_TOF")); + + AnalysisCompositeCut* cut_pid_OR = new AnalysisCompositeCut("e_NSigma", "e_NSigma", kFALSE); + cut_pid_OR->AddCut(cut_tpc_nSigma); + cut_pid_OR->AddCut(cut_tof_nSigma); + return cut; + } + // ------------------------------------------------------------------------------------------------- // lmee pair cuts @@ -3801,6 +3817,17 @@ AnalysisCut* o2::aod::dqcuts::GetAnalysisCut(const char* cutName) return cut; } + if (!nameStr.compare("trackQuality_compareDQEMframework")) { //cut setting to check least common factor between reduced data sets of PWGEM and PWGDQ + cut->AddCut(VarManager::kIsSPDfirst, 0.5, 1.5); + cut->AddCut(VarManager::kITSchi2, 0.0, 5.0); + cut->AddCut(VarManager::kITSncls, 4.5, 7.5); + cut->AddCut(VarManager::kTPCchi2, 0.0, 4.0); + cut->AddCut(VarManager::kTPCnclsCR, 80.0, 161.); + cut->AddCut(VarManager::kTPCnCRoverFindCls, 0.8, 1e+10); + cut->AddCut(VarManager::kTPCncls, 90.0, 170.); + return cut; + } + if ((!nameStr.compare("TightGlobalTrackRun3")) || (!nameStr.compare("lmeeQCTrackCuts"))) { cut->AddCut(VarManager::kIsSPDfirst, 0.5, 1.5); cut->AddCut(VarManager::kTPCchi2, 0.0, 4.0); @@ -4049,6 +4076,12 @@ AnalysisCut* o2::aod::dqcuts::GetAnalysisCut(const char* cutName) return cut; } + if (!nameStr.compare("trackDCA1cm")) { //cut setting to check least common factor between reduced data sets of PWGEM and PWGDQ + cut->AddCut(VarManager::kTrackDCAxy, -1.0, 1.0); + cut->AddCut(VarManager::kTrackDCAz, -1.0, 1.0); + return cut; + } + if (!nameStr.compare("dcaCut1_ionut")) { cut->AddCut(VarManager::kTrackDCAxy, -0.5, 0.5); cut->AddCut(VarManager::kTrackDCAz, -0.5, 0.5); @@ -4409,6 +4442,21 @@ AnalysisCut* o2::aod::dqcuts::GetAnalysisCut(const char* cutName) return cut; } + if (!nameStr.compare("lmee_commonDQEM_PID_TPC")) { //cut setting to check least common factor between reduced data sets of PWGEM and PWGDQ + cut->AddCut(VarManager::kTPCnSigmaEl, -2.5, 3., false, VarManager::kPin, 0.0, 1e+10, false); + cut->AddCut(VarManager::kTPCnSigmaPi, -1e12, 3.5, true, VarManager::kPin, 0.0, 1e+10, false); + cut->AddCut(VarManager::kTPCnSigmaKa, -3., 3., true, VarManager::kPin, 0.0, 1e+10, false); + cut->AddCut(VarManager::kTPCnSigmaPr, -3., 3., true, VarManager::kPin, 0.0, 1e+10, false); + return cut; + } + + if (!nameStr.compare("lmee_commonDQEM_PID_TOF")) { //cut setting to check least common factor between reduced data sets of PWGEM and PWGDQ + cut->AddCut(VarManager::kTPCnSigmaEl, -2.5, 3., false, VarManager::kPin, 0.0, 1e+10, false); + cut->AddCut(VarManager::kTPCnSigmaPi, -3., 3.5, true, VarManager::kPin, 0.0, 1e+10, false); + cut->AddCut(VarManager::kTOFnSigmaEl, -3., 3., false, VarManager::kPin, 0.3, 1e+10, false); + return cut; + } + std::vector vecPIDcase; vecPIDcase.emplace_back(""); // without post calibration vecPIDcase.emplace_back("_Corr"); // case of using post calibrated PID spectra diff --git a/PWGDQ/Core/VarManager.cxx b/PWGDQ/Core/VarManager.cxx index 9efae351b8a..5e0f11400d7 100644 --- a/PWGDQ/Core/VarManager.cxx +++ b/PWGDQ/Core/VarManager.cxx @@ -435,6 +435,8 @@ void VarManager::SetDefaultVarNames() fgVariableUnits[kTPCncls] = ""; fgVariableNames[kTPCnclsCR] = "TPC #cls crossed rows"; fgVariableUnits[kTPCnclsCR] = ""; + fgVariableNames[kTPCnCRoverFindCls] = "TPC crossed rows over findable cls"; + fgVariableUnits[kTPCnCRoverFindCls] = ""; fgVariableNames[kTPCchi2] = "TPC chi2"; fgVariableUnits[kTPCchi2] = ""; fgVariableNames[kTPCsignal] = "TPC dE/dx"; diff --git a/PWGDQ/Core/VarManager.h b/PWGDQ/Core/VarManager.h index 38115fb4608..2973417eba2 100644 --- a/PWGDQ/Core/VarManager.h +++ b/PWGDQ/Core/VarManager.h @@ -445,6 +445,7 @@ class VarManager : public TObject kTPCncls, kITSClusterMap, kTPCnclsCR, + kTPCnCRoverFindCls, kTPCchi2, kTPCsignal, kTPCsignalRandomized, @@ -2033,6 +2034,7 @@ void VarManager::FillTrack(T const& track, float* values) values[kTPCchi2] = track.tpcChi2NCl(); values[kTrackLength] = track.length(); values[kTPCnclsCR] = track.tpcNClsCrossedRows(); + values[kTPCnCRoverFindCls] = track.tpcCrossedRowsOverFindableCls(); values[kTRDPattern] = track.trdPattern(); values[kTPCsignal] = track.tpcSignal(); diff --git a/PWGEM/Dilepton/Tasks/MCtemplates.cxx b/PWGEM/Dilepton/Tasks/MCtemplates.cxx index c41d27f91d1..536265428a5 100644 --- a/PWGEM/Dilepton/Tasks/MCtemplates.cxx +++ b/PWGEM/Dilepton/Tasks/MCtemplates.cxx @@ -335,7 +335,7 @@ struct AnalysisTrackSelection { } // end loop over cuts } // end loop over MC signals } // end loop over tracks - } + } // end runTrackSelection template void runMCGenTrack(TTracksMC const& groupedMCTracks) From b8a7789f2082122bd1be4701876066c5c58e7beb Mon Sep 17 00:00:00 2001 From: ALICE Action Bot Date: Tue, 29 Oct 2024 12:15:32 +0000 Subject: [PATCH 2/2] Please consider the following formatting changes --- PWGDQ/Core/CutsLibrary.cxx | 10 +++++----- PWGEM/Dilepton/Tasks/MCtemplates.cxx | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/PWGDQ/Core/CutsLibrary.cxx b/PWGDQ/Core/CutsLibrary.cxx index d1be8072abe..3a60ff3704c 100644 --- a/PWGDQ/Core/CutsLibrary.cxx +++ b/PWGDQ/Core/CutsLibrary.cxx @@ -2512,7 +2512,7 @@ AnalysisCompositeCut* o2::aod::dqcuts::GetCompositeCut(const char* cutName) return cut; } - if (!nameStr.compare("trackCut_compareDQEMframework")) { //cut setting to check least common factor between reduced data sets of PWGEM and PWGDQ + if (!nameStr.compare("trackCut_compareDQEMframework")) { // cut setting to check least common factor between reduced data sets of PWGEM and PWGDQ cut->AddCut(GetAnalysisCut("lmeeStandardKine")); cut->AddCut(GetAnalysisCut("trackQuality_compareDQEMframework")); cut->AddCut(GetAnalysisCut("trackDCA1cm")); @@ -3817,7 +3817,7 @@ AnalysisCut* o2::aod::dqcuts::GetAnalysisCut(const char* cutName) return cut; } - if (!nameStr.compare("trackQuality_compareDQEMframework")) { //cut setting to check least common factor between reduced data sets of PWGEM and PWGDQ + if (!nameStr.compare("trackQuality_compareDQEMframework")) { // cut setting to check least common factor between reduced data sets of PWGEM and PWGDQ cut->AddCut(VarManager::kIsSPDfirst, 0.5, 1.5); cut->AddCut(VarManager::kITSchi2, 0.0, 5.0); cut->AddCut(VarManager::kITSncls, 4.5, 7.5); @@ -4076,7 +4076,7 @@ AnalysisCut* o2::aod::dqcuts::GetAnalysisCut(const char* cutName) return cut; } - if (!nameStr.compare("trackDCA1cm")) { //cut setting to check least common factor between reduced data sets of PWGEM and PWGDQ + if (!nameStr.compare("trackDCA1cm")) { // cut setting to check least common factor between reduced data sets of PWGEM and PWGDQ cut->AddCut(VarManager::kTrackDCAxy, -1.0, 1.0); cut->AddCut(VarManager::kTrackDCAz, -1.0, 1.0); return cut; @@ -4442,7 +4442,7 @@ AnalysisCut* o2::aod::dqcuts::GetAnalysisCut(const char* cutName) return cut; } - if (!nameStr.compare("lmee_commonDQEM_PID_TPC")) { //cut setting to check least common factor between reduced data sets of PWGEM and PWGDQ + if (!nameStr.compare("lmee_commonDQEM_PID_TPC")) { // cut setting to check least common factor between reduced data sets of PWGEM and PWGDQ cut->AddCut(VarManager::kTPCnSigmaEl, -2.5, 3., false, VarManager::kPin, 0.0, 1e+10, false); cut->AddCut(VarManager::kTPCnSigmaPi, -1e12, 3.5, true, VarManager::kPin, 0.0, 1e+10, false); cut->AddCut(VarManager::kTPCnSigmaKa, -3., 3., true, VarManager::kPin, 0.0, 1e+10, false); @@ -4450,7 +4450,7 @@ AnalysisCut* o2::aod::dqcuts::GetAnalysisCut(const char* cutName) return cut; } - if (!nameStr.compare("lmee_commonDQEM_PID_TOF")) { //cut setting to check least common factor between reduced data sets of PWGEM and PWGDQ + if (!nameStr.compare("lmee_commonDQEM_PID_TOF")) { // cut setting to check least common factor between reduced data sets of PWGEM and PWGDQ cut->AddCut(VarManager::kTPCnSigmaEl, -2.5, 3., false, VarManager::kPin, 0.0, 1e+10, false); cut->AddCut(VarManager::kTPCnSigmaPi, -3., 3.5, true, VarManager::kPin, 0.0, 1e+10, false); cut->AddCut(VarManager::kTOFnSigmaEl, -3., 3., false, VarManager::kPin, 0.3, 1e+10, false); diff --git a/PWGEM/Dilepton/Tasks/MCtemplates.cxx b/PWGEM/Dilepton/Tasks/MCtemplates.cxx index 536265428a5..d8b26a9573a 100644 --- a/PWGEM/Dilepton/Tasks/MCtemplates.cxx +++ b/PWGEM/Dilepton/Tasks/MCtemplates.cxx @@ -335,7 +335,7 @@ struct AnalysisTrackSelection { } // end loop over cuts } // end loop over MC signals } // end loop over tracks - } // end runTrackSelection + } // end runTrackSelection template void runMCGenTrack(TTracksMC const& groupedMCTracks)