@@ -539,6 +539,56 @@ struct AngularCorrelationsInJets {
539539 return true ;
540540 }
541541
542+ bool isSmartProtonPID (const auto & track)
543+ {
544+ if (track.sign () < 0 )
545+ return false ;
546+
547+ float pt = track.pt ();
548+ float maxSigmaTPC = 4.0 ;
549+ float maxSigmaTOF = 3.0 ;
550+
551+ // Loosen PID at high momentum
552+ if (pt > 1.5 ) {
553+ maxSigmaTPC = 3.0 ;
554+ maxSigmaTOF = 2.0 ;
555+ }
556+ if (pt > 3.0 ) {
557+ maxSigmaTPC = 2.0 ;
558+ maxSigmaTOF = 1.0 ;
559+ }
560+
561+ bool tpcOK = std::abs (track.tpcNSigmaProton ()) < maxSigmaTPC;
562+ bool tofOK = track.hasTOF () ? std::abs (track.tofNSigmaProton ()) < maxSigmaTOF : false ;
563+
564+ return tpcOK || tofOK;
565+ }
566+
567+ bool isSmartAntiProtonPID (const auto & track)
568+ {
569+ if (track.sign () > 0 )
570+ return false ;
571+
572+ float pt = track.pt ();
573+ float maxSigmaTPC = 4.0 ;
574+ float maxSigmaTOF = 3.0 ;
575+
576+ // Loosen PID at high momentum
577+ if (pt > 1.5 ) {
578+ maxSigmaTPC = 3.0 ;
579+ maxSigmaTOF = 2.0 ;
580+ }
581+ if (pt > 3.0 ) {
582+ maxSigmaTPC = 2.0 ;
583+ maxSigmaTOF = 1.0 ;
584+ }
585+
586+ bool tpcOK = std::abs (track.tpcNSigmaProton ()) < maxSigmaTPC;
587+ bool tofOK = track.hasTOF () ? std::abs (track.tofNSigmaProton ()) < maxSigmaTOF : false ;
588+
589+ return tpcOK || tofOK;
590+ }
591+
542592 template <typename T>
543593 bool isNucleus (const T& track)
544594 {
@@ -1085,12 +1135,14 @@ struct AngularCorrelationsInJets {
10851135 }
10861136 }
10871137 if (measureCorrelations) {
1088- if (isProton (jetParticle, true )) {
1138+ if (isSmartProtonPID (jetParticle)) {
1139+ // if (isProton(jetParticle, true)) { // while debugging issue for proton correlations
10891140 registryData.fill (HIST (" trackProtocol" ), 5 ); // # high purity protons
10901141 jetProtons.emplace_back (jetParticle);
10911142 registryData.fill (HIST (" dcaZJetProton" ), jetParticle.pt (), jetParticle.dcaZ ());
10921143 }
1093- if (isAntiproton (jetParticle, true )) {
1144+ if (isSmartAntiProtonPID (jetParticle)) {
1145+ // if (isAntiproton(jetParticle, true)) { // while debugging issue for antiproton correlations
10941146 registryData.fill (HIST (" trackProtocol" ), 7 ); // # high purity antiprotons
10951147 jetAntiprotons.emplace_back (jetParticle);
10961148 registryData.fill (HIST (" dcaZJetAntiproton" ), jetParticle.pt (), jetParticle.dcaZ ());
0 commit comments