Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions PWGLF/Tasks/Resonances/doublephimeson.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@

#include <fairlogger/Logger.h>

#include <iostream>

Check failure on line 37 in PWGLF/Tasks/Resonances/doublephimeson.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[include-iostream]

Do not include iostream. Use O2 logging instead.
#include <iterator>
#include <string>
#include <vector>
Expand Down Expand Up @@ -82,13 +82,18 @@
void init(o2::framework::InitContext&)
{
// register histograms
histos.add("hnsigmaTPCKaonPlusBefore", "hnsigmaTPCKaonPlusBefore", kTH2F, {{1000, -3.0, 3.0f}, {100, 0.0f, 10.0f}});
histos.add("hnsigmaTPCKaonMinusBefore", "hnsigmaTPCKaonMinusBefore", kTH2F, {{1000, -3.0, 3.0f}, {100, 0.0f, 10.0f}});
histos.add("hnsigmaTPCTOFKaonBefore", "hnsigmaTPCTOFKaonBefore", kTH3F, {{500, -3.0, 3.0f}, {500, -3.0, 3.0f}, {100, 0.0f, 10.0f}});
histos.add("hnsigmaTPCKaonPlus", "hnsigmaTPCKaonPlus", kTH2F, {{1000, -3.0, 3.0f}, {100, 0.0f, 10.0f}});
histos.add("hnsigmaTPCKaonMinus", "hnsigmaTPCKaonMinus", kTH2F, {{1000, -3.0, 3.0f}, {100, 0.0f, 10.0f}});
histos.add("hnsigmaTPCTOFKaon", "hnsigmaTPCTOFKaon", kTH3F, {{500, -3.0, 3.0f}, {500, -3.0, 3.0f}, {100, 0.0f, 10.0f}});
histos.add("hPhiMass", "hPhiMass", kTH2F, {{40, 1.0, 1.04f}, {100, 0.0f, 10.0f}});
histos.add("hPhiMass2", "hPhiMass2", kTH2F, {{40, 1.0, 1.04f}, {40, 1.0f, 1.04f}});
histos.add("hkPlusDeltaetaDeltaPhi", "hkPlusDeltaetaDeltaPhi", kTH2F, {{400, -2.0, 2.0}, {640, -2.0 * TMath::Pi(), 2.0 * TMath::Pi()}});
histos.add("hkMinusDeltaetaDeltaPhi", "hkMinusDeltaetaDeltaPhi", kTH2F, {{400, -2.0, 2.0}, {640, -2.0 * TMath::Pi(), 2.0 * TMath::Pi()}});
histos.add("hDeltaRkaonplus", "hDeltaRkaonplus", kTH1F, {{800, 0.0, 8.0}});
histos.add("hDeltaRkaonminus", "hDeltaRkaonminus", kTH1F, {{800, 0.0, 8.0}});

const AxisSpec thnAxisInvMass{configThnAxisInvMass, "#it{M} (GeV/#it{c}^{2})"};
const AxisSpec thnAxisInvMassPhi{configThnAxisInvMassPhi, "#it{M} (GeV/#it{c}^{2})"};
Expand Down Expand Up @@ -136,7 +141,7 @@
pz2 = candidate2.Pz();
p1 = candidate1.P();
p2 = candidate2.P();
angle = TMath::ACos((pt1 * pt2 + pz1 * pz2) / (p1 * p2));

Check failure on line 144 in PWGLF/Tasks/Resonances/doublephimeson.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[root/entity]

Replace ROOT entities with equivalents from standard C++ or from O2.
return angle;
}

Expand All @@ -150,7 +155,7 @@
pz2 = candidate2.Pz();
p1 = candidate1.P();
p2 = candidate2.P();
angle = TMath::ACos((pt1 * pt2 + pz1 * pz2) / (p1 * p2));

Check failure on line 158 in PWGLF/Tasks/Resonances/doublephimeson.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[root/entity]

Replace ROOT entities with equivalents from standard C++ or from O2.
return angle;
}

Expand All @@ -168,7 +173,7 @@
const ROOT::Math::Boost boostPRF = ROOT::Math::Boost(-betax, -betay, -betaz);
daughterCMS = boostPRF(daughter);
threeVecDauCM = daughterCMS.Vect();
float cosThetaStar = TMath::Abs(threeVecDauCM.Dot(threeVecMother) / std::sqrt(threeVecMother.Mag2()) / std::sqrt(threeVecDauCM.Mag2()));

Check failure on line 176 in PWGLF/Tasks/Resonances/doublephimeson.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[root/entity]

Replace ROOT entities with equivalents from standard C++ or from O2.
return cosThetaStar;
}

Expand All @@ -185,10 +190,10 @@
return true;
}
} else if (ptcand >= 0.5 && ptcand < 5.0 && TOFHit == 1) {
if (ptcand < 2.0 && TMath::Sqrt(nsigmaTOF * nsigmaTOF + nsigmaTPC * nsigmaTPC) < 2.5) {

Check failure on line 193 in PWGLF/Tasks/Resonances/doublephimeson.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[root/entity]

Replace ROOT entities with equivalents from standard C++ or from O2.
return true;
}
if (ptcand >= 2.0 && TMath::Sqrt(nsigmaTOF * nsigmaTOF + nsigmaTPC * nsigmaTPC) < 2.0) {

Check failure on line 196 in PWGLF/Tasks/Resonances/doublephimeson.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[root/entity]

Replace ROOT entities with equivalents from standard C++ or from O2.
return true;
}
} else if (ptcand >= 0.5 && ptcand < 5.0 && TOFHit != 1) {
Expand Down Expand Up @@ -228,10 +233,10 @@
return true;
}
} else if (ptcand >= 0.5 && ptcand < 5.0 && TOFHit == 1) {
if (ptcand < 2.0 && TMath::Sqrt(nsigmaTOF * nsigmaTOF + nsigmaTPC * nsigmaTPC) < 2.5) {

Check failure on line 236 in PWGLF/Tasks/Resonances/doublephimeson.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[root/entity]

Replace ROOT entities with equivalents from standard C++ or from O2.
return true;
}
if (ptcand >= 2.0 && TMath::Sqrt(nsigmaTOF * nsigmaTOF + nsigmaTPC * nsigmaTPC) < 2.0) {

Check failure on line 239 in PWGLF/Tasks/Resonances/doublephimeson.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[root/entity]

Replace ROOT entities with equivalents from standard C++ or from O2.
return true;
}
} else if (ptcand >= 5.0 && nsigmaTPC > -2.0 && nsigmaTPC < 2.0) {
Expand Down Expand Up @@ -270,7 +275,7 @@
}
}
if (TOFHit == 1) {
if (TMath::Sqrt((nsigmaTPC * nsigmaTPC + nsigmaTOF * nsigmaTOF) / 2.0) < cutNsigmaTOF) {

Check failure on line 278 in PWGLF/Tasks/Resonances/doublephimeson.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[root/entity]

Replace ROOT entities with equivalents from standard C++ or from O2.
return true;
}
}
Expand All @@ -289,7 +294,7 @@
}
}
if (TOFHit == 1) {
if (TMath::Sqrt((nsigmaTPC * nsigmaTPC + nsigmaTOF * nsigmaTOF) / 2.0) < cutNsigmaTOF) {

Check failure on line 297 in PWGLF/Tasks/Resonances/doublephimeson.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[root/entity]

Replace ROOT entities with equivalents from standard C++ or from O2.
return true;
}
}
Expand Down Expand Up @@ -467,6 +472,11 @@
for (auto phitrackd1 : phitracks) {
auto kaonplusd1pt = TMath::Sqrt(phitrackd1.phid1Px() * phitrackd1.phid1Px() + phitrackd1.phid1Py() * phitrackd1.phid1Py());
auto kaonminusd1pt = TMath::Sqrt(phitrackd1.phid2Px() * phitrackd1.phid2Px() + phitrackd1.phid2Py() * phitrackd1.phid2Py());

histos.fill(HIST("hnsigmaTPCTOFKaonBefore"), phitrackd1.phid1TPC(), phitrackd1.phid1TOF(), kaonplusd1pt);
histos.fill(HIST("hnsigmaTPCKaonPlusBefore"), phitrackd1.phid1TPC(), kaonplusd1pt);
histos.fill(HIST("hnsigmaTPCKaonMinusBefore"), phitrackd1.phid2TPC(), kaonminusd1pt);

if (kaonplusd1pt > maxKaonPt) {
continue;
}
Expand Down Expand Up @@ -564,6 +574,8 @@
auto exotic1kaonminus2 = kaonminus2.at(i5);
auto deltaRkaonplus1 = TMath::Sqrt(TMath::Power(exotic1kaonplus1.Phi() - exotic1kaonplus2.Phi(), 2.0) + TMath::Power(exotic1kaonplus1.Eta() - exotic1kaonplus2.Eta(), 2.0));
auto deltaRkaonminus1 = TMath::Sqrt(TMath::Power(exotic1kaonminus1.Phi() - exotic1kaonminus2.Phi(), 2.0) + TMath::Power(exotic1kaonminus1.Eta() - exotic1kaonminus2.Eta(), 2.0));
histos.fill(HIST("hDeltaRkaonplus"), deltaRkaonplus1);
histos.fill(HIST("hDeltaRkaonminus"), deltaRkaonminus1);

auto deltam1 = TMath::Sqrt(TMath::Power(exotic1phi1.M() - 1.0192, 2.0) + TMath::Power(exotic1phi2.M() - 1.0192, 2.0));
auto deltaR1 = TMath::Sqrt(TMath::Power(exotic1phi1.Phi() - exotic1phi2.Phi(), 2.0) + TMath::Power(exotic1phi1.Eta() - exotic1phi2.Eta(), 2.0));
Expand Down Expand Up @@ -623,6 +635,9 @@
auto deltam1 = TMath::Sqrt(TMath::Power(exotic1phi1.M() - 1.0192, 2.0) + TMath::Power(exotic1phi2.M() - 1.0192, 2.0));
auto deltaR1 = TMath::Sqrt(TMath::Power(exotic1phi1.Phi() - exotic1phi2.Phi(), 2.0) + TMath::Power(exotic1phi1.Eta() - exotic1phi2.Eta(), 2.0));

histos.fill(HIST("hDeltaRkaonplus"), deltaRkaonplus1);
histos.fill(HIST("hDeltaRkaonminus"), deltaRkaonminus1);

if (deltaRkaonplus1 < daughterDeltaR) {
continue;
}
Expand Down Expand Up @@ -667,6 +682,8 @@
const ROOT::Math::PtEtaPhiMVector& kminusB) {
const double dRkplus = deltaR(kplusA.Phi(), kplusA.Eta(), kplusB.Phi(), kplusB.Eta());
const double dRkminus = deltaR(kminusA.Phi(), kminusA.Eta(), kminusB.Phi(), kminusB.Eta());
histos.fill(HIST("hDeltaRkaonplus"), dRkplus);
histos.fill(HIST("hDeltaRkaonminus"), dRkminus);
return (dRkplus > daughterDeltaR) && (dRkminus > daughterDeltaR);
// If later needed, make pT-aware:
// const double thr = std::max(0.01, daughterDeltaR - 0.002 * std::min(10.0, exoticPt));
Expand Down Expand Up @@ -712,6 +729,11 @@
// Per-φ selection for the first φ
const double kplus1pt = std::hypot(t1.phid1Px(), t1.phid1Py());
const double kminus1pt = std::hypot(t1.phid2Px(), t1.phid2Py());

histos.fill(HIST("hnsigmaTPCTOFKaonBefore"), t1.phid1TPC(), t1.phid1TOF(), kplus1pt);
histos.fill(HIST("hnsigmaTPCKaonPlusBefore"), t1.phid1TPC(), kplus1pt);
histos.fill(HIST("hnsigmaTPCKaonMinusBefore"), t1.phid2TPC(), kminus1pt);

if (kplus1pt > maxKaonPt)
continue;
if (kminus1pt > maxKaonPt)
Expand Down
Loading