From 6049b911d0314923d57f0f75abacd81fd44da583 Mon Sep 17 00:00:00 2001 From: Subhadeep Mandal Date: Tue, 2 Jun 2026 23:33:36 +0530 Subject: [PATCH 1/2] Added configurable for MID --- PWGLF/Tasks/Resonances/kstar892LightIon.cxx | 22 +++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/PWGLF/Tasks/Resonances/kstar892LightIon.cxx b/PWGLF/Tasks/Resonances/kstar892LightIon.cxx index d3e2f89fc8b..1aae9002090 100644 --- a/PWGLF/Tasks/Resonances/kstar892LightIon.cxx +++ b/PWGLF/Tasks/Resonances/kstar892LightIon.cxx @@ -137,6 +137,7 @@ struct Kstar892LightIon { // PID selections Configurable onlyTOF{"onlyTOF", false, "only TOF tracks"}; Configurable onlyTOFHIT{"onlyTOFHIT", false, "accept only TOF hit tracks at high pt"}; + Configurable onlyTOFVeto{"onlyTOFVeto", false, "only select TOF tracks with TOF and TPC cuts"}; Configurable onlyTPC{"onlyTPC", false, "only TPC tracks"}; Configurable isApplypTdepPID{"isApplypTdepPID", false, "Apply pT dependent PID"}; Configurable isApplypTdepPIDwTOF{"isApplypTdepPIDwTOF", false, "Apply pT dependent PID with compulsory TOF condition in a pT range"}; @@ -158,6 +159,11 @@ struct Kstar892LightIon { Configurable cfgFakeTrackCutKa{"cfgFakeTrackCutKa", 0.3, "Cut based on momentum difference in global and TPC tracks for kaons"}; Configurable cfgFakeTrackCutPi{"cfgFakeTrackCutPi", 0.3, "Cut based on momentum difference in global and TPC tracks for pions"}; + Configurable pionMIDpTlow{"pionMIDpTlow", 1.0, "Low pT cut for pion in MID"}; + Configurable pionMIDpThigh{"pionMIDpThigh", 2.5, "High pT cut for pion in MID"}; + Configurable kaonMIDpTlow{"kaonMIDpTlow", 0.7, "Low pT cut for kaon in MID"}; + Configurable kaonMIDpThigh{"kaonMIDpThigh", 2.5, "High pT cut for kaon in MID"}; + // Fixed variables float lowPtCutPID = 0.5; @@ -646,6 +652,10 @@ struct Kstar892LightIon { if (!candidate.hasTOF() && std::abs(candidate.tpcNSigmaPi()) < selectionConfig.nsigmaCutTPCPi) { return true; } + } else if (selectionConfig.onlyTOFVeto) { + if (candidate.hasTOF() && std::abs(candidate.tofNSigmaPi()) < selectionConfig.nsigmaCutTOFPi && std::abs(candidate.tpcNSigmaPi()) < selectionConfig.nsigmaCutTPCPi) { + return true; + } } else if (selectionConfig.onlyTPC) { if (std::abs(candidate.tpcNSigmaPi()) < selectionConfig.nsigmaCutTPCPi) { return true; @@ -670,6 +680,10 @@ struct Kstar892LightIon { if (!candidate.hasTOF() && std::abs(candidate.tpcNSigmaKa()) < selectionConfig.nsigmaCutTPCKa) { return true; } + } else if (selectionConfig.onlyTOFVeto) { + if (candidate.hasTOF() && std::abs(candidate.tofNSigmaKa()) < selectionConfig.nsigmaCutTOFKa && std::abs(candidate.tpcNSigmaKa()) < selectionConfig.nsigmaCutTPCKa) { + return true; + } } else if (selectionConfig.onlyTPC) { if (std::abs(candidate.tpcNSigmaKa()) < selectionConfig.nsigmaCutTPCKa) { return true; @@ -797,11 +811,11 @@ struct Kstar892LightIon { bool selectionMIDpTdep(const T& candidate, int PID) { if (PID == PIDParticle::kPion) { - if (candidate.pt() >= pionPIDpTlow && candidate.pt() < pionPIDpThigh && !candidate.hasTOF() && std::abs(candidate.tpcNSigmaPi()) < selectionConfig.nsigmaCutTPCMID) { + if (candidate.pt() >= selectionConfig.pionMIDpTlow && candidate.pt() < selectionConfig.pionMIDpThigh && !candidate.hasTOF() && std::abs(candidate.tpcNSigmaPi()) < selectionConfig.nsigmaCutTPCMID) { return true; } } else if (PID == PIDParticle::kKaon) { - if (candidate.pt() >= kaonPIDpTlow && candidate.pt() < kaonPIDpThigh && !candidate.hasTOF() && std::abs(candidate.tpcNSigmaKa()) < selectionConfig.nsigmaCutTPCMID) { + if (candidate.pt() >= selectionConfig.kaonMIDpTlow && candidate.pt() < selectionConfig.kaonMIDpThigh && !candidate.hasTOF() && std::abs(candidate.tpcNSigmaKa()) < selectionConfig.nsigmaCutTPCMID) { return true; } } @@ -812,11 +826,11 @@ struct Kstar892LightIon { bool selectionMIDPtDepComp(const T& candidate, int PID) { if (PID == PIDParticle::kPion) { - if (candidate.pt() >= pionPIDpTlow && candidate.pt() < pionPIDpThigh && !candidate.hasTOF() && std::abs(candidate.tpcNSigmaPi()) < std::abs(candidate.tpcNSigmaKa())) { + if (candidate.pt() >= selectionConfig.pionMIDpTlow && candidate.pt() < selectionConfig.pionMIDpThigh && !candidate.hasTOF() && std::abs(candidate.tpcNSigmaPi()) < std::abs(candidate.tpcNSigmaKa())) { return true; } } else if (PID == PIDParticle::kKaon) { - if (candidate.pt() >= kaonPIDpTlow && candidate.pt() < kaonPIDpThigh && !candidate.hasTOF() && std::abs(candidate.tpcNSigmaKa()) < std::abs(candidate.tpcNSigmaPi())) { + if (candidate.pt() >= selectionConfig.kaonMIDpTlow && candidate.pt() < selectionConfig.kaonMIDpThigh && !candidate.hasTOF() && std::abs(candidate.tpcNSigmaKa()) < std::abs(candidate.tpcNSigmaPi())) { return true; } } From 5107b8d26e33a5d983f2e8c7c92fdfc33eb32ef5 Mon Sep 17 00:00:00 2001 From: Subhadeep Mandal Date: Wed, 3 Jun 2026 09:33:19 +0530 Subject: [PATCH 2/2] Fixed variable names --- PWGLF/Tasks/Resonances/kstar892LightIon.cxx | 22 ++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/PWGLF/Tasks/Resonances/kstar892LightIon.cxx b/PWGLF/Tasks/Resonances/kstar892LightIon.cxx index 1aae9002090..580fd352909 100644 --- a/PWGLF/Tasks/Resonances/kstar892LightIon.cxx +++ b/PWGLF/Tasks/Resonances/kstar892LightIon.cxx @@ -159,10 +159,10 @@ struct Kstar892LightIon { Configurable cfgFakeTrackCutKa{"cfgFakeTrackCutKa", 0.3, "Cut based on momentum difference in global and TPC tracks for kaons"}; Configurable cfgFakeTrackCutPi{"cfgFakeTrackCutPi", 0.3, "Cut based on momentum difference in global and TPC tracks for pions"}; - Configurable pionMIDpTlow{"pionMIDpTlow", 1.0, "Low pT cut for pion in MID"}; - Configurable pionMIDpThigh{"pionMIDpThigh", 2.5, "High pT cut for pion in MID"}; - Configurable kaonMIDpTlow{"kaonMIDpTlow", 0.7, "Low pT cut for kaon in MID"}; - Configurable kaonMIDpThigh{"kaonMIDpThigh", 2.5, "High pT cut for kaon in MID"}; + Configurable pionMIDpTLow{"pionMIDpTLow", 1.0, "Low pT cut for pion in MID"}; + Configurable pionMIDpTHigh{"pionMIDpTHigh", 2.5, "High pT cut for pion in MID"}; + Configurable kaonMIDpTLow{"kaonMIDpTLow", 0.7, "Low pT cut for kaon in MID"}; + Configurable kaonMIDpTHigh{"kaonMIDpTHigh", 2.5, "High pT cut for kaon in MID"}; // Fixed variables float lowPtCutPID = 0.5; @@ -217,7 +217,7 @@ struct Kstar892LightIon { int noOfDaughters = 2; - double pionPIDpTlow = 1.0, pionPIDpThigh = 2.5, kaonPIDpTlow = 0.7, kaonPIDpThigh = 2.5; + double pionPIDpTLow = 1.0, pionPIDpTHigh = 2.5, kaonPIDpTLow = 0.7, kaonPIDpTHigh = 2.5; TRandom* rn = new TRandom(); @@ -731,7 +731,7 @@ struct Kstar892LightIon { bool selectionPIDpTdepTOF(const T& candidate, int PID) { if (PID == PIDParticle::kPion) { - if (candidate.pt() < pionPIDpTlow || candidate.pt() > pionPIDpThigh) { + if (candidate.pt() < pionPIDpTLow || candidate.pt() > pionPIDpTHigh) { if (candidate.pt() < selectionConfig.lowPtCutPID && std::abs(candidate.tpcNSigmaPi()) < selectionConfig.nsigmaCutTPCPi) { return true; } @@ -747,7 +747,7 @@ struct Kstar892LightIon { } } } else if (PID == PIDParticle::kKaon) { - if (candidate.pt() < kaonPIDpTlow || candidate.pt() > kaonPIDpThigh) { + if (candidate.pt() < kaonPIDpTLow || candidate.pt() > kaonPIDpTHigh) { if (candidate.pt() < selectionConfig.lowPtCutPID && std::abs(candidate.tpcNSigmaKa()) < selectionConfig.nsigmaCutTPCKa) { return true; } @@ -811,11 +811,11 @@ struct Kstar892LightIon { bool selectionMIDpTdep(const T& candidate, int PID) { if (PID == PIDParticle::kPion) { - if (candidate.pt() >= selectionConfig.pionMIDpTlow && candidate.pt() < selectionConfig.pionMIDpThigh && !candidate.hasTOF() && std::abs(candidate.tpcNSigmaPi()) < selectionConfig.nsigmaCutTPCMID) { + if (candidate.pt() >= selectionConfig.pionMIDpTLow && candidate.pt() < selectionConfig.pionMIDpTHigh && !candidate.hasTOF() && std::abs(candidate.tpcNSigmaPi()) < selectionConfig.nsigmaCutTPCMID) { return true; } } else if (PID == PIDParticle::kKaon) { - if (candidate.pt() >= selectionConfig.kaonMIDpTlow && candidate.pt() < selectionConfig.kaonMIDpThigh && !candidate.hasTOF() && std::abs(candidate.tpcNSigmaKa()) < selectionConfig.nsigmaCutTPCMID) { + if (candidate.pt() >= selectionConfig.kaonMIDpTLow && candidate.pt() < selectionConfig.kaonMIDpTHigh && !candidate.hasTOF() && std::abs(candidate.tpcNSigmaKa()) < selectionConfig.nsigmaCutTPCMID) { return true; } } @@ -826,11 +826,11 @@ struct Kstar892LightIon { bool selectionMIDPtDepComp(const T& candidate, int PID) { if (PID == PIDParticle::kPion) { - if (candidate.pt() >= selectionConfig.pionMIDpTlow && candidate.pt() < selectionConfig.pionMIDpThigh && !candidate.hasTOF() && std::abs(candidate.tpcNSigmaPi()) < std::abs(candidate.tpcNSigmaKa())) { + if (candidate.pt() >= selectionConfig.pionMIDpTLow && candidate.pt() < selectionConfig.pionMIDpTHigh && !candidate.hasTOF() && std::abs(candidate.tpcNSigmaPi()) < std::abs(candidate.tpcNSigmaKa())) { return true; } } else if (PID == PIDParticle::kKaon) { - if (candidate.pt() >= selectionConfig.kaonMIDpTlow && candidate.pt() < selectionConfig.kaonMIDpThigh && !candidate.hasTOF() && std::abs(candidate.tpcNSigmaKa()) < std::abs(candidate.tpcNSigmaPi())) { + if (candidate.pt() >= selectionConfig.kaonMIDpTLow && candidate.pt() < selectionConfig.kaonMIDpTHigh && !candidate.hasTOF() && std::abs(candidate.tpcNSigmaKa()) < std::abs(candidate.tpcNSigmaPi())) { return true; } }