From 00ca8e3432bb763c7c318b38a52062416d2204f1 Mon Sep 17 00:00:00 2001 From: Stefano Cannito Date: Wed, 16 Jul 2025 16:52:25 +0200 Subject: [PATCH] Differentiate online correction for pid on pions with and without TOF --- .../Tasks/Strangeness/phik0shortanalysis.cxx | 21 ++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/PWGLF/Tasks/Strangeness/phik0shortanalysis.cxx b/PWGLF/Tasks/Strangeness/phik0shortanalysis.cxx index 247cdc92ae3..df749d12a98 100644 --- a/PWGLF/Tasks/Strangeness/phik0shortanalysis.cxx +++ b/PWGLF/Tasks/Strangeness/phik0shortanalysis.cxx @@ -266,7 +266,8 @@ struct Phik0shortanalysis { // Efficiecy maps TH3F* effMapPhi; TH3F* effMapK0S; - TH3F* effMapPion; + TH3F* effMapPionTPC; + TH3F* effMapPionTPCTOF; void init(InitContext&) { @@ -616,7 +617,8 @@ struct Phik0shortanalysis { else { effMapPhi = nullptr; effMapK0S = nullptr; - effMapPion = nullptr; + effMapPionTPC = nullptr; + effMapPionTPCTOF = nullptr; } } } @@ -965,9 +967,14 @@ struct Phik0shortanalysis { LOG(error) << "Problem getting efficiency map for K0S!"; return; } - effMapPion = static_cast(listEfficiencyMaps->FindObject("h3EfficiencyPion")); - if (!effMapPion) { - LOG(error) << "Problem getting efficiency map for Pion!"; + effMapPionTPC = static_cast(listEfficiencyMaps->FindObject("h3EfficiencyPionTPC")); + if (!effMapPionTPC) { + LOG(error) << "Problem getting efficiency map for Pion with TPC!"; + return; + } + effMapPionTPCTOF = static_cast(listEfficiencyMaps->FindObject("h3EfficiencyPionTPCTOF")); + if (!effMapPionTPCTOF) { + LOG(error) << "Problem getting efficiency map for Pion with TPC and TOF!"; return; } } @@ -2578,7 +2585,7 @@ struct Phik0shortanalysis { float efficiencyPhiPion = 1.0f; if (applyEfficiency) { - efficiencyPhiPion = effMapPhi->Interpolate(multiplicity, recPhi.Pt(), recPhi.Rapidity()) * effMapPion->Interpolate(multiplicity, track.pt(), track.rapidity(massPi)); + efficiencyPhiPion = track.pt() < trackConfigs.pTToUseTOF ? effMapPhi->Interpolate(multiplicity, recPhi.Pt(), recPhi.Rapidity()) * effMapPionTPC->Interpolate(multiplicity, track.pt(), track.rapidity(massPi)) : effMapPhi->Interpolate(multiplicity, recPhi.Pt(), recPhi.Rapidity()) * effMapPionTPCTOF->Interpolate(multiplicity, track.pt(), track.rapidity(massPi)); if (efficiencyPhiPion == 0) efficiencyPhiPion = 1.0f; } @@ -2698,7 +2705,7 @@ struct Phik0shortanalysis { float efficiencyPhiPion = 1.0f; if (applyEfficiency) { - efficiencyPhiPion = effMapPhi->Interpolate(genmultiplicity, recPhi.Pt(), recPhi.Rapidity()) * effMapPion->Interpolate(genmultiplicity, track.pt(), track.rapidity(massPi)); + efficiencyPhiPion = track.pt() < trackConfigs.pTToUseTOF ? effMapPhi->Interpolate(genmultiplicity, recPhi.Pt(), recPhi.Rapidity()) * effMapPionTPC->Interpolate(genmultiplicity, track.pt(), track.rapidity(massPi)) : effMapPhi->Interpolate(genmultiplicity, recPhi.Pt(), recPhi.Rapidity()) * effMapPionTPCTOF->Interpolate(genmultiplicity, track.pt(), track.rapidity(massPi)); if (efficiencyPhiPion == 0) efficiencyPhiPion = 1.0f; }