@@ -331,22 +331,21 @@ struct FemtoUniverseEfficiencyBase {
331331 return (std::abs (nsigmaTPCK) < ConfKaonSelection.confKaonNsigmaTPCfrom08to15Run2 && std::abs (nsigmaTOFK) < ConfKaonSelection.confKaonNsigmaTOFfrom08to15Run2 );
332332 }
333333 return false ;
334- } else {
335- if (mom < ConfKaonSelection.confMomKaonRun3 ) { // 0.0-0.3 GeV/c
336- return std::abs (nsigmaTPCK) < ConfKaonSelection.confKaonNsigmaTPCfrom0to03 ;
337- }
338- if (mom < ConfKaonSelection.confMomKaon045 ) { // 0.30 - 0.45 GeV/c
339- return std::abs (nsigmaTPCK) < ConfKaonSelection.confKaonNsigmaTPCfrom03to045 ;
340- }
341- if (mom < ConfKaonSelection.confMomKaon055 ) { // 0.45-0.55 GeV/c
342- return std::abs (nsigmaTPCK) < ConfKaonSelection.confKaonNsigmaTPCfrom045to055 ;
343- }
344- if (mom < ConfKaonSelection.confMomKaon15 ) { // 0.55-1.5 GeV/c (now we use TPC and TOF)
345- return ((std::abs (nsigmaTOFK) < ConfKaonSelection.confKaonNsigmaTOFfrom055to15 ) && (std::abs (nsigmaTPCK) < ConfKaonSelection.confKaonNsigmaTPCfrom055to15 ));
346- }
347- // mom > ConfKaonSelection.confMomKaon15) | momentum > 1.5 GeV/c
348- return ((std::abs (nsigmaTOFK) < ConfKaonSelection.confKaonNsigmaTOFfrom15 ) && (std::abs (nsigmaTPCK) < ConfKaonSelection.confKaonNsigmaTPCfrom15 ));
349334 }
335+ if (mom < ConfKaonSelection.confMomKaonRun3 ) { // 0.0-0.3 GeV/c
336+ return std::abs (nsigmaTPCK) < ConfKaonSelection.confKaonNsigmaTPCfrom0to03 ;
337+ }
338+ if (mom < ConfKaonSelection.confMomKaon045 ) { // 0.30 - 0.45 GeV/c
339+ return std::abs (nsigmaTPCK) < ConfKaonSelection.confKaonNsigmaTPCfrom03to045 ;
340+ }
341+ if (mom < ConfKaonSelection.confMomKaon055 ) { // 0.45-0.55 GeV/c
342+ return std::abs (nsigmaTPCK) < ConfKaonSelection.confKaonNsigmaTPCfrom045to055 ;
343+ }
344+ if (mom < ConfKaonSelection.confMomKaon15 ) { // 0.55-1.5 GeV/c (now we use TPC and TOF)
345+ return ((std::abs (nsigmaTOFK) < ConfKaonSelection.confKaonNsigmaTOFfrom055to15 ) && (std::abs (nsigmaTPCK) < ConfKaonSelection.confKaonNsigmaTPCfrom055to15 ));
346+ }
347+ // mom > ConfKaonSelection.confMomKaon15) | momentum > 1.5 GeV/c
348+ return ((std::abs (nsigmaTOFK) < ConfKaonSelection.confKaonNsigmaTOFfrom15 ) && (std::abs (nsigmaTPCK) < ConfKaonSelection.confKaonNsigmaTPCfrom15 ));
350349 }
351350
352351 bool isKaonNSigmaLF (bool partHasTof, float mom, float nsigmaTPCK, float nsigmaTOFK)
@@ -540,8 +539,8 @@ struct FemtoUniverseEfficiencyBase {
540539
541540 bool invMLambda (float invMassLambda, float invMassAntiLambda)
542541 {
543- return !(( invMassLambda < confV0InvMassLowLimit || invMassLambda > confV0InvMassUpLimit) &&
544- (invMassAntiLambda < confV0InvMassLowLimit || invMassAntiLambda > confV0InvMassUpLimit) );
542+ return ( invMassLambda >= confV0InvMassLowLimit && invMassLambda <= confV0InvMassUpLimit) ||
543+ (invMassAntiLambda >= confV0InvMassLowLimit && invMassAntiLambda <= confV0InvMassUpLimit);
545544 }
546545
547546 template <typename CollisionType>
0 commit comments