From 9b32251773b09e8eb29656c19b5190ff482a324a Mon Sep 17 00:00:00 2001 From: jikim1290 Date: Thu, 29 Oct 2026 10:26:05 +0900 Subject: [PATCH] adding ITS PID --- PWGLF/Tasks/Resonances/cha01710analysis.cxx | 31 +++++++++++++++++++-- 1 file changed, 29 insertions(+), 2 deletions(-) diff --git a/PWGLF/Tasks/Resonances/cha01710analysis.cxx b/PWGLF/Tasks/Resonances/cha01710analysis.cxx index 52900b00422..ebda6c3e0e5 100644 --- a/PWGLF/Tasks/Resonances/cha01710analysis.cxx +++ b/PWGLF/Tasks/Resonances/cha01710analysis.cxx @@ -19,6 +19,7 @@ #include "Common/CCDB/EventSelectionParams.h" #include "Common/DataModel/Centrality.h" #include "Common/DataModel/EventSelection.h" +#include "Common/DataModel/PIDResponseITS.h" #include "Common/DataModel/PIDResponseTOF.h" #include "Common/DataModel/PIDResponseTPC.h" #include "Common/DataModel/Qvectors.h" @@ -37,6 +38,7 @@ #include #include #include +#include #include // IWYU pragma: keep (do not replace with Math/Vector4Dfwd.h) #include @@ -70,6 +72,8 @@ struct Cha01710analysis { Service ccdb{}; + o2::aod::ITSResponse itsResponse; + Configurable cfgUrl{"cfgUrl", "http://alice-ccdb.cern.ch", "CCDB URL"}; struct : ConfigurableGroup { @@ -110,6 +114,8 @@ struct Cha01710analysis { Configurable cfgDcaZMax{"cfgDcaZMax", 2.f, "maximum |DCAz| (cm)"}; Configurable cfgTPCNSigmaMax{"cfgTPCNSigmaMax", 3.f, "maximum |TPC nSigma(K)| without TOF"}; Configurable cfgCombinedNSigmaMax{"cfgCombinedNSigmaMax", 3.f, "maximum combined TPC-TOF nSigma(K)"}; + Configurable cfgPIDITSFlag{"cfgPIDITSFlag", true, "PID ITS flag"}; + Configurable cfgPIDMaxITSnSigmaKaon{"cfgPIDMaxITSnSigmaKaon", 3.0, "ITS nSigma selection"}; } kaonCuts; struct : ConfigurableGroup { @@ -193,6 +199,8 @@ struct Cha01710analysis { histos.add("Kaon/hTOFNSigma", "charged kaon TOF PID", HistType::kTH2F, {cfgAxisPt, {120, -6., 6.}}); histos.add("Kaon/hTPCNSigmaSelected", "charged kaon TPC PID", HistType::kTH2F, {cfgAxisPt, {120, -6., 6.}}); histos.add("Kaon/hTOFNSigmaSelected", "charged kaon TOF PID", HistType::kTH2F, {cfgAxisPt, {120, -6., 6.}}); + histos.add("Kaon/hITSNSigma", "charged kaon ITS PID", HistType::kTH2F, {cfgAxisPt, {120, -6., 6.}}); + histos.add("Kaon/hITSNSigmaSelected", "charged kaon ITS PID", HistType::kTH2F, {cfgAxisPt, {120, -6., 6.}}); histos.add("Pair/hSignalPlus", "K0S K+ same-event versus EP", HistType::kTHnSparseF, {cfgAxisMass, cfgAxisPt, cfgAxisCent, cfgAxisEP}); histos.add("Pair/hSignalMinus", "K0S K- same-event versus EP", HistType::kTHnSparseF, {cfgAxisMass, cfgAxisPt, cfgAxisCent, cfgAxisEP}); @@ -263,9 +271,28 @@ struct Cha01710analysis { histos.fill(HIST("Kaon/hTPCNSigma"), track.pt(), track.tpcNSigmaKa()); if (track.hasTOF()) { histos.fill(HIST("Kaon/hTOFNSigma"), track.pt(), track.tofNSigmaKa()); - return std::hypot(track.tpcNSigmaKa(), track.tofNSigmaKa()) < kaonCuts.cfgCombinedNSigmaMax; } - return std::abs(track.tpcNSigmaKa()) < kaonCuts.cfgTPCNSigmaMax; + histos.fill(HIST("Kaon/hITSNSigma"), track.pt(), itsResponse.nSigmaITS(track)); + + Configurable cfgPIDITSFlag{"cfgPIDITSFlag", true, "PID ITS flag"}; + Configurable cfgPIDMaxITSnSigmaKaon{"cfgPIDMaxITSnSigmaKaon", 3.0, "ITS nSigma selection"}; + + if (track.hasTOF()) { + if (std::hypot(track.tpcNSigmaKa(), track.tofNSigmaKa()) > kaonCuts.cfgCombinedNSigmaMax) { + return false; + } + if (kaonCuts.cfgPIDITSFlag && std::abs(itsResponse.nSigmaITS(track)) > kaonCuts.cfgPIDMaxITSnSigmaKaon) { + return false; + } + return true; + } + if (std::abs(track.tpcNSigmaKa()) > kaonCuts.cfgTPCNSigmaMax) { + return false; + } + if (kaonCuts.cfgPIDITSFlag && std::abs(itsResponse.nSigmaITS(track)) > kaonCuts.cfgPIDMaxITSnSigmaKaon) { + return false; + } + return true; } template