@@ -119,6 +119,7 @@ struct FemtoUniversePairTaskTrackPhi {
119119 Configurable<float > ConfTrackPtPIDLimit{" ConfTrackPtPIDLimit" , 0.5 , " Momentum threshold for change of the PID method (from using TPC to TPC and TOF)." };
120120 Configurable<float > ConfTrackPtLow{" ConfTrackPtLow" , 0.5 , " Lower limit of the hadron pT." };
121121 Configurable<float > ConfTrackPtHigh{" ConfTrackPtHigh" , 2.5 , " Higher limit of the hadron pT." };
122+ Configurable<bool > ConfTrackUseRun3PIDforKaons{" ConfTrackUseRun3PIDforKaons" , true , " Use Run3 PID for kaons from Veronika Barbasova's AN (https://alice-notes.web.cern.ch/node/1758). If this is on the other PID methods are ignored for kaons." };
122123
123124 // / Partitions for the track (particle 1)
124125 Partition<FilteredFemtoFullParticles> partsTrack = (aod::femtouniverseparticle::partType == uint8_t (aod::femtouniverseparticle::ParticleType::kTrack )) &&
@@ -247,42 +248,72 @@ struct FemtoUniversePairTaskTrackPhi {
247248 }
248249 }
249250
250- bool isKaonNSigma (float mom, float nsigmaTPCK, float nsigmaTOFK)
251+ bool isKaonNSigma (float mom, bool hasTOF, float nsigmaTPCK, float nsigmaTOFK)
251252 {
252- if (mom < 0.3 ) { // 0.0-0.3
253- if (std::abs (nsigmaTPCK) < 3.0 ) {
254- return true ;
255- } else {
256- return false ;
257- }
258- } else if (mom < 0.45 ) { // 0.30 - 0.45
259- if (std::abs (nsigmaTPCK) < 2.0 ) {
260- return true ;
261- } else {
262- return false ;
253+ if (ConfTrackUseRun3PIDforKaons) {
254+ if (mom < 0.5 ) {
255+ if (std::abs (nsigmaTPCK) < 3.0 ) {
256+ return true ;
257+ } else {
258+ return false ;
259+ }
260+ } else if (mom >= 0.5 ) {
261+ if (hasTOF) // if TOF is available, use combine nsigma
262+ {
263+ if (std::hypot (nsigmaTOFK, nsigmaTPCK) < 3.0 ) {
264+ return true ;
265+ } else {
266+ return false ;
267+ }
268+ } else // if TOF is not available, use TPC nsigma only
269+ {
270+ if (std::abs (nsigmaTPCK) < 3.0 ) {
271+ return true ;
272+ } else {
273+ return false ;
274+ }
275+ }
263276 }
264- } else if (mom < 0.55 ) { // 0.45-0.55
265- if (std::abs (nsigmaTPCK) < 1.0 ) {
266- return true ;
267- } else {
277+
278+ else {
268279 return false ;
269280 }
270- } else if (mom < 1.5 ) { // 0.55-1.5 (now we use TPC and TOF)
271- if (( std::abs (nsigmaTOFK) < 3.0 ) && ( std::abs (nsigmaTPCK) < 3.0 )) {
272- {
281+ } else {
282+ if (mom < 0.3 ) { // 0.0-0.3
283+ if ( std::abs (nsigmaTPCK) < 3.0 ) {
273284 return true ;
285+ } else {
286+ return false ;
287+ }
288+ } else if (mom < 0.45 ) { // 0.30 - 0.45
289+ if (std::abs (nsigmaTPCK) < 2.0 ) {
290+ return true ;
291+ } else {
292+ return false ;
293+ }
294+ } else if (mom < 0.55 ) { // 0.45-0.55
295+ if (std::abs (nsigmaTPCK) < 1.0 ) {
296+ return true ;
297+ } else {
298+ return false ;
299+ }
300+ } else if (mom < 1.5 ) { // 0.55-1.5 (now we use TPC and TOF)
301+ if ((std::abs (nsigmaTOFK) < 3.0 ) && (std::abs (nsigmaTPCK) < 3.0 )) {
302+ {
303+ return true ;
304+ }
305+ } else {
306+ return false ;
307+ }
308+ } else if (mom > 1.5 ) { // 1.5 -
309+ if ((std::abs (nsigmaTOFK) < 2.0 ) && (std::abs (nsigmaTPCK) < 3.0 )) {
310+ return true ;
311+ } else {
312+ return false ;
274313 }
275314 } else {
276315 return false ;
277316 }
278- } else if (mom > 1.5 ) { // 1.5 -
279- if ((std::abs (nsigmaTOFK) < 2.0 ) && (std::abs (nsigmaTPCK) < 3.0 )) {
280- return true ;
281- } else {
282- return false ;
283- }
284- } else {
285- return false ;
286317 }
287318 }
288319
@@ -352,6 +383,8 @@ struct FemtoUniversePairTaskTrackPhi {
352383
353384 bool isParticleNSigmaAccepted (float mom, float nsigmaTPCPr, float nsigmaTOFPr, float nsigmaTPCPi, float nsigmaTOFPi, float nsigmaTPCK, float nsigmaTOFK)
354385 {
386+ bool hasTOF = std::isfinite (nsigmaTOFPr) || std::isfinite (nsigmaTOFPi) || std::isfinite (nsigmaTOFK);
387+
355388 switch (ConfTrackPDGCode) {
356389 case 2212 : // Proton
357390 case -2212 : // anty Proton
@@ -363,7 +396,7 @@ struct FemtoUniversePairTaskTrackPhi {
363396 break ;
364397 case 321 : // Kaon+
365398 case -321 : // Kaon-
366- return isKaonNSigma (mom, nsigmaTPCK, nsigmaTOFK);
399+ return isKaonNSigma (mom, hasTOF, nsigmaTPCK, nsigmaTOFK);
367400 break ;
368401 default :
369402 return false ;
0 commit comments