Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
8281156
Add new variable in THnSparse
skundu692 Apr 14, 2025
d702f82
Merge branch 'master' of https://github.com/AliceO2Group/O2Physics in…
skundu692 Apr 17, 2025
3faf128
Add deep angle information
skundu692 Apr 17, 2025
88b072c
Merge branch 'master' of https://github.com/AliceO2Group/O2Physics in…
skundu692 Apr 22, 2025
1fc5843
Optimized PID selection
skundu692 Apr 22, 2025
e59b85f
Add delta mass variable
skundu692 Apr 22, 2025
d62372a
Merge branch 'master' of https://github.com/AliceO2Group/O2Physics in…
skundu692 Apr 23, 2025
d114165
Fix bug related to daughter index
skundu692 Apr 23, 2025
64dbb89
Merge branch 'master' of https://github.com/AliceO2Group/O2Physics in…
skundu692 Apr 24, 2025
c29d245
Add strangeness helper in filter and fix daughter index check
skundu692 Apr 24, 2025
c07f7a2
Merge branch 'master' of https://github.com/AliceO2Group/O2Physics in…
skundu692 Apr 28, 2025
c6da28f
Fix indexing issue of BC
skundu692 Apr 28, 2025
84894ae
Remove unuse variable
skundu692 Apr 28, 2025
9730f54
Merge branch 'master' of https://github.com/AliceO2Group/O2Physics in…
skundu692 Apr 29, 2025
cfa3e43
Add new process function to optimize double phi selection
skundu692 Apr 29, 2025
70da5e8
Merge branch 'master' of https://github.com/AliceO2Group/O2Physics in…
skundu692 Apr 30, 2025
da13db5
Add wrong sign background
skundu692 Apr 30, 2025
5a7d0bf
Merge branch 'master' of https://github.com/AliceO2Group/O2Physics in…
skundu692 May 2, 2025
33055be
Optimized kaon PID to improve Phi meson purity
skundu692 May 2, 2025
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
11 changes: 7 additions & 4 deletions EventFiltering/PWGLF/filterdoublephi.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@
#include <Math/Vector4D.h>
#include <TMath.h>
#include <fairlogger/Logger.h>
#include <TDatabasePDG.h> // FIXME

Check failure on line 22 in EventFiltering/PWGLF/filterdoublephi.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[pdg/database]

Do not use TDatabasePDG directly. Use o2::constants::physics::Mass... or Service<o2::framework::O2DatabasePDG> instead.
#include <TPDGCode.h> // FIXME

#include <iostream>

Check failure on line 25 in EventFiltering/PWGLF/filterdoublephi.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 @@ -127,14 +127,14 @@
template <typename T>
bool selectionPID(const T& candidate)
{
if (candidate.pt() < 0.5 && candidate.tpcNSigmaKa() > nsigmaCutTPC && candidate.tpcNSigmaKa() < 3.0) {

Check failure on line 130 in EventFiltering/PWGLF/filterdoublephi.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[magic-number]

Avoid magic numbers in expressions. Assign the value to a clearly named variable or constant.
return true;
}
if (candidate.pt() >= 0.5) {

Check failure on line 133 in EventFiltering/PWGLF/filterdoublephi.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[magic-number]

Avoid magic numbers in expressions. Assign the value to a clearly named variable or constant.
if (!candidate.hasTOF() && candidate.tpcNSigmaKa() > nsigmaCutTPC && candidate.tpcNSigmaKa() < 3.0) {
if (!candidate.hasTOF() && candidate.tpcNSigmaKa() > nsigmaCutTPC && candidate.tpcNSigmaKa() < 2.0) {

Check failure on line 134 in EventFiltering/PWGLF/filterdoublephi.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[magic-number]

Avoid magic numbers in expressions. Assign the value to a clearly named variable or constant.
return true;
}
if (candidate.hasTOF() && candidate.beta() > cfgCutTOFBeta && candidate.tpcNSigmaKa() > nsigmaCutTPC && candidate.tpcNSigmaKa() < 3.0 && TMath::Abs(candidate.tofNSigmaKa()) < nsigmaCutTOF) {
if (candidate.hasTOF() && candidate.beta() > cfgCutTOFBeta && TMath::Sqrt(candidate.tpcNSigmaKa() * candidate.tpcNSigmaKa() + candidate.tofNSigmaKa() * candidate.tofNSigmaKa()) < nsigmaCutTOF) {

Check failure on line 137 in EventFiltering/PWGLF/filterdoublephi.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 @@ -146,11 +146,14 @@
if (candidate.pt() < 0.5 && candidate.tpcNSigmaKa() > nsigmaCutTPC && candidate.tpcNSigmaKa() < 3.0) {
return true;
}
if (candidate.pt() >= 0.5) {
if (candidate.hasTOF() && candidate.beta() > cfgCutTOFBeta && candidate.tpcNSigmaKa() > nsigmaCutTPC && candidate.tpcNSigmaKa() < 3.0 && TMath::Abs(candidate.tofNSigmaKa()) < nsigmaCutTOF) {
if (candidate.pt() >= 0.5 && candidate.pt() < 5.0) {
if (candidate.hasTOF() && candidate.beta() > cfgCutTOFBeta && TMath::Sqrt(candidate.tpcNSigmaKa() * candidate.tpcNSigmaKa() + candidate.tofNSigmaKa() * candidate.tofNSigmaKa()) < nsigmaCutTOF) {

Check failure on line 150 in EventFiltering/PWGLF/filterdoublephi.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 (candidate.pt() >= 5.0 && candidate.tpcNSigmaKa() > nsigmaCutTPC && candidate.tpcNSigmaKa() < 2.0) {
return true;
}
return false;
}
// deep angle cut on pair to remove photon conversion
Expand All @@ -164,7 +167,7 @@
pz2 = candidate2.pz();
p1 = candidate1.p();
p2 = candidate2.p();
angle = TMath::ACos((pt1 * pt2 + pz1 * pz2) / (p1 * p2));

Check failure on line 170 in EventFiltering/PWGLF/filterdoublephi.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[root/entity]

Replace ROOT entities with equivalents from standard C++ or from O2.
if (isDeepAngle && angle < cfgDeepAngle) {
return false;
}
Expand All @@ -186,7 +189,7 @@
if (collision.sel8()) {
auto posThisColl = posTracks->sliceByCached(aod::track::collisionId, collision.globalIndex(), cache);
auto negThisColl = negTracks->sliceByCached(aod::track::collisionId, collision.globalIndex(), cache);
for (auto track1 : posThisColl) {

Check failure on line 192 in EventFiltering/PWGLF/filterdoublephi.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[const-ref-in-for-loop]

Use constant references for non-modified iterators in range-based for loops.
// track selection
if (!selectionTrack(track1)) {
continue;
Expand All @@ -207,7 +210,7 @@
qaRegistry.fill(HIST("hNsigmaPtkaonTOF"), track1.tofNSigmaKa(), track1.pt());
}
auto track1ID = track1.globalIndex();
for (auto track2 : negThisColl) {

Check failure on line 213 in EventFiltering/PWGLF/filterdoublephi.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[const-ref-in-for-loop]

Use constant references for non-modified iterators in range-based for loops.
// track selection
if (!selectionTrack(track2)) {
continue;
Expand Down
199 changes: 107 additions & 92 deletions PWGLF/Tasks/Resonances/doublephimeson.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ struct doublephimeson {
Configurable<float> cutNsigmaTPC{"cutNsigmaTPC", 3.0, "nsigma cut TPC"};
Configurable<float> cutNsigmaTOF{"cutNsigmaTOF", 3.0, "nsigma cut TOF"};
Configurable<float> momTOFCut{"momTOFCut", 1.8, "minimum pT cut for madnatory TOF"};
Configurable<float> maxKaonPt{"maxKaonPt", 4.0, "maximum kaon pt cut"};
Configurable<float> maxKaonPt{"maxKaonPt", 100.0, "maximum kaon pt cut"};
// Event Mixing
Configurable<int> nEvtMixing{"nEvtMixing", 1, "Number of events to mix"};
ConfigurableAxis CfgVtxBins{"CfgVtxBins", {10, -10, 10}, "Mixing bins - z-vertex"};
Expand Down Expand Up @@ -88,9 +88,9 @@ struct doublephimeson {
const AxisSpec thnAxisCosTheta{configThnAxisCosTheta, "cos #theta"};
const AxisSpec thnAxisNumPhi{configThnAxisNumPhi, "Number of phi meson"};

histos.add("SEMassUnlike", "SEMassUnlike", HistType::kTHnSparseF, {thnAxisInvMass, thnAxisPt, thnAxisDeltaR, thnAxisCosTheta, thnAxisInvMassDeltaPhi, thnAxisNumPhi});
histos.add("SEMassLike", "SEMassLike", HistType::kTHnSparseF, {thnAxisInvMass, thnAxisPt, thnAxisDeltaR, thnAxisCosTheta, thnAxisInvMassDeltaPhi, thnAxisNumPhi});
histos.add("MEMassUnlike", "MEMassUnlike", HistType::kTHnSparseF, {thnAxisInvMass, thnAxisPt, thnAxisDeltaR, thnAxisCosTheta, thnAxisInvMassDeltaPhi});
histos.add("SEMassUnlike", "SEMassUnlike", HistType::kTHnSparseF, {thnAxisInvMass, thnAxisPt, thnAxisDeltaR, thnAxisInvMassPhi, thnAxisInvMassPhi, thnAxisNumPhi});
// histos.add("SEMassLike", "SEMassLike", HistType::kTHnSparseF, {thnAxisInvMass, thnAxisPt, thnAxisDeltaR, thnAxisInvMassPhi, thnAxisInvMassPhi, thnAxisNumPhi});
histos.add("MEMassUnlike", "MEMassUnlike", HistType::kTHnSparseF, {thnAxisInvMass, thnAxisPt, thnAxisDeltaR, thnAxisInvMassPhi, thnAxisInvMassPhi});
}

// get kstar
Expand Down Expand Up @@ -164,57 +164,71 @@ struct doublephimeson {

bool selectionPID(float nsigmaTPC, float nsigmaTOF, int TOFHit, int PIDStrategy, float ptcand)
{
// optimized TPC TOF
if (PIDStrategy == 0) {
if (ptcand < 0.5) {
if (nsigmaTPC > cutMinNsigmaTPC && nsigmaTPC < cutNsigmaTPC) {
if (ptcand < 0.4) {
if (nsigmaTPC > -3.0 && nsigmaTPC < 3.0) {
return true;
}
}
if (ptcand >= 0.5) {
if (TOFHit != 1) {
if (ptcand >= 0.5 && ptcand < 0.6 && nsigmaTPC > -1.5 && nsigmaTPC < cutNsigmaTPC) {
return true;
}
if (ptcand >= 0.6 && ptcand < 0.7 && nsigmaTPC > -1.0 && nsigmaTPC < cutNsigmaTPC) {
return true;
}
if (ptcand >= 0.7 && ptcand < 0.8 && nsigmaTPC > -0.4 && nsigmaTPC < cutNsigmaTPC) {
return true;
}
if (ptcand >= 0.8 && ptcand < 1.0 && nsigmaTPC > -0.0 && nsigmaTPC < cutNsigmaTPC) {
return true;
}
if (ptcand >= 1.0 && ptcand < 1.8 && nsigmaTPC > -2.0 && nsigmaTPC < 2.0) {
return true;
}
if (ptcand >= 1.8 && ptcand < 2.0 && nsigmaTPC > -2.0 && nsigmaTPC < 1.5) {
return true;
}
if (ptcand >= 2.0 && nsigmaTPC > -2.0 && nsigmaTPC < 1.0) {
return true;
}
} else if (ptcand >= 0.4 && ptcand < 0.5) {
if (nsigmaTPC > -2.0 && nsigmaTPC < 3.0) {
return true;
}
if (TOFHit == 1) {
if (TMath::Sqrt((nsigmaTPC * nsigmaTPC + nsigmaTOF * nsigmaTOF) / 2.0) < cutNsigmaTOF) {
return true;
}
} else if (ptcand >= 0.5 && ptcand < 5.0 && TOFHit == 1) {
if (ptcand < 2.0 && TMath::Sqrt(nsigmaTOF * nsigmaTOF + nsigmaTPC * nsigmaTPC) < 2.5) {
return true;
}
if (ptcand >= 2.0 && TMath::Sqrt(nsigmaTOF * nsigmaTOF + nsigmaTPC * nsigmaTPC) < 2.0) {
return true;
}
} else if (ptcand >= 0.5 && ptcand < 5.0 && TOFHit != 1) {
if (ptcand >= 0.5 && ptcand < 0.6 && nsigmaTPC > -1.5 && nsigmaTPC < 2.0) {
return true;
}
if (ptcand >= 0.6 && ptcand < 0.7 && nsigmaTPC > -1.0 && nsigmaTPC < 2.0) {
return true;
}
if (ptcand >= 0.7 && ptcand < 0.8 && nsigmaTPC > -0.4 && nsigmaTPC < 2.0) {
return true;
}
if (ptcand >= 0.8 && ptcand < 1.0 && nsigmaTPC > -0.0 && nsigmaTPC < 2.0) {
return true;
}
if (ptcand >= 1.0 && ptcand < 1.8 && nsigmaTPC > -2.0 && nsigmaTPC < 2.0) {
return true;
}
if (ptcand >= 1.8 && ptcand < 2.0 && nsigmaTPC > -2.0 && nsigmaTPC < 1.5) {
return true;
}
if (ptcand >= 2.0 && nsigmaTPC > -2.0 && nsigmaTPC < 1.0) {
return true;
}
} else if (ptcand >= 5.0 && nsigmaTPC > -2.0 && nsigmaTPC < 2.0) {
return true;
}
}
// optimized TPC TOF combined
if (PIDStrategy == 1) {
if (ptcand < 0.5) {
if (ptcand < 0.4) {
if (nsigmaTPC > cutMinNsigmaTPC && nsigmaTPC < cutNsigmaTPC) {
return true;
}
}
if (ptcand >= 0.5) {
if (TOFHit == 1) {
if (nsigmaTPC > cutMinNsigmaTPC && nsigmaTPC < cutNsigmaTPC && TMath::Abs(nsigmaTOF) < cutNsigmaTOF) {
return true;
}
} else if (ptcand >= 0.4 && ptcand < 0.5) {
if (nsigmaTPC > -2.0 && nsigmaTPC < cutNsigmaTPC) {
return true;
}
} else if (ptcand >= 0.5 && ptcand < 5.0 && TOFHit == 1) {
if (ptcand < 2.0 && TMath::Sqrt(nsigmaTOF * nsigmaTOF + nsigmaTPC * nsigmaTPC) < 2.5) {
return true;
}
if (ptcand >= 2.0 && TMath::Sqrt(nsigmaTOF * nsigmaTOF + nsigmaTPC * nsigmaTPC) < 2.0) {
return true;
}
} else if (ptcand >= 5.0 && nsigmaTPC > -2.0 && nsigmaTPC < 2.0) {
return true;
}
}

if (PIDStrategy == 2) {
if (ptcand < 0.5) {
if (nsigmaTPC > cutMinNsigmaTPC && nsigmaTPC < cutNsigmaTPC) {
Expand Down Expand Up @@ -275,7 +289,7 @@ struct doublephimeson {
}

TLorentzVector exotic, Phid1, Phid2;
TLorentzVector exoticlike, Phi1kaonplus, Phi1kaonminus, Phi2kaonplus, Phi2kaonminus, Phid1like, Phid2like;
// TLorentzVector exoticlike, Phi1kaonplus, Phi1kaonminus, Phi2kaonplus, Phi2kaonminus, Phid1like, Phid2like;
// TLorentzVector exoticRot, Phid1Rot;

void processSE(aod::RedPhiEvents::iterator const& collision, aod::PhiTracks const& phitracks)
Expand Down Expand Up @@ -325,8 +339,8 @@ struct doublephimeson {
histos.fill(HIST("hPhiMass"), Phid1.M(), Phid1.Pt());
auto phid1id = phitrackd1.index();
Phid1.SetXYZM(phitrackd1.phiPx(), phitrackd1.phiPy(), phitrackd1.phiPz(), phitrackd1.phiMass());
Phi1kaonplus.SetXYZM(phitrackd1.phid1Px(), phitrackd1.phid1Py(), phitrackd1.phid1Pz(), 0.493);
Phi1kaonminus.SetXYZM(phitrackd1.phid2Px(), phitrackd1.phid2Py(), phitrackd1.phid2Pz(), 0.493);
// Phi1kaonplus.SetXYZM(phitrackd1.phid1Px(), phitrackd1.phid1Py(), phitrackd1.phid1Pz(), 0.493);
// Phi1kaonminus.SetXYZM(phitrackd1.phid2Px(), phitrackd1.phid2Py(), phitrackd1.phid2Pz(), 0.493);
for (auto phitrackd2 : phitracks) {
auto phid2id = phitrackd2.index();
if (phid2id <= phid1id) {
Expand All @@ -353,23 +367,24 @@ struct doublephimeson {
continue;
}
Phid2.SetXYZM(phitrackd2.phiPx(), phitrackd2.phiPy(), phitrackd2.phiPz(), phitrackd2.phiMass());
Phi2kaonplus.SetXYZM(phitrackd2.phid1Px(), phitrackd2.phid1Py(), phitrackd2.phid1Pz(), 0.493);
Phi2kaonminus.SetXYZM(phitrackd2.phid2Px(), phitrackd2.phid2Py(), phitrackd2.phid2Pz(), 0.493);

// Like
Phid1like = Phi1kaonplus + Phi2kaonplus;
Phid2like = Phi1kaonminus + Phi2kaonminus;
exoticlike = Phid1like + Phid2like;
auto deltaRlike = TMath::Sqrt(TMath::Power(Phid1like.Phi() - Phid2like.Phi(), 2.0) + TMath::Power(Phid1like.Eta() - Phid2like.Eta(), 2.0));
auto costhetalike = (Phid1like.Px() * Phid2like.Px() + Phid1like.Py() * Phid2like.Py() + Phid1like.Pz() * Phid2like.Pz()) / (Phid1like.P() * Phid2like.P());
auto deltamlike = TMath::Sqrt(TMath::Power(Phid1like.M() - 1.0192, 2.0) + TMath::Power(Phid2like.M() - 1.0192, 2.0));
if (!isDeep) {
histos.fill(HIST("SEMassLike"), exoticlike.M(), exoticlike.Pt(), deltaRlike, costhetalike, deltamlike, phimult);
}
if (isDeep) {
histos.fill(HIST("SEMassLike"), exoticlike.M(), exoticlike.Pt(), deltaRlike, deepangle(Phid1like, Phid2like), deltamlike, phimult);
}
// Phi2kaonplus.SetXYZM(phitrackd2.phid1Px(), phitrackd2.phid1Py(), phitrackd2.phid1Pz(), 0.493);
// Phi2kaonminus.SetXYZM(phitrackd2.phid2Px(), phitrackd2.phid2Py(), phitrackd2.phid2Pz(), 0.493);

/*
// Like
Phid1like = Phi1kaonplus + Phi2kaonplus;
Phid2like = Phi1kaonminus + Phi2kaonminus;
exoticlike = Phid1like + Phid2like;
auto deltaRlike = TMath::Sqrt(TMath::Power(Phid1like.Phi() - Phid2like.Phi(), 2.0) + TMath::Power(Phid1like.Eta() - Phid2like.Eta(), 2.0));
auto costhetalike = (Phid1like.Px() * Phid2like.Px() + Phid1like.Py() * Phid2like.Py() + Phid1like.Pz() * Phid2like.Pz()) / (Phid1like.P() * Phid2like.P());
auto deltamlike = TMath::Sqrt(TMath::Power(Phid1like.M() - 1.0192, 2.0) + TMath::Power(Phid2like.M() - 1.0192, 2.0));
if (!isDeep) {
histos.fill(HIST("SEMassLike"), exoticlike.M(), exoticlike.Pt(), deltaRlike, costhetalike, deltamlike, phimult);
}
if (isDeep) {
histos.fill(HIST("SEMassLike"), exoticlike.M(), exoticlike.Pt(), deltaRlike, deepangle(Phid1like, Phid2like), deltamlike, phimult);
}
*/
// Unlike
if (phitrackd2.phiMass() < minPhiMass || phitrackd2.phiMass() > maxPhiMass) {
continue;
Expand All @@ -384,14 +399,14 @@ struct doublephimeson {
// auto cosThetaStar = getCosTheta(exotic, Phid1);
// auto kstar = getkstar(Phid1, Phid2);
auto deltaR = TMath::Sqrt(TMath::Power(Phid1.Phi() - Phid2.Phi(), 2.0) + TMath::Power(Phid1.Eta() - Phid2.Eta(), 2.0));
auto costheta = (Phid1.Px() * Phid2.Px() + Phid1.Py() * Phid2.Py() + Phid1.Pz() * Phid2.Pz()) / (Phid1.P() * Phid2.P());
auto deltam = TMath::Sqrt(TMath::Power(Phid1.M() - 1.0192, 2.0) + TMath::Power(Phid2.M() - 1.0192, 2.0));
// auto costheta = (Phid1.Px() * Phid2.Px() + Phid1.Py() * Phid2.Py() + Phid1.Pz() * Phid2.Pz()) / (Phid1.P() * Phid2.P());
// auto deltam = TMath::Sqrt(TMath::Power(Phid1.M() - 1.0192, 2.0) + TMath::Power(Phid2.M() - 1.0192, 2.0));
histos.fill(HIST("hPhiMass2"), Phid1.M(), Phid2.M());
if (!isDeep) {
histos.fill(HIST("SEMassUnlike"), exotic.M(), exotic.Pt(), deltaR, costheta, deltam, phimult);
histos.fill(HIST("SEMassUnlike"), exotic.M(), exotic.Pt(), deltaR, Phid1.M(), Phid2.M(), phimult);
}
if (isDeep) {
histos.fill(HIST("SEMassUnlike"), exotic.M(), exotic.Pt(), deltaR, deepangle(Phid1, Phid2), deltam, phimult);
histos.fill(HIST("SEMassUnlike"), exotic.M(), exotic.Pt(), deltaR, Phid1.M(), Phid2.M(), phimult);
}
}
}
Expand Down Expand Up @@ -450,8 +465,8 @@ struct doublephimeson {
histos.fill(HIST("hPhiMass"), Phid1.M(), Phid1.Pt());
auto phid1id = phitrackd1.index();
Phid1.SetXYZM(phitrackd1.phiPx(), phitrackd1.phiPy(), phitrackd1.phiPz(), phitrackd1.phiMass());
Phi1kaonplus.SetXYZM(phitrackd1.phid1Px(), phitrackd1.phid1Py(), phitrackd1.phid1Pz(), 0.493);
Phi1kaonminus.SetXYZM(phitrackd1.phid2Px(), phitrackd1.phid2Py(), phitrackd1.phid2Pz(), 0.493);
// Phi1kaonplus.SetXYZM(phitrackd1.phid1Px(), phitrackd1.phid1Py(), phitrackd1.phid1Pz(), 0.493);
// Phi1kaonminus.SetXYZM(phitrackd1.phid2Px(), phitrackd1.phid2Py(), phitrackd1.phid2Pz(), 0.493);
for (auto phitrackd2 : phitracks) {
auto phid2id = phitrackd2.index();
if (phid2id <= phid1id) {
Expand All @@ -475,23 +490,23 @@ struct doublephimeson {
continue;
}
Phid2.SetXYZM(phitrackd2.phiPx(), phitrackd2.phiPy(), phitrackd2.phiPz(), phitrackd2.phiMass());
Phi2kaonplus.SetXYZM(phitrackd2.phid1Px(), phitrackd2.phid1Py(), phitrackd2.phid1Pz(), 0.493);
Phi2kaonminus.SetXYZM(phitrackd2.phid2Px(), phitrackd2.phid2Py(), phitrackd2.phid2Pz(), 0.493);

// Like
Phid1like = Phi1kaonplus + Phi2kaonplus;
Phid2like = Phi1kaonminus + Phi2kaonminus;
exoticlike = Phid1like + Phid2like;
auto deltaRlike = TMath::Sqrt(TMath::Power(Phid1like.Phi() - Phid2like.Phi(), 2.0) + TMath::Power(Phid1like.Eta() - Phid2like.Eta(), 2.0));
auto costhetalike = (Phid1like.Px() * Phid2like.Px() + Phid1like.Py() * Phid2like.Py() + Phid1like.Pz() * Phid2like.Pz()) / (Phid1like.P() * Phid2like.P());
auto deltamlike = TMath::Sqrt(TMath::Power(Phid1like.M() - 1.0192, 2.0) + TMath::Power(Phid2like.M() - 1.0192, 2.0));
if (!isDeep) {
histos.fill(HIST("SEMassLike"), exoticlike.M(), exoticlike.Pt(), deltaRlike, costhetalike, deltamlike, phimult);
}
if (isDeep) {
histos.fill(HIST("SEMassLike"), exoticlike.M(), exoticlike.Pt(), deltaRlike, deepangle(Phid1like, Phid2like), deltamlike, phimult);
}

// Phi2kaonplus.SetXYZM(phitrackd2.phid1Px(), phitrackd2.phid1Py(), phitrackd2.phid1Pz(), 0.493);
// Phi2kaonminus.SetXYZM(phitrackd2.phid2Px(), phitrackd2.phid2Py(), phitrackd2.phid2Pz(), 0.493);
/*
// Like
Phid1like = Phi1kaonplus + Phi2kaonplus;
Phid2like = Phi1kaonminus + Phi2kaonminus;
exoticlike = Phid1like + Phid2like;
auto deltaRlike = TMath::Sqrt(TMath::Power(Phid1like.Phi() - Phid2like.Phi(), 2.0) + TMath::Power(Phid1like.Eta() - Phid2like.Eta(), 2.0));
auto costhetalike = (Phid1like.Px() * Phid2like.Px() + Phid1like.Py() * Phid2like.Py() + Phid1like.Pz() * Phid2like.Pz()) / (Phid1like.P() * Phid2like.P());
auto deltamlike = TMath::Sqrt(TMath::Power(Phid1like.M() - 1.0192, 2.0) + TMath::Power(Phid2like.M() - 1.0192, 2.0));
if (!isDeep) {
histos.fill(HIST("SEMassLike"), exoticlike.M(), exoticlike.Pt(), deltaRlike, costhetalike, deltamlike, phimult);
}
if (isDeep) {
histos.fill(HIST("SEMassLike"), exoticlike.M(), exoticlike.Pt(), deltaRlike, deepangle(Phid1like, Phid2like), deltamlike, phimult);
}
*/
// unlike
if (phitrackd1.phiMass() < minPhiMass || phitrackd1.phiMass() > maxPhiMass) {
continue;
Expand Down Expand Up @@ -542,14 +557,14 @@ struct doublephimeson {
(d4trackid.at(i5) == d3trackid.at(i6) || d4trackid.at(i5) == d4trackid.at(i6))) {
// LOGF(info, "Find Pair %f %f", deltam2, deltam1);
if (deltam2 < deltam1) {
histos.fill(HIST("SEMassUnlike"), exotic2.M(), exotic2.Pt(), deltaR2, deepangle2(exotic2phi1, exotic2phi2), deltam2, exoticresonance.size());
histos.fill(HIST("SEMassUnlike"), exotic2.M(), exotic2.Pt(), deltaR2, exotic2phi1.M(), exotic2phi2.M(), phimult);
// LOGF(info, "Fill exotic Id %d which is pair of Id %d", i6, i5);
} else {
histos.fill(HIST("SEMassUnlike"), exotic1.M(), exotic1.Pt(), deltaR1, deepangle2(exotic1phi1, exotic1phi2), deltam1, exoticresonance.size());
histos.fill(HIST("SEMassUnlike"), exotic1.M(), exotic1.Pt(), deltaR1, exotic1phi1.M(), exotic1phi2.M(), phimult);
// LOGF(info, "Fill exotic Id %d which is pair of Id %d", i6, i5);
}
} else {
histos.fill(HIST("SEMassUnlike"), exotic1.M(), exotic1.Pt(), deltaR1, deepangle2(exotic1phi1, exotic1phi2), deltam1, exoticresonance.size());
histos.fill(HIST("SEMassUnlike"), exotic1.M(), exotic1.Pt(), deltaR1, exotic1phi1.M(), exotic1phi2.M(), phimult);
}
}
}
Expand All @@ -559,9 +574,9 @@ struct doublephimeson {
auto exotic1phi1 = phiresonanced1.at(i5);
auto exotic1phi2 = phiresonanced2.at(i5);
auto exotic1 = exoticresonance.at(i5);
auto deltam1 = TMath::Sqrt(TMath::Power(exotic1phi1.M() - 1.0192, 2.0) + TMath::Power(exotic1phi2.M() - 1.0192, 2.0));
// 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("SEMassUnlike"), exotic1.M(), exotic1.Pt(), deltaR1, deepangle2(exotic1phi1, exotic1phi2), deltam1, exoticresonance.size());
histos.fill(HIST("SEMassUnlike"), exotic1.M(), exotic1.Pt(), deltaR1, exotic1phi1.M(), exotic1phi2.M(), phimult);
}
}
}
Expand Down Expand Up @@ -618,13 +633,13 @@ struct doublephimeson {
Phid2.SetXYZM(phitrackd2.phiPx(), phitrackd2.phiPy(), phitrackd2.phiPz(), phitrackd2.phiMass());
exotic = Phid1 + Phid2;
auto deltaR = TMath::Sqrt(TMath::Power(Phid1.Phi() - Phid2.Phi(), 2.0) + TMath::Power(Phid1.Eta() - Phid2.Eta(), 2.0));
auto costheta = (Phid1.Px() * Phid2.Px() + Phid1.Py() * Phid2.Py() + Phid1.Pz() * Phid2.Pz()) / (Phid1.P() * Phid2.P());
auto deltam = TMath::Sqrt(TMath::Power(Phid1.M() - 1.0192, 2.0) + TMath::Power(Phid2.M() - 1.0192, 2.0));
// auto costheta = (Phid1.Px() * Phid2.Px() + Phid1.Py() * Phid2.Py() + Phid1.Pz() * Phid2.Pz()) / (Phid1.P() * Phid2.P());
// auto deltam = TMath::Sqrt(TMath::Power(Phid1.M() - 1.0192, 2.0) + TMath::Power(Phid2.M() - 1.0192, 2.0));
if (!isDeep) {
histos.fill(HIST("MEMassUnlike"), exotic.M(), exotic.Pt(), deltaR, costheta, deltam);
histos.fill(HIST("MEMassUnlike"), exotic.M(), exotic.Pt(), deltaR, Phid1.M(), Phid2.M());
}
if (isDeep) {
histos.fill(HIST("MEMassUnlike"), exotic.M(), exotic.Pt(), deltaR, deepangle(Phid1, Phid2), deltam);
histos.fill(HIST("MEMassUnlike"), exotic.M(), exotic.Pt(), deltaR, Phid1.M(), Phid2.M());
}
}
}
Expand Down
Loading