diff --git a/PWGLF/TableProducer/Resonances/f1protonreducedtable.cxx b/PWGLF/TableProducer/Resonances/f1protonreducedtable.cxx index 0f1ea4cdbe7..5004b2f1bd8 100644 --- a/PWGLF/TableProducer/Resonances/f1protonreducedtable.cxx +++ b/PWGLF/TableProducer/Resonances/f1protonreducedtable.cxx @@ -779,7 +779,7 @@ struct f1protonreducedtable { PionTPCFinal.push_back(PionTPC.at(i1)); // Pion TPC KaonTPCFinal.push_back(KaonTPC.at(i2)); // Kaon TPC KaonTPCPionHypoFinal.push_back(KaonTPCPionHypo.at(i2)); // Kaon TPC - if (pairsign == 1) { + if (pairsign > 0) { qaRegistry.fill(HIST("hInvMassf1"), F1Vector.M(), F1Vector.Pt()); numberF1 = numberF1 + 1; for (auto iproton = protons.begin(); iproton != protons.end(); ++iproton) { diff --git a/PWGLF/Tasks/Resonances/f1protoncorrelation.cxx b/PWGLF/Tasks/Resonances/f1protoncorrelation.cxx index 41a21b66358..02395a2b1fe 100644 --- a/PWGLF/Tasks/Resonances/f1protoncorrelation.cxx +++ b/PWGLF/Tasks/Resonances/f1protoncorrelation.cxx @@ -79,6 +79,7 @@ struct f1protoncorrelation { Configurable momentumTOFProton{"momentumTOFProton", 0.7, "Proton momentum TOF"}; Configurable momentumProtonMax{"momentumProtonMax", 3.0, "Maximum proton momentum"}; Configurable lowPtF1{"lowPtF1", 1.0, "PT cut F1"}; + Configurable nRot{"nRot", 4, "Number of rotational bkg"}; // Event Mixing Configurable nEvtMixing{"nEvtMixing", 10, "Number of events to mix"}; ConfigurableAxis CfgVtxBins{"CfgVtxBins", {10, -10, 10}, "Mixing bins - z-vertex"}; @@ -213,7 +214,7 @@ struct f1protoncorrelation { } float combinedTPC; TLorentzVector F1, Proton, F1ProtonPair, Pion, Kaon, Kshort; - TLorentzVector F1Rot, PionRot, KaonKshortPair, KaonKshortPairRot; + TLorentzVector F1Rot, PionRot, KaonKshortPair; // Process the data in same event int currentRunNumber = -999; @@ -299,7 +300,9 @@ struct f1protoncorrelation { histos.fill(HIST("hNsigmaProtonTPC"), protontrack.protonNsigmaTPC(), Proton.Pt()); } histos.fill(HIST("h2SameEventPtCorrelation"), relative_momentum, F1.Pt(), Proton.Pt()); + if (f1track.f1SignalStat() > 0) { + // check charge int f1Charge = f1track.f1SignalStat(); if (f1Charge == 2) { f1Charge = -1; @@ -312,6 +315,26 @@ struct f1protoncorrelation { if (fillSparse) { histos.fill(HIST("SEMassUnlike"), F1.M(), F1.Pt(), Proton.Pt(), relative_momentum, combinedTPC, pairCharge); } + if (fillRotation) { + for (int nrotbkg = 0; nrotbkg < nRot; nrotbkg++) { + auto anglestart = 5.0 * TMath::Pi() / 6.0; + auto angleend = 7.0 * TMath::Pi() / 6.0; + auto anglestep = (angleend - anglestart) / (1.0 * (9.0 - 1.0)); + auto rotangle = anglestart + nrotbkg * anglestep; + auto rotPionPx = Pion.Px() * std::cos(rotangle) - Pion.Py() * std::sin(rotangle); + auto rotPionPy = Pion.Px() * std::sin(rotangle) + Pion.Py() * std::cos(rotangle); + PionRot.SetXYZM(rotPionPx, rotPionPy, Pion.Pz(), Pion.M()); + F1Rot = PionRot + KaonKshortPair; + if (F1Rot.Pt() < 1.0) { + continue; + } + auto relative_momentum_rot = getkstar(F1Rot, Proton); + histos.fill(HIST("h2SameEventInvariantMassRot_mass"), relative_momentum_rot, F1Rot.Pt(), F1Rot.M(), pairCharge); + if (fillSparse) { + histos.fill(HIST("SEMassRot"), F1Rot.M(), F1Rot.Pt(), Proton.Pt(), relative_momentum_rot, combinedTPC, pairCharge); + } + } + } } if (f1track.f1SignalStat() == -1) { histos.fill(HIST("h2SameEventInvariantMassLike_mass"), relative_momentum, F1.Pt(), F1.M(), protontrack.protonCharge()); @@ -319,25 +342,6 @@ struct f1protoncorrelation { histos.fill(HIST("SEMassLike"), F1.M(), F1.Pt(), Proton.Pt(), relative_momentum, combinedTPC, protontrack.protonCharge()); } } - if (fillRotation) { - for (int nrotbkg = 0; nrotbkg < 9; nrotbkg++) { - auto anglestart = 5.0 * TMath::Pi() / 6.0; - auto angleend = 7.0 * TMath::Pi() / 6.0; - auto anglestep = (angleend - anglestart) / (1.0 * (9.0 - 1.0)); - auto rotangle = anglestart + nrotbkg * anglestep; - auto rotKKPx = KaonKshortPair.Px() * std::cos(rotangle) - KaonKshortPair.Py() * std::sin(rotangle); - auto rotKKPy = KaonKshortPair.Px() * std::sin(rotangle) + KaonKshortPair.Py() * std::cos(rotangle); - KaonKshortPairRot.SetXYZM(rotKKPx, rotKKPy, KaonKshortPair.Pz(), KaonKshortPair.M()); - F1Rot = Pion + KaonKshortPairRot; - auto relative_momentum_rot = getkstar(F1Rot, Proton); - if (f1track.f1SignalStat() > 0) { - histos.fill(HIST("h2SameEventInvariantMassRot_mass"), relative_momentum_rot, F1Rot.Pt(), F1Rot.M(), protontrack.protonCharge()); - if (fillSparse) { - histos.fill(HIST("SEMassRot"), F1Rot.M(), F1Rot.Pt(), Proton.Pt(), relative_momentum_rot, combinedTPC, protontrack.protonCharge()); - } - } - } - } } } } @@ -430,15 +434,18 @@ struct f1protoncorrelation { } } if (fillRotation) { - for (int nrotbkg = 0; nrotbkg < 9; nrotbkg++) { + for (int nrotbkg = 0; nrotbkg < nRot; nrotbkg++) { auto anglestart = 5.0 * TMath::Pi() / 6.0; auto angleend = 7.0 * TMath::Pi() / 6.0; auto anglestep = (angleend - anglestart) / (1.0 * (9.0 - 1.0)); auto rotangle = anglestart + nrotbkg * anglestep; - auto rotKKPx = KaonKshortPair.Px() * std::cos(rotangle) - KaonKshortPair.Py() * std::sin(rotangle); - auto rotKKPy = KaonKshortPair.Px() * std::sin(rotangle) + KaonKshortPair.Py() * std::cos(rotangle); - KaonKshortPairRot.SetXYZM(rotKKPx, rotKKPy, KaonKshortPair.Pz(), KaonKshortPair.M()); - F1Rot = Pion + KaonKshortPairRot; + auto rotPionPx = Pion.Px() * std::cos(rotangle) - Pion.Py() * std::sin(rotangle); + auto rotPionPy = Pion.Px() * std::sin(rotangle) + Pion.Py() * std::cos(rotangle); + PionRot.SetXYZM(rotPionPx, rotPionPy, Pion.Pz(), Pion.M()); + F1Rot = PionRot + KaonKshortPair; + if (F1Rot.Pt() < 1.0) { + continue; + } auto relative_momentum_rot = getkstar(F1Rot, Proton); if (t1.f1SignalStat() > 0) { histos.fill(HIST("h2MixEventInvariantMassRot_mass"), relative_momentum_rot, F1Rot.Pt(), F1Rot.M(), 1.0); @@ -538,6 +545,29 @@ struct f1protoncorrelation { if (fillSparse) { histos.fill(HIST("MEMassUnlike"), F1.M(), F1.Pt(), Proton.Pt(), relative_momentum, combinedTPC, pairCharge); } + + if (fillRotation) { + for (int nrotbkg = 0; nrotbkg < nRot; nrotbkg++) { + auto anglestart = 5.0 * TMath::Pi() / 6.0; + auto angleend = 7.0 * TMath::Pi() / 6.0; + auto anglestep = (angleend - anglestart) / (1.0 * (9.0 - 1.0)); + auto rotangle = anglestart + nrotbkg * anglestep; + auto rotPionPx = Pion.Px() * std::cos(rotangle) - Pion.Py() * std::sin(rotangle); + auto rotPionPy = Pion.Px() * std::sin(rotangle) + Pion.Py() * std::cos(rotangle); + PionRot.SetXYZM(rotPionPx, rotPionPy, Pion.Pz(), Pion.M()); + F1Rot = PionRot + KaonKshortPair; + if (F1Rot.Pt() < 1.0) { + continue; + } + auto relative_momentum_rot = getkstar(F1Rot, Proton); + if (t1.f1SignalStat() > 0) { + histos.fill(HIST("h2MixEventInvariantMassRot_mass"), relative_momentum_rot, F1Rot.Pt(), F1Rot.M(), pairCharge); + if (fillSparse) { + histos.fill(HIST("MEMassRot"), F1Rot.M(), F1Rot.Pt(), Proton.Pt(), relative_momentum_rot, combinedTPC, pairCharge); + } + } + } + } } if (t1.f1SignalStat() == -1) { histos.fill(HIST("h2MixEventInvariantMassLike_mass"), relative_momentum, F1.Pt(), F1.M(), t2.protonCharge()); @@ -545,25 +575,6 @@ struct f1protoncorrelation { histos.fill(HIST("MEMassLike"), F1.M(), F1.Pt(), Proton.Pt(), relative_momentum, combinedTPC, t2.protonCharge()); } } - if (fillRotation) { - for (int nrotbkg = 0; nrotbkg < 9; nrotbkg++) { - auto anglestart = 5.0 * TMath::Pi() / 6.0; - auto angleend = 7.0 * TMath::Pi() / 6.0; - auto anglestep = (angleend - anglestart) / (1.0 * (9.0 - 1.0)); - auto rotangle = anglestart + nrotbkg * anglestep; - auto rotKKPx = KaonKshortPair.Px() * std::cos(rotangle) - KaonKshortPair.Py() * std::sin(rotangle); - auto rotKKPy = KaonKshortPair.Px() * std::sin(rotangle) + KaonKshortPair.Py() * std::cos(rotangle); - KaonKshortPairRot.SetXYZM(rotKKPx, rotKKPy, KaonKshortPair.Pz(), KaonKshortPair.M()); - F1Rot = Pion + KaonKshortPairRot; - auto relative_momentum_rot = getkstar(F1Rot, Proton); - if (t1.f1SignalStat() > 0) { - histos.fill(HIST("h2MixEventInvariantMassRot_mass"), relative_momentum_rot, F1Rot.Pt(), F1Rot.M(), t2.protonCharge()); - if (fillSparse) { - histos.fill(HIST("MEMassRot"), F1Rot.M(), F1Rot.Pt(), Proton.Pt(), relative_momentum_rot, combinedTPC, t2.protonCharge()); - } - } - } - } } } }