@@ -67,13 +67,14 @@ struct doublephimeson {
6767 Configurable<bool > additionalEvsel{" additionalEvsel" , true , " Additional event selection" };
6868 Configurable<bool > isDeep{" isDeep" , true , " Store deep angle" };
6969 Configurable<float > cutMinNsigmaTPC{" cutMinNsigmaTPC" , -2.5 , " nsigma cut TPC" };
70- Configurable<float > cutNsigmaTPC{" cutNsigmaTPC" , 3.0 , " nsigma cut TPC" };
71- Configurable<float > cutNsigmaTOF{" cutNsigmaTOF" , 3.0 , " nsigma cut TOF" };
70+ Configurable<float > cutNsigmaTPC{" cutNsigmaTPC" , 2.5 , " nsigma cut TPC" };
71+ Configurable<float > cutNsigmaTOF{" cutNsigmaTOF" , 2.5 , " nsigma cut TOF" };
7272 Configurable<float > momTOFCut{" momTOFCut" , 1.8 , " minimum pT cut for madnatory TOF" };
7373 Configurable<float > maxKaonPt{" maxKaonPt" , 100.0 , " maximum kaon pt cut" };
7474 Configurable<float > cfgCrossPhiLow{" cfgCrossPhiLow" , 1.01 , " Lower edge of phi mass window for cross-pairing (ghost) veto" };
7575 Configurable<float > cfgCrossPhiHigh{" cfgCrossPhiHigh" , 1.03 , " Upper edge of phi mass window for cross-pairing (ghost) veto" };
7676 Configurable<bool > useParametrized{" useParametrized" , false , " Use pT dependent mass peak and width" };
77+ Configurable<bool > useCrossPairRejection{" useCrossPairRejection" , true , " Use cross pair phi signal compatibilaty" };
7778 // ------------------------------------------------------------
7879 // pT-dependent phi mass peak and width from single-phi BW fits
7980 //
@@ -337,17 +338,17 @@ struct doublephimeson {
337338 }
338339
339340 if (PIDStrategy == 1003 ) {
340- if (ptcand < 0.5 && TOFHit != 1 && nsigmaTPC > - 2.0 && nsigmaTPC < 2.0 ) {
341+ if (ptcand < 0.5 && TOFHit != 1 && std::abs ( nsigmaTPC) < cutNsigmaTPC ) {
341342 return true ;
342343 }
343- if (ptcand < 0.5 && TOFHit == 1 && std::sqrt (nsigmaTOF * nsigmaTOF + nsigmaTPC * nsigmaTPC) < 2.5 ) {
344+ if (ptcand < 0.5 && TOFHit == 1 && std::sqrt (nsigmaTOF * nsigmaTOF + nsigmaTPC * nsigmaTPC) < cutNsigmaTPC ) {
344345 return true ;
345346 }
346347 if (ptcand >= 0.5 ) {
347- if (TOFHit != 1 && nsigmaTPC > -2.0 && nsigmaTPC < 2.0 ) {
348+ if (TOFHit != 1 && nsigmaTPC > -2.0 && nsigmaTPC < cutNsigmaTPC ) {
348349 return true ;
349350 }
350- if (TOFHit == 1 && std::sqrt (nsigmaTOF * nsigmaTOF + nsigmaTPC * nsigmaTPC) < 2.5 ) {
351+ if (TOFHit == 1 && std::sqrt (nsigmaTOF * nsigmaTOF + nsigmaTPC * nsigmaTPC) < cutNsigmaTOF ) {
351352 return true ;
352353 }
353354 }
@@ -1695,7 +1696,6 @@ struct doublephimeson {
16951696 if (id2 <= id1) {
16961697 continue ;
16971698 }
1698-
16991699 const double kplus2pt = std::hypot (t2.phid1Px (), t2.phid1Py ());
17001700 const double kminus2pt = std::hypot (t2.phid2Px (), t2.phid2Py ());
17011701
@@ -1736,25 +1736,20 @@ struct doublephimeson {
17361736 t1.phid1Index () == t2.phid2Index () ||
17371737 t1.phid2Index () == t2.phid1Index () ||
17381738 t1.phid2Index () == t2.phid2Index ()) {
1739- // LOGF(info,"track share", t1.phid1Index(),t1.phid2Index(),t2.phid1Index(),t2.phid2Index());
1739+ LOGF (info, " track share %d %d %d %d " , t1.phid1Index (), t1.phid2Index (), t2.phid1Index (), t2.phid2Index ());
17401740 continue ;
17411741 }
1742- const double mCross12 = (k1p + k2m).M (); // K+ from phi1 + K- from phi2
1743- const double mCross21 = (k2p + k1m).M (); // K+ from phi2 + K- from phi1
1744-
1745- const bool cross12IsPhiLike = (mCross12 > cfgCrossPhiLow && mCross12 < cfgCrossPhiHigh);
1746- const bool cross21IsPhiLike = (mCross21 > cfgCrossPhiLow && mCross21 < cfgCrossPhiHigh);
17471742
1748- if (cross12IsPhiLike || cross21IsPhiLike) {
1749- LOGF (info,
1750- " Best-pairing rejected: mPhi1 = %3.4f, mPhi2 = %3.4f, mCross12 = %3.4f, mCross21 = %3.4f " ,
1751- phi1. M (),
1752- phi2.M (),
1753- mCross12 ,
1754- mCross21 ,
1755- pair. Pt (),
1756- pair. M ());
1757- continue ;
1743+ auto cross12 = k1p + k2m;
1744+ auto cross21 = k2p + k1m;
1745+ bool alternativePairValid = cross12. M () > cfgCrossPhiLow && cross12. M () < cfgCrossPhiHigh && cross21. M () > cfgCrossPhiLow && cross21. M () < cfgCrossPhiHigh;
1746+ if (alternativePairValid) {
1747+ float scoreOriginal = deltaMPhiNominal (phi1. M (), phi2.M ());
1748+ float scoreCross = deltaMPhiNominal (cross12. M (), cross21. M ());
1749+ if (useCrossPairRejection && (scoreCross < scoreOriginal)) {
1750+ LOGF (info, " Best-pairing rejected: original score = %3.4f, cross scoremPhi2 = %3.4f " , scoreOriginal, scoreCross);
1751+ continue ; // another pairing of these four tracks is better
1752+ }
17581753 }
17591754 histos.fill (HIST (" hPhiMass" ), phi1.M (), phi2.M (), pair.Pt ());
17601755 histos.fill (HIST (" hPhiMassNormalized" ), getNormalizedMPhi (phi1.M (), phi1.Pt ()), getNormalizedMPhi (phi2.M (), phi2.Pt ()), pair.Pt ());
@@ -1808,7 +1803,7 @@ struct doublephimeson {
18081803 }
18091804 if (pairPt > minExoticPt) {
18101805 histos.fill (HIST (" hPtCorrelation" ), pairPt, ptcorr);
1811- histos.fill (HIST (" hMassCent" ), p1.M (), p2.M (), collision.centrality ());
1806+ // histos.fill(HIST("hMassCent"), p1.M(), p2.M(), collision.centrality());
18121807 histos.fill (HIST (" SEMassUnlike_AllVars" ),
18131808 M,
18141809 pairPt,
0 commit comments