Skip to content

Commit adb05d8

Browse files
sarjeeta gamisarjeeta gami
authored andcommitted
[PWGLF] Add rotational and like-sign background for phi in kstarpbpb task
1 parent ed799c3 commit adb05d8

1 file changed

Lines changed: 76 additions & 1 deletion

File tree

‎PWGLF/Tasks/Resonances/kstarpbpb.cxx‎

Lines changed: 76 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,6 +175,9 @@ struct Kstarpbpb {
175175
Configurable<double> confRapidity{"confRapidity", 0.5, "Rapidity cut"};
176176
Configurable<bool> genacceptancecut{"genacceptancecut", true, "use acceptance cut for generated"};
177177
Configurable<bool> avoidsplitrackMC{"avoidsplitrackMC", false, "avoid split track in MC"};
178+
// same-event backgrounds, as for K* (off by default: processSEPhi then behaves exactly as before)
179+
Configurable<bool> fillRotation{"fillRotation", false, "Fill the same-event rotated K+K- background (K+ rotated, with confMinRot, confMaxRot and nBkgRotations as for K*)"};
180+
Configurable<bool> fillLikeSign{"fillLikeSign", false, "Fill the same-event like-sign (K+K+ and K-K-) background"};
178181
ConfigurableAxis configThnAxisInvMass{"configThnAxisInvMass", {120, 0.98, 1.1}, "#it{M} (GeV/#it{c}^{2})"};
179182
ConfigurableAxis configThnAxisPt{"configThnAxisPt", {100, 0.0, 10.}, "#it{p}_{T} (GeV/#it{c})"};
180183
ConfigurableAxis configThnAxisCosThetaStar{"configThnAxisCosThetaStar", {10, -1.0, 1.}, "cos(#vartheta)"};
@@ -437,6 +440,16 @@ struct Kstarpbpb {
437440
if (doprocessSEPhi) {
438441
histos.add("phi/hSparseV2SameEventSA", "hSparseV2SameEventSA", HistType::kTHnSparseF, {thnAxisInvMassPhi, thnAxisPtPhi, thnAxisSAPhi, thnAxisRapidityPhi, thnAxisCentralityPhi});
439442
histos.add("phi/hSparseV2SameEventCosThetaStar", "hSparseV2SameEventCosThetaStar", HistType::kTHnSparseF, {thnAxisInvMassPhi, thnAxisPtPhi, thnAxisCosThetaStarPhi, thnAxisRapidityPhi, thnAxisCentralityPhi});
443+
if (phiSA.fillRotation) {
444+
histos.add("phi/hSparseV2RotationSA", "hSparseV2RotationSA", HistType::kTHnSparseF, {thnAxisInvMassPhi, thnAxisPtPhi, thnAxisSAPhi, thnAxisRapidityPhi, thnAxisCentralityPhi});
445+
histos.add("phi/hSparseV2RotationCosThetaStar", "hSparseV2RotationCosThetaStar", HistType::kTHnSparseF, {thnAxisInvMassPhi, thnAxisPtPhi, thnAxisCosThetaStarPhi, thnAxisRapidityPhi, thnAxisCentralityPhi});
446+
}
447+
if (phiSA.fillLikeSign) {
448+
histos.add("phi/hSparseV2SameEventLikeSA", "hSparseV2SameEventLikeSA", HistType::kTHnSparseF, {thnAxisInvMassPhi, thnAxisPtPhi, thnAxisSAPhi, thnAxisRapidityPhi, thnAxisCentralityPhi});
449+
histos.add("phi/hSparseV2SameEventLikeCosThetaStar", "hSparseV2SameEventLikeCosThetaStar", HistType::kTHnSparseF, {thnAxisInvMassPhi, thnAxisPtPhi, thnAxisCosThetaStarPhi, thnAxisRapidityPhi, thnAxisCentralityPhi});
450+
histos.add("phi/hMassSameEventLikePP", "Same-event like-sign (++) mass", kTH2F, {thnAxisInvMassPhi, thnAxisCentralityPhi});
451+
histos.add("phi/hMassSameEventLikeNN", "Same-event like-sign (--) mass", kTH2F, {thnAxisInvMassPhi, thnAxisCentralityPhi});
452+
}
440453
}
441454
if (doprocessMEPhi) {
442455
histos.add("phi/hSparseV2MixedEventSA", "hSparseV2MixedEventSA", HistType::kTHnSparseF, {thnAxisInvMassPhi, thnAxisPtPhi, thnAxisSAPhi, thnAxisRapidityPhi, thnAxisCentralityPhi});
@@ -1661,7 +1674,7 @@ struct Kstarpbpb {
16611674
histos.fill(HIST("phi/hPsiRandom"), centrality, psiSA);
16621675
}
16631676

1664-
ROOT::Math::PxPyPzMVector kaonPlusPhi, kaonMinusPhi, phiMother;
1677+
ROOT::Math::PxPyPzMVector kaonPlusPhi, kaonMinusPhi, phiMother, kaonPlusRot, phiRot;
16651678
for (const auto& track1 : tracks) {
16661679
if (!(track1.signed1Pt() > cfgCutCharge.value)) { // positive kaon
16671680
continue;
@@ -1695,6 +1708,68 @@ struct Kstarpbpb {
16951708
}
16961709
histos.fill(HIST("phi/hSparseV2SameEventSA"), phiMother.M(), phiMother.Pt(), sa, absRapidity, centrality);
16971710
histos.fill(HIST("phi/hSparseV2SameEventCosThetaStar"), phiMother.M(), phiMother.Pt(), cosThetaStar, absRapidity, centrality);
1711+
1712+
// rotated background, same rotation as for K* in processSE: rotate the K+, cos(theta*) of the K- in the rotated pair
1713+
if (phiSA.fillRotation && nBkgRotations.value > 1) {
1714+
const double angleStart = confMinRot.value;
1715+
const double angleStep = (confMaxRot.value - angleStart) / (nBkgRotations.value - 1.0);
1716+
for (int irot = 0; irot < nBkgRotations.value; irot++) {
1717+
const double rotAngle = angleStart + irot * angleStep;
1718+
kaonPlusRot = ROOT::Math::PxPyPzMVector(track1.px() * std::cos(rotAngle) - track1.py() * std::sin(rotAngle), track1.px() * std::sin(rotAngle) + track1.py() * std::cos(rotAngle), track1.pz(), MassKa);
1719+
phiRot = kaonPlusRot + kaonMinusPhi;
1720+
auto absRapidityRot = std::abs(phiRot.Rapidity());
1721+
if (absRapidityRot > phiSA.confRapidity) {
1722+
continue;
1723+
}
1724+
// production-plane axis must follow the rotated candidate
1725+
auto [cosThetaStarRot, saRot] = getSAValuesPhi(phiRot, kaonMinusPhi, getSAAxis(phiRot, psiSA), psiSA);
1726+
histos.fill(HIST("phi/hSparseV2RotationSA"), phiRot.M(), phiRot.Pt(), saRot, absRapidityRot, centrality);
1727+
histos.fill(HIST("phi/hSparseV2RotationCosThetaStar"), phiRot.M(), phiRot.Pt(), cosThetaStarRot, absRapidityRot, centrality);
1728+
}
1729+
}
1730+
}
1731+
}
1732+
1733+
// like-sign background (K+K+ and K-K-): same track, PID and pair cuts as the unlike-sign pairs, each pair taken once;
1734+
// cos(theta*) of the first kaon of the pair (the two kaons are back to back in the pair rest frame, so the choice only flips the sign)
1735+
if (phiSA.fillLikeSign) {
1736+
ROOT::Math::PxPyPzMVector kaonLike1, kaonLike2, pairLike;
1737+
for (const auto& track1 : tracks) {
1738+
if (!selectionTrackPhi(track1) || !selectionPIDPhi(track1)) {
1739+
continue;
1740+
}
1741+
for (const auto& track2 : tracks) {
1742+
if (track2.globalIndex() <= track1.globalIndex()) {
1743+
continue;
1744+
}
1745+
if (track1.sign() * track2.sign() <= 0) {
1746+
continue;
1747+
}
1748+
if (!selectionTrackPhi(track2) || !selectionPIDPhi(track2)) {
1749+
continue;
1750+
}
1751+
if (!selectionPairPhi(track1, track2)) {
1752+
continue;
1753+
}
1754+
if (phiSA.removeFakeTrack && (isFakeKaonPhi(track1) || isFakeKaonPhi(track2))) {
1755+
continue;
1756+
}
1757+
kaonLike1 = ROOT::Math::PxPyPzMVector(track1.px(), track1.py(), track1.pz(), MassKa);
1758+
kaonLike2 = ROOT::Math::PxPyPzMVector(track2.px(), track2.py(), track2.pz(), MassKa);
1759+
pairLike = kaonLike1 + kaonLike2;
1760+
auto absRapidityLike = std::abs(pairLike.Rapidity());
1761+
if (absRapidityLike > phiSA.confRapidity) {
1762+
continue;
1763+
}
1764+
auto [cosThetaStarLike, saLike] = getSAValuesPhi(pairLike, kaonLike1, getSAAxis(pairLike, psiSA), psiSA);
1765+
histos.fill(HIST("phi/hSparseV2SameEventLikeSA"), pairLike.M(), pairLike.Pt(), saLike, absRapidityLike, centrality);
1766+
histos.fill(HIST("phi/hSparseV2SameEventLikeCosThetaStar"), pairLike.M(), pairLike.Pt(), cosThetaStarLike, absRapidityLike, centrality);
1767+
if (track1.sign() > 0) {
1768+
histos.fill(HIST("phi/hMassSameEventLikePP"), pairLike.M(), centrality);
1769+
} else {
1770+
histos.fill(HIST("phi/hMassSameEventLikeNN"), pairLike.M(), centrality);
1771+
}
1772+
}
16981773
}
16991774
}
17001775
}

0 commit comments

Comments
 (0)