@@ -100,8 +100,7 @@ struct HigherMassResonances {
100100 Configurable<bool > isApplyDCAv0topv{" isApplyDCAv0topv" , false , " DCA V0 to PV" };
101101 Configurable<bool > hasTPC{" hasTPC" , false , " TPC" };
102102 Configurable<bool > isselectTWOKsOnly{" isselectTWOKsOnly" , true , " Select only events with two K0s" };
103- Configurable<bool > isapplyPairRapidityRec{" isapplyPairRapidityRec" , false , " Apply pair rapidity cut on reconstructed mother (after already applying rapidity cut on generated mother)" };
104- Configurable<bool > isapplyPairRapidityGen{" isapplyPairRapidityGen" , false , " Apply pair rapidity cut on generated mother (before applying rapidity cut on reconstructed mother)" };
103+ Configurable<bool > isapplyPairRapidityMC{" isapplyPairRapidityMC" , false , " Apply pair rapidity cut on reconstructed mother (after already applying rapidity cut on generated mother)" };
105104 Configurable<int > cSelectMultEstimator{" cSelectMultEstimator" , 0 , " Select multiplicity estimator: 0 - FT0M, 1 - FT0A, 2 - FT0C" };
106105 // Configurable<int> configOccCut{"configOccCut", 1000, "Occupancy cut"};
107106 // Configurable<bool> isVertexTOFMatched{"isVertexTOFMatched", false, "Vertex TOF Matched"};
@@ -121,12 +120,15 @@ struct HigherMassResonances {
121120 Configurable<bool > isNoITSROFrameBorder{" isNoITSROFrameBorder" , true , " kNoITSROFrameBorder" };
122121
123122 // Configurable parameters for V0 selection
123+ Configurable<float > confV0PtMin{" confV0PtMin" , 0 .f , " Minimum transverse momentum of V0" };
124+ Configurable<float > confV0PtMax{" confV0PtMax" , 100 .f , " Maximum transverse momentum of V0" };
125+ Configurable<float > confPiPtMin{" confPiPtMin" , 0 .1f , " Minimum transverse momentum of pion daughter" };
126+ Configurable<float > confPiPtMax{" confPiPtMax" , 100 .f , " Maximum transverse momentum of pion daughter" };
124127 Configurable<float > cMaxDeltaM{" cMaxDeltaM" , 0 .01f , " Sqrt((m1-mPDG)^2 + (m2-mPDG)^2) < cMaxDeltaM)" };
125128 Configurable<float > confV0DCADaughMax{" confV0DCADaughMax" , 1 .0f , " DCA b/w V0 daughters" };
126129 Configurable<float > v0DCApostoPV{" v0DCApostoPV" , 0.06 , " DCA Pos To PV" };
127130 Configurable<float > v0DCAnegtoPV{" v0DCAnegtoPV" , 0.06 , " DCA Neg To PV" };
128131 Configurable<double > cMaxV0DCA{" cMaxV0DCA" , 0.5 , " DCA V0 to PV" };
129- Configurable<float > confV0PtMin{" confV0PtMin" , 0 .f , " Minimum transverse momentum of V0" };
130132 Configurable<float > confV0CPAMin{" confV0CPAMin" , 0 .97f , " Minimum CPA of V0" };
131133 Configurable<float > confV0TranRadV0Min{" confV0TranRadV0Min" , 0 .5f , " Minimum transverse radius" };
132134 // Configurable<float> confV0TranRadV0Max{"confV0TranRadV0Max", 200.f, "Maximum transverse radius"};
@@ -138,11 +140,11 @@ struct HigherMassResonances {
138140 Configurable<float > confDaughPIDCutTPC{" confDaughPIDCutTPC" , 5 , " PID selections for KS0 daughters" };
139141 Configurable<float > confDaughPIDCutTOF{" confDaughPIDCutTOF" , 5 , " PID selections for KS0 daughters in TOF" };
140142 Configurable<float > confKsrapidity{" confKsrapidity" , 0 .5f , " Rapidity cut on K0s" };
141- Configurable<float > angSepCut{" angSepCut" , 0 .01f , " Angular separation cut" };
142- Configurable<bool > isapplyAngSepCut{" isapplyAngSepCut" , false , " Apply angular separation cut" };
143143 // Configurable<bool> isStandardV0{"isStandardV0", false, "Standard V0 selection"};
144144 Configurable<bool > isApplyEtaCutK0s{" isApplyEtaCutK0s" , false , " Apply eta cut on K0s daughters" };
145145 Configurable<float > cfgETAcut{" cfgETAcut" , 0 .8f , " Track ETA cut" };
146+ Configurable<float > deltaRDaugherCut{" deltaRDaugherCut" , 0 .001f , " DeltaR cut on V0 daughters" };
147+ Configurable<bool > deltaRK0sCut{" deltaRK0sCut" , false , " Apply deltaR cut between two K0s" };
146148
147149 // Configurable for track selection and multiplicity
148150 Configurable<float > cfgPTcut{" cfgPTcut" , 0 .2f , " Track PT cut" };
@@ -277,7 +279,7 @@ struct HigherMassResonances {
277279 hv0label->GetXaxis ()->SetBinLabel (1 , " All Tracks" );
278280 hv0label->GetXaxis ()->SetBinLabel (2 , " DCA V0 to PV" );
279281 hv0label->GetXaxis ()->SetBinLabel (3 , " y K0s" );
280- hv0label->GetXaxis ()->SetBinLabel (4 , " Min V0 pT" );
282+ hv0label->GetXaxis ()->SetBinLabel (4 , " V0 pT cut " );
281283 hv0label->GetXaxis ()->SetBinLabel (5 , " Daughter DCA" );
282284 hv0label->GetXaxis ()->SetBinLabel (6 , " CosPA" );
283285 hv0label->GetXaxis ()->SetBinLabel (7 , " Decay Radius" );
@@ -293,8 +295,11 @@ struct HigherMassResonances {
293295 hv0DauLabel->GetXaxis ()->SetBinLabel (4 , " TPC CRFC" );
294296 hv0DauLabel->GetXaxis ()->SetBinLabel (5 , " TPC Chi2NCL" );
295297 hv0DauLabel->GetXaxis ()->SetBinLabel (6 , " Charge" );
296- hv0DauLabel->GetXaxis ()->SetBinLabel (7 , " Eta" );
297- hv0DauLabel->GetXaxis ()->SetBinLabel (8 , " PID TPC" );
298+ hv0DauLabel->GetXaxis ()->SetBinLabel (7 , " Charge" );
299+ hv0DauLabel->GetXaxis ()->SetBinLabel (8 , " Eta" );
300+ hv0DauLabel->GetXaxis ()->SetBinLabel (9 , " PID TPC" );
301+ hv0DauLabel->GetXaxis ()->SetBinLabel (10 , " PID TOF" );
302+ hv0DauLabel->GetXaxis ()->SetBinLabel (11 , " Pt cut" );
298303
299304 std::shared_ptr<TH1> hv0labelmcrec = hMChists.get <TH1>(HIST (" events_checkrec" ));
300305 hv0labelmcrec->GetXaxis ()->SetBinLabel (1 , " All Tracks" );
@@ -347,6 +352,7 @@ struct HigherMassResonances {
347352 rKzeroShort.add (" hV0CosPA" , " hV0CosPA" , {HistType::kTH1F , {{100 , 0 .96f , 1 .1f }}});
348353 rKzeroShort.add (" hLT" , " hLT" , {HistType::kTH1F , {{100 , 0 .0f , 50 .0f }}});
349354 rKzeroShort.add (" angularSeparation" , " Angular distribution between two K0s vs pT" , {HistType::kTH1F , {{200 , 0 .0f , 4 .0f }}});
355+ rKzeroShort.add (" hDauDeltaR" , " Delta R of positive and negative daughers" , {HistType::kTHnSparseF , {angleSepAxis, angleSepAxis}});
350356 }
351357 rKzeroShort.add (" NksProduced" , " Number of K0s produced" , kTH1I , {{15 , -0.5 , 14.5 }});
352358
@@ -500,7 +506,7 @@ struct HigherMassResonances {
500506 }
501507 rEventSelection.fill (HIST (" htrackscheck_v0" ), 2.5 );
502508
503- if (pT < config.confV0PtMin ) {
509+ if (pT < config.confV0PtMin || pT > config. confV0PtMax ) {
504510 return false ;
505511 }
506512 rEventSelection.fill (HIST (" htrackscheck_v0" ), 3.5 );
@@ -612,6 +618,12 @@ struct HigherMassResonances {
612618 if (std::abs (v0candidate.tofNSigmaK0PiMinus ()) > config.confDaughPIDCutTOF && v0candidate.negativeHasTOF ()) {
613619 return false ;
614620 }
621+ rEventSelection.fill (HIST (" htrackscheck_v0_daughters" ), 9.5 );
622+
623+ if (track.pt () < config.confPiPtMin || track.pt () > config.confPiPtMax ) {
624+ return false ;
625+ }
626+ rEventSelection.fill (HIST (" htrackscheck_v0_daughters" ), 10.5 );
615627
616628 if (config.qAPID ) {
617629 (charge == 1 ) ? rKzeroShort.fill (HIST (" hNSigmaPosPionK0s_after" ), track.tpcInnerParam (), track.tpcNSigmaPi ()) : rKzeroShort.fill (HIST (" hNSigmaNegPionK0s_after" ), track.tpcInnerParam (), track.tpcNSigmaPi ());
@@ -675,34 +687,13 @@ struct HigherMassResonances {
675687 return false ;
676688 }
677689
678- // rKzeroShort.fill(HIST("negative_pt"), negTrackExtra.pt());
679- // rKzeroShort.fill(HIST("positive_pt"), posTrackExtra.pt());
680- // rKzeroShort.fill(HIST("negative_eta"), negTrackExtra.eta());
681- // rKzeroShort.fill(HIST("positive_eta"), posTrackExtra.eta());
682- // rKzeroShort.fill(HIST("negative_phi"), negTrackExtra.phi());
683- // rKzeroShort.fill(HIST("positive_phi"), posTrackExtra.phi());
684- return true ;
685- }
690+ // double deltaRDaugherPos = std::sqrt(TVector2::Phi_mpi_pi(posTrackExtra.phi() - negTrackExtra.phi()) * TVector2::Phi_mpi_pi(posTrackExtra.phi() - negTrackExtra.phi()) + (posTrackExtra.eta() - negTrackExtra.eta()) * (posTrackExtra.eta() - negTrackExtra.eta()));
691+ // double deltaRDaugherNeg = std::sqrt(TVector2::Phi_mpi_pi(posTrackExtra.phi() - negTrackExtra.phi()) * TVector2::Phi_mpi_pi(posTrackExtra.phi() - negTrackExtra.phi()) + (posTrackExtra.eta() - negTrackExtra.eta()) * (posTrackExtra.eta() - negTrackExtra.eta()));
692+
693+ // if (config.qAv0) {
694+ // rKzeroShort.fill(HIST("hDauDeltaR"), deltaRDaugherPos, deltaRDaugherNeg);
695+ // }
686696
687- // Angular separation cut on KsKs pairs
688- template <typename T1, typename T2>
689- bool applyAngSep (const T1& candidate1, const T2& candidate2)
690- {
691- double eta1, eta2, phi1, phi2;
692- eta1 = candidate1.eta ();
693- eta2 = candidate2.eta ();
694- phi1 = candidate1.phi ();
695- phi2 = candidate2.phi ();
696-
697- const double dphi = TVector2::Phi_mpi_pi (phi1 - phi2);
698- const double deta = eta1 - eta2;
699- double angle = std::sqrt (dphi * dphi + deta * deta);
700- if (config.qAv0 ) {
701- rKzeroShort.fill (HIST (" angularSeparation" ), angle);
702- }
703- if (config.isapplyAngSepCut && angle > config.angSepCut ) {
704- return false ;
705- }
706697 return true ;
707698 }
708699
@@ -976,34 +967,6 @@ struct HigherMassResonances {
976967 continue ;
977968 }
978969
979- // if (postrack1.hasTOF()) {
980- // double nTOFSigmaPos1{postrack1.tofNSigmaPi()};
981- // if ((std::abs(nTOFSigmaPos1) > config.confDaughPIDCutTOF)) {
982- // continue;
983- // }
984- // }
985-
986- // if (negtrack1.hasTOF()) {
987- // double nTOFSigmaNeg1{negtrack1.tofNSigmaPi()};
988- // if (std::abs(nTOFSigmaNeg1) > config.confDaughPIDCutTOF) {
989- // continue;
990- // }
991- // }
992-
993- // if (postrack2.hasTOF()) {
994- // double nTOFSigmaPos2{postrack2.tofNSigmaPi()};
995- // if ((std::abs(nTOFSigmaPos2) > config.confDaughPIDCutTOF)) {
996- // continue;
997- // }
998- // }
999-
1000- // if (negtrack2.hasTOF()) {
1001- // double nTOFSigmaNeg2{negtrack2.tofNSigmaPi()};
1002- // if (std::abs(nTOFSigmaNeg2) > config.confDaughPIDCutTOF) {
1003- // continue;
1004- // }
1005- // }
1006-
1007970 if (std::find (v0indexes.begin (), v0indexes.end (), v1.globalIndex ()) == v0indexes.end ()) {
1008971 v0indexes.push_back (v1.globalIndex ());
1009972 }
@@ -1019,7 +982,14 @@ struct HigherMassResonances {
1019982 continue ;
1020983 }
1021984
1022- if (!applyAngSep (v1, v2)) {
985+ double deltaRDaugherPos = std::sqrt (TVector2::Phi_mpi_pi (postrack1.phi () - negtrack1.phi ()) * TVector2::Phi_mpi_pi (postrack1.phi () - negtrack1.phi ()) + (postrack1.eta () - negtrack1.eta ()) * (postrack1.eta () - negtrack1.eta ()));
986+ double deltaRDaugherNeg = std::sqrt (TVector2::Phi_mpi_pi (postrack2.phi () - negtrack2.phi ()) * TVector2::Phi_mpi_pi (postrack2.phi () - negtrack2.phi ()) + (postrack2.eta () - negtrack2.eta ()) * (postrack2.eta () - negtrack2.eta ()));
987+
988+ if (config.qAv0 ) {
989+ rKzeroShort.fill (HIST (" hDauDeltaR" ), deltaRDaugherPos, deltaRDaugherNeg);
990+ }
991+
992+ if (deltaRDaugherPos < config.deltaRDaugherCut || deltaRDaugherNeg < config.deltaRDaugherCut ) {
1023993 continue ;
1024994 }
1025995
@@ -1049,19 +1019,27 @@ struct HigherMassResonances {
10491019 // rKzeroShort.fill(HIST("hK0ShortMassCorrAfterCut"), v1.mK0Short(), v2.mK0Short());
10501020 // }
10511021
1052- const double ptCorr = std::abs (daughter1 .Pt () + daughter2 .Pt ()) / mother.Pt ();
1022+ const double ptCorr = (mother .Pt () - daughter1 .Pt () != 0 .) ? daughter1. Pt () / ( mother.Pt () - daughter1. Pt ()) : 0 . ;
10531023 if (config.qAv0 ) {
10541024 rKzeroShort.fill (HIST (" hK0sPtCorrelation" ), ptCorr);
10551025 }
10561026
1057- if (!config.isselectTWOKsOnly && !config.qAOptimisation )
1027+ double deltaRvalue = std::sqrt (TVector2::Phi_mpi_pi (v1.phi () - v2.phi ()) * TVector2::Phi_mpi_pi (v1.phi () - v2.phi ()) + (v1.eta () - v2.eta ()) * (v1.eta () - v2.eta ()));
1028+
1029+ if (!config.qAOptimisation ) {
1030+ if (deltaRvalue < config.deltaRK0sCut ) {
1031+ continue ;
1032+ }
1033+ }
1034+
1035+ if (!config.isselectTWOKsOnly && !config.qAOptimisation ) {
10581036 fillInvMass (mother, multiplicity, daughter1, daughter2, isMix);
1037+ }
10591038
10601039 if (!config.isselectTWOKsOnly && config.qAOptimisation ) {
1061- double angSepValue = std::sqrt (TVector2::Phi_mpi_pi (v1.phi () - v2.phi ()) * TVector2::Phi_mpi_pi (v1.phi () - v2.phi ()) + (v1.eta () - v2.eta ()) * (v1.eta () - v2.eta ()));
10621040
10631041 if (std::abs (mother.Rapidity ()) < config.rapidityMotherData ) {
1064- hglue.fill (HIST (" h3glueInvMassDS" ), multiplicity, mother.Pt (), mother.M (), deltaMass, angSepValue , ptCorr);
1042+ hglue.fill (HIST (" h3glueInvMassDS" ), multiplicity, mother.Pt (), mother.M (), deltaMass, deltaRvalue , ptCorr);
10651043 }
10661044
10671045 for (int i = 0 ; i < config.cRotations ; i++) {
@@ -1074,7 +1052,7 @@ struct HigherMassResonances {
10741052 double pTcorrRot = std::abs (daughterRot.Pt () + daughter2.Pt ()) / motherRot.Pt ();
10751053
10761054 if (motherRot.Rapidity () < config.rapidityMotherData )
1077- hglue.fill (HIST (" h3glueInvMassRot" ), multiplicity, motherRot.Pt (), motherRot.M (), deltaMass, angSepValue , pTcorrRot);
1055+ hglue.fill (HIST (" h3glueInvMassRot" ), multiplicity, motherRot.Pt (), motherRot.M (), deltaMass, deltaRvalue , pTcorrRot);
10781056 }
10791057 }
10801058 }
@@ -1162,20 +1140,39 @@ struct HigherMassResonances {
11621140 continue ;
11631141 }
11641142
1143+ double deltaRDaugherPos = std::sqrt (TVector2::Phi_mpi_pi (postrack1.phi () - negtrack1.phi ()) * TVector2::Phi_mpi_pi (postrack1.phi () - negtrack1.phi ()) + (postrack1.eta () - negtrack1.eta ()) * (postrack1.eta () - negtrack1.eta ()));
1144+ double deltaRDaugherNeg = std::sqrt (TVector2::Phi_mpi_pi (postrack2.phi () - negtrack2.phi ()) * TVector2::Phi_mpi_pi (postrack2.phi () - negtrack2.phi ()) + (postrack2.eta () - negtrack2.eta ()) * (postrack2.eta () - negtrack2.eta ()));
1145+
1146+ if (deltaRDaugherPos < config.deltaRDaugherCut || deltaRDaugherNeg < config.deltaRDaugherCut ) {
1147+ continue ;
1148+ }
1149+
1150+ if (config.isApplyEtaCutK0s && (t1.eta () < config.confDaughEta || t2.eta () < config.confDaughEta )) {
1151+ continue ;
1152+ }
1153+
11651154 daughter1 = ROOT::Math::PxPyPzMVector (t1.px (), t1.py (), t1.pz (), o2::constants::physics::MassK0Short); // Kshort
11661155 daughter2 = ROOT::Math::PxPyPzMVector (t2.px (), t2.py (), t2.pz (), o2::constants::physics::MassK0Short); // Kshort
11671156
11681157 mother = daughter1 + daughter2; // invariant mass of Kshort pair
1158+ const double deltaMass = deltaM (t1.mK0Short (), t2.mK0Short ());
1159+
1160+ if (!config.qAOptimisation ) {
1161+ if (deltaMass > config.cMaxDeltaM ) {
1162+ continue ;
1163+ }
1164+ }
1165+
11691166 isMix = true ;
11701167 if (!config.qAOptimisation )
11711168 fillInvMass (mother, multiplicity, daughter1, daughter2, isMix);
11721169
11731170 if (config.qAOptimisation ) {
1174- double angSepValue = std::sqrt (TVector2::Phi_mpi_pi (daughter1.phi () - daughter2.phi ()) * TVector2::Phi_mpi_pi (daughter1.phi () - daughter2.phi ()) + (daughter1.eta () - daughter2.eta ()) * (daughter1.eta () - daughter2.eta ()));
1171+ double deltaRvalue = std::sqrt (TVector2::Phi_mpi_pi (daughter1.phi () - daughter2.phi ()) * TVector2::Phi_mpi_pi (daughter1.phi () - daughter2.phi ()) + (daughter1.eta () - daughter2.eta ()) * (daughter1.eta () - daughter2.eta ()));
11751172 const double deltaMass = deltaM (t1.mK0Short (), t2.mK0Short ());
11761173 const double ptCorr = std::abs (daughter1.Pt () + daughter2.Pt ()) / mother.Pt ();
11771174 if (std::abs (mother.Rapidity ()) < config.rapidityMotherData ) {
1178- hglue.fill (HIST (" h3glueInvMassME" ), multiplicity, mother.Pt (), mother.M (), deltaMass, angSepValue , ptCorr);
1175+ hglue.fill (HIST (" h3glueInvMassME" ), multiplicity, mother.Pt (), mother.M (), deltaMass, deltaRvalue , ptCorr);
11791176 }
11801177 }
11811178 }
@@ -1294,7 +1291,7 @@ struct HigherMassResonances {
12941291 hMChists.fill (HIST (" GenEta" ), mcParticle.eta ());
12951292 hMChists.fill (HIST (" GenPhi" ), mcParticle.phi ());
12961293
1297- if (config.isapplyPairRapidityGen && std::abs (lResonanceGen1.Rapidity ()) >= config.rapidityMotherData ) {
1294+ if (config.isapplyPairRapidityMC && std::abs (lResonanceGen1.Rapidity ()) >= config.rapidityMotherData ) {
12981295 continue ;
12991296 }
13001297
@@ -1475,7 +1472,7 @@ struct HigherMassResonances {
14751472 hMChists.fill (HIST (" RecPhi" ), mothertrack1.phi ());
14761473 hMChists.fill (HIST (" RecEta" ), mothertrack1.eta ());
14771474
1478- if (config.isapplyPairRapidityRec && std::abs (mother.Rapidity ()) >= config.rapidityMotherData ) {
1475+ if (config.isapplyPairRapidityMC && std::abs (mother.Rapidity ()) >= config.rapidityMotherData ) {
14791476 continue ;
14801477 }
14811478
@@ -1544,10 +1541,6 @@ struct HigherMassResonances {
15441541 continue ;
15451542 }
15461543
1547- if (!applyAngSep (v1, v2)) {
1548- continue ;
1549- }
1550-
15511544 allConditionsMet = 1 ;
15521545 daughter1 = ROOT::Math::PxPyPzMVector (v1.px (), v1.py (), v1.pz (), o2::constants::physics::MassK0Short); // Kshort
15531546 daughter2 = ROOT::Math::PxPyPzMVector (v2.px (), v2.py (), v2.pz (), o2::constants::physics::MassK0Short); // Kshort
@@ -1568,19 +1561,26 @@ struct HigherMassResonances {
15681561 // rKzeroShort.fill(HIST("hK0ShortMassCorrAfterCut"), v1.mK0Short(), v2.mK0Short());
15691562 // }
15701563
1571- const double ptCorr = std::abs (daughter1 .Pt () + daughter2 .Pt ()) / mother.Pt ();
1564+ const double ptCorr = (mother .Pt () - daughter1 .Pt () != 0 .) ? daughter1. Pt () / ( mother.Pt () - daughter1. Pt ()) : 0 . ;
15721565 if (config.qAv0 ) {
15731566 rKzeroShort.fill (HIST (" hK0sPtCorrelation" ), ptCorr);
15741567 }
15751568
1569+ double deltaRvalue = std::sqrt (TVector2::Phi_mpi_pi (v1.phi () - v2.phi ()) * TVector2::Phi_mpi_pi (v1.phi () - v2.phi ()) + (v1.eta () - v2.eta ()) * (v1.eta () - v2.eta ()));
1570+
1571+ if (!config.qAOptimisation ) {
1572+ if (deltaRvalue < config.deltaRK0sCut ) {
1573+ continue ;
1574+ }
1575+ }
1576+
15761577 if (!config.isselectTWOKsOnly && !config.qAOptimisation )
15771578 fillInvMass (mother, multiplicity, daughter1, daughter2, isMix);
15781579
15791580 if (!config.isselectTWOKsOnly && config.qAOptimisation ) {
1580- double angSepValue = std::sqrt (TVector2::Phi_mpi_pi (v1.phi () - v2.phi ()) * TVector2::Phi_mpi_pi (v1.phi () - v2.phi ()) + (v1.eta () - v2.eta ()) * (v1.eta () - v2.eta ()));
15811581
15821582 if (std::abs (mother.Rapidity ()) < config.rapidityMotherData ) {
1583- hglue.fill (HIST (" h3glueInvMassDS" ), multiplicity, mother.Pt (), mother.M (), deltaMass, angSepValue , ptCorr);
1583+ hglue.fill (HIST (" h3glueInvMassDS" ), multiplicity, mother.Pt (), mother.M (), deltaMass, deltaRvalue , ptCorr);
15841584 }
15851585
15861586 for (int i = 0 ; i < config.cRotations ; i++) {
@@ -1591,7 +1591,7 @@ struct HigherMassResonances {
15911591 motherRot = daughterRot + daughter2;
15921592 double pTcorrRot = std::abs (daughterRot.Pt () + daughter2.Pt ()) / motherRot.Pt ();
15931593 if (motherRot.Rapidity () < config.rapidityMotherData )
1594- hglue.fill (HIST (" h3glueInvMassRot" ), multiplicity, motherRot.Pt (), motherRot.M (), deltaMass, angSepValue , pTcorrRot);
1594+ hglue.fill (HIST (" h3glueInvMassRot" ), multiplicity, motherRot.Pt (), motherRot.M (), deltaMass, deltaRvalue , pTcorrRot);
15951595 }
15961596 }
15971597 }
@@ -1634,20 +1634,32 @@ struct HigherMassResonances {
16341634 continue ;
16351635 }
16361636
1637+ if (config.isApplyEtaCutK0s && (t1.eta () < config.confDaughEta || t2.eta () < config.confDaughEta )) {
1638+ continue ;
1639+ }
1640+
16371641 daughter1 = ROOT::Math::PxPyPzMVector (t1.px (), t1.py (), t1.pz (), o2::constants::physics::MassK0Short); // Kshort
16381642 daughter2 = ROOT::Math::PxPyPzMVector (t2.px (), t2.py (), t2.pz (), o2::constants::physics::MassK0Short); // Kshort
16391643
16401644 mother = daughter1 + daughter2; // invariant mass of Kshort pair
1645+ const double deltaMass = deltaM (t1.mK0Short (), t2.mK0Short ());
1646+
1647+ if (!config.qAOptimisation ) {
1648+ if (deltaMass > config.cMaxDeltaM ) {
1649+ continue ;
1650+ }
1651+ }
1652+
16411653 isMix = true ;
16421654 if (!config.qAOptimisation )
16431655 fillInvMass (mother, multiplicity, daughter1, daughter2, isMix);
16441656
16451657 if (config.qAOptimisation ) {
1646- double angSepValue = std::sqrt (TVector2::Phi_mpi_pi (daughter1.phi () - daughter2.phi ()) * TVector2::Phi_mpi_pi (daughter1.phi () - daughter2.phi ()) + (daughter1.eta () - daughter2.eta ()) * (daughter1.eta () - daughter2.eta ()));
1658+ double deltaRvalue = std::sqrt (TVector2::Phi_mpi_pi (daughter1.phi () - daughter2.phi ()) * TVector2::Phi_mpi_pi (daughter1.phi () - daughter2.phi ()) + (daughter1.eta () - daughter2.eta ()) * (daughter1.eta () - daughter2.eta ()));
16471659 const double deltaMass = deltaM (t1.mK0Short (), t2.mK0Short ());
16481660 const double ptCorr = std::abs (daughter1.Pt () + daughter2.Pt ()) / mother.Pt ();
16491661 if (std::abs (mother.Rapidity ()) < config.rapidityMotherData ) {
1650- hglue.fill (HIST (" h3glueInvMassME" ), multiplicity, mother.Pt (), mother.M (), deltaMass, angSepValue , ptCorr);
1662+ hglue.fill (HIST (" h3glueInvMassME" ), multiplicity, mother.Pt (), mother.M (), deltaMass, deltaRvalue , ptCorr);
16511663 }
16521664 }
16531665 }
0 commit comments