@@ -112,6 +112,7 @@ struct phipbpb {
112112 Configurable<float > cfgTPCSharedcluster{" cfgTPCSharedcluster" , 0.4 , " Maximum Number of TPC shared cluster" };
113113 Configurable<bool > isDeepAngle{" isDeepAngle" , false , " Deep Angle cut" };
114114 Configurable<bool > ispTdepPID{" ispTdepPID" , true , " pT dependent PID" };
115+ Configurable<bool > isTOFOnly{" isTOFOnly" , false , " use TOF only PID" };
115116 Configurable<bool > checkAllCharge{" checkAllCharge" , true , " check all charge for MC weight" };
116117 Configurable<double > cfgDeepAngle{" cfgDeepAngle" , 0.04 , " Deep Angle cut value" };
117118 Configurable<double > confRapidity{" confRapidity" , 0.5 , " Rapidity cut" };
@@ -363,6 +364,15 @@ struct phipbpb {
363364 }
364365 return false ;
365366 }
367+
368+ template <typename T>
369+ bool selectionPID2 (const T& candidate)
370+ {
371+ if (candidate.hasTOF () && candidate.beta () > cfgCutTOFBeta && TMath::Abs (candidate.tofNSigmaKa ()) < nsigmaCutTOF) {
372+ return true ;
373+ }
374+ return false ;
375+ }
366376 // deep angle cut on pair to remove photon conversion
367377 template <typename T1, typename T2>
368378 bool selectionPair (const T1& candidate1, const T2& candidate2)
@@ -502,10 +512,13 @@ struct phipbpb {
502512 continue ;
503513 }
504514 // PID check
505- if (ispTdepPID && !selectionPIDpTdependent (track1)) {
515+ if (ispTdepPID && !isTOFOnly && ! selectionPIDpTdependent (track1)) {
506516 continue ;
507517 }
508- if (!ispTdepPID && !selectionPID (track1)) {
518+ if (!ispTdepPID && !isTOFOnly && !selectionPID (track1)) {
519+ continue ;
520+ }
521+ if (isTOFOnly && !selectionPID2 (track1)) {
509522 continue ;
510523 }
511524 if (useGlobalTrack && track1.p () < 1.0 && !(itsResponse.nSigmaITS <o2::track::PID::Kaon>(track1) > -2.5 && itsResponse.nSigmaITS <o2::track::PID::Kaon>(track1) < 2.5 )) {
@@ -537,10 +550,13 @@ struct phipbpb {
537550 continue ;
538551 }
539552 // PID check
540- if (ispTdepPID && !selectionPIDpTdependent (track2)) {
553+ if (ispTdepPID && !isTOFOnly && ! selectionPIDpTdependent (track2)) {
541554 continue ;
542555 }
543- if (!ispTdepPID && !selectionPID (track2)) {
556+ if (!ispTdepPID && !isTOFOnly && !selectionPID (track2)) {
557+ continue ;
558+ }
559+ if (isTOFOnly && !selectionPID2 (track2)) {
544560 continue ;
545561 }
546562 auto track2ID = track2.globalIndex ();
@@ -698,10 +714,13 @@ struct phipbpb {
698714 continue ;
699715 }
700716 // PID check
701- if (ispTdepPID && (!selectionPIDpTdependent (track1) || !selectionPIDpTdependent (track2))) {
717+ if (ispTdepPID && !isTOFOnly && (!selectionPIDpTdependent (track1) || !selectionPIDpTdependent (track2))) {
718+ continue ;
719+ }
720+ if (!ispTdepPID && !isTOFOnly && (!selectionPID (track1) || !selectionPID (track2))) {
702721 continue ;
703722 }
704- if (!ispTdepPID && (!selectionPID (track1) || !selectionPID (track2))) {
723+ if (isTOFOnly && (!selectionPID2 (track1) || !selectionPID2 (track2))) {
705724 continue ;
706725 }
707726 if (!selectionPair (track1, track2)) {
@@ -1114,7 +1133,17 @@ struct phipbpb {
11141133 if (!(track1PDG == 321 && track2PDG == 321 )) {
11151134 continue ;
11161135 }
1117- if (!selectionTrack (track1) || !selectionTrack (track2) || !selectionPIDpTdependent (track1) || !selectionPIDpTdependent (track2) || track1.sign () * track2.sign () > 0 ) {
1136+ if (!selectionTrack (track1) || !selectionTrack (track2) || track1.sign () * track2.sign () > 0 ) {
1137+ continue ;
1138+ }
1139+ // PID check
1140+ if (ispTdepPID && !isTOFOnly && (!selectionPIDpTdependent (track1) || !selectionPIDpTdependent (track2))) {
1141+ continue ;
1142+ }
1143+ if (!ispTdepPID && !isTOFOnly && (!selectionPID (track1) || !selectionPID (track2))) {
1144+ continue ;
1145+ }
1146+ if (isTOFOnly && (!selectionPID2 (track1) || !selectionPID2 (track2))) {
11181147 continue ;
11191148 }
11201149 for (auto & mothertrack1 : mctrack1.mothers_as <aod::McParticles>()) {
0 commit comments