@@ -161,6 +161,10 @@ struct Kstar892LightIon {
161161 Configurable<float > lowPtCutPid{" lowPtCutPid" , 0.5 , " Low pT cut for PID" };
162162 Configurable<float > highPtCutPid{" highPtCutPid" , 6.0 , " High pT cut for PID" };
163163
164+ Configurable<float > lowPtPid{" lowPtPid" , 2.5 , " Low pT cut for PID" };
165+ Configurable<float > midPtPid{" midPtPid" , 1.5 , " Mid pT cut for PID" };
166+ Configurable<float > highPtPid{" highPtPid" , 2.5 , " High pT cut for PID" };
167+
164168 Configurable<bool > selHasFT0MC{" selHasFT0MC" , true , " Has FT0?" };
165169 Configurable<bool > isZvtxPosSelMC{" isZvtxPosSelMC" , true , " Zvtx position selection for MC events?" };
166170 Configurable<bool > selTVXMC{" selTVXMC" , true , " apply TVX selection in MC?" };
@@ -834,20 +838,56 @@ struct Kstar892LightIon {
834838 return passTPC (candidate, pid);
835839 }
836840
837- case PIDStrategy::ThreePtDependent: // Apply pT-dependent TPC and TOF cuts using three pT regions
841+ /* case PIDStrategy::ThreePtDependent: // Apply pT-dependent TPC and TOF cuts using three pT regions
842+ {
843+ const int region = (candidate.pt() < selectionConfig.lowPtCutPid) ? 0 : (candidate.pt() < selectionConfig.highPtCutPid) ? 1
844+ : 2;
845+
846+ const float regionTPCCut = (pid == PIDParticle::kPion) ? TPCPiCuts3Pt[region] : TPCKaCuts3Pt[region];
847+
848+ const float regionTOFCut = (pid == PIDParticle::kPion) ? TOFPiCuts3Pt[region] : TOFKaCuts3Pt[region];
849+
850+ if (candidate.hasTOF()) {
851+ return (std::abs(tpcSigma(candidate, pid)) < regionTPCCut) && (std::abs(tofSigma(candidate, pid)) < regionTOFCut) && (candidate.beta() > selectionConfig.cfgTOFBetaCut);
852+ }
853+
854+ return (std::abs(tpcSigma(candidate, pid)) < regionTPCCut);
855+ } */
856+
857+ case PIDStrategy::ThreePtDependent: // Apply region-dependent PID cuts using one PID cut per pT region. In the middle pT region TOF is mandatory.
838858 {
839- const int region = (candidate.pt () < selectionConfig.lowPtCutPid ) ? 0 : (candidate.pt () < selectionConfig.highPtCutPid ) ? 1
840- : 2 ;
859+ const float pidCut = (candidate.pt () < selectionConfig.lowPtCutPid ) ? selectionConfig. lowPtPid : (candidate.pt () < selectionConfig.highPtCutPid ) ? selectionConfig. midPtPid
860+ : selectionConfig. highPtPid ;
841861
842- const float regionTPCCut = (pid == PIDParticle::kPion ) ? TPCPiCuts3Pt[region] : TPCKaCuts3Pt[region];
862+ // Low-pT region
863+ if (candidate.pt () < selectionConfig.lowPtCutPid ) {
864+ if (candidate.hasTOF ()) {
865+ if (!candidate.hasTOF () || candidate.beta () <= selectionConfig.cfgTOFBetaCut )
866+ return false ;
843867
844- const float regionTOFCut = (pid == PIDParticle::kPion ) ? TOFPiCuts3Pt[region] : TOFKaCuts3Pt[region];
868+ return combinedNSigma2 (candidate, pid) < pidCut * pidCut;
869+ }
845870
871+ return std::abs (tpcSigma (candidate, pid)) < pidCut;
872+ }
873+
874+ // Mid-pT region (TOF mandatory)
875+ if (candidate.pt () < selectionConfig.highPtCutPid ) {
876+ if (!candidate.hasTOF () || candidate.beta () <= selectionConfig.cfgTOFBetaCut )
877+ return false ;
878+
879+ return combinedNSigma2 (candidate, pid) < pidCut * pidCut;
880+ }
881+
882+ // High-pT region
846883 if (candidate.hasTOF ()) {
847- return (std::abs (tpcSigma (candidate, pid)) < regionTPCCut) && (std::abs (tofSigma (candidate, pid)) < regionTOFCut) && (candidate.beta () > selectionConfig.cfgTOFBetaCut );
884+ if (!candidate.hasTOF () || candidate.beta () <= selectionConfig.cfgTOFBetaCut )
885+ return false ;
886+
887+ return combinedNSigma2 (candidate, pid) < pidCut * pidCut;
848888 }
849889
850- return ( std::abs (tpcSigma (candidate, pid)) < regionTPCCut) ;
890+ return std::abs (tpcSigma (candidate, pid)) < pidCut ;
851891 }
852892
853893 case PIDStrategy::PIDCompare: // Apply independent TPC/TOF cuts below lowPtCutPid, within lowPtCutPid and highPtCutPid, require TOF and accept the track only if its combined nsigma is smaller than that of the alternate PID hypothesis and above highPtCutPid if TOF is available, accept if the track passes combined cut and if TOF is not available, check if it passes TPC cut
0 commit comments