Skip to content

Commit cebbb0d

Browse files
authored
[PWGLF] add new variable to control background (#14739)
1 parent 4f68eaa commit cebbb0d

File tree

1 file changed

+32
-2
lines changed

1 file changed

+32
-2
lines changed

PWGLF/Tasks/Resonances/doublephimeson.cxx

Lines changed: 32 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,10 @@ struct doublephimeson {
8282
ConfigurableAxis configThnAxisNumPhi{"configThnAxisNumPhi", {101, -0.5, 100.5}, "cos #theta{*}"};
8383
ConfigurableAxis configThnAxisDeltaPt{"configThnAxisDeltaPt", {100, 0.0, 1.0}, "delta pt"};
8484
Configurable<float> maxDeltaMPhi{"maxDeltaMPhi", 0.01f, "Delta-m cut on the two phi masses: sqrt((m1-mPDG)^2 + (m2-mPDG)^2) < maxDeltaMPhi (GeV/c^2)"};
85-
85+
// --- NEW: steerable axes from JSON ---
86+
ConfigurableAxis configThnAxisDeltaRPhi{"configThnAxisDeltaRPhi", {120, 0.0, 6.0}, "ΔR(φ,φ)"};
87+
ConfigurableAxis configThnAxisZ{"configThnAxisZ", {100, 0.0, 1.0}, "z"};
88+
ConfigurableAxis configThnAxisA{"configThnAxisA", {100, 0.0, 1.0}, "A"};
8689
// Initialize the ananlysis task
8790
void init(o2::framework::InitContext&)
8891
{
@@ -109,10 +112,15 @@ struct doublephimeson {
109112
const AxisSpec thnAxisCosTheta{configThnAxisCosTheta, "cos #theta"};
110113
const AxisSpec thnAxisNumPhi{configThnAxisNumPhi, "Number of phi meson"};
111114
const AxisSpec thnAxisPtCorr{configThnAxisPtCorr, "Pt Corr var"};
112-
115+
const AxisSpec thnAxisDeltaRPhi{configThnAxisDeltaRPhi, "#Delta R(#phi,#phi)"};
116+
const AxisSpec thnAxisZ{configThnAxisZ, "z = p_{T1}/(p_{T1}+p_{T2})"};
117+
const AxisSpec thnAxisA{configThnAxisA, "A = |p_{T1}-p_{T2}|/(p_{T1}+p_{T2})"};
113118
histos.add("SEMassUnlike", "SEMassUnlike", HistType::kTHnSparseF, {thnAxisInvMass, thnAxisDeltaR, thnAxisPt, thnAxisDeltaR, thnAxisInvMassDeltaPhi, thnAxisPtCorr});
114119
// histos.add("SEMassLike", "SEMassLike", HistType::kTHnSparseF, {thnAxisInvMass, thnAxisPt, thnAxisDeltaR, thnAxisInvMassPhi, thnAxisInvMassPhi, thnAxisNumPhi});
115120
histos.add("MEMassUnlike", "MEMassUnlike", HistType::kTHnSparseF, {thnAxisInvMass, thnAxisDeltaR, thnAxisPt, thnAxisDeltaR, thnAxisInvMassDeltaPhi, thnAxisPtCorr});
121+
// --- NEW THnSparse storing (ΔRphi, z, A) WITHOUT applying cuts ---
122+
histos.add("SEMassUnlike_DeltaRZA", "SEMassUnlike_DeltaRZA", HistType::kTHnSparseF, {thnAxisInvMass, thnAxisPt, thnAxisDeltaRPhi, thnAxisZ, thnAxisA, thnAxisInvMassDeltaPhi});
123+
histos.add("MEMassUnlike_DeltaRZA", "MEMassUnlike_DeltaRZA", HistType::kTHnSparseF, {thnAxisInvMass, thnAxisPt, thnAxisDeltaRPhi, thnAxisZ, thnAxisA, thnAxisInvMassDeltaPhi});
116124
}
117125

118126
// get kstar
@@ -1129,6 +1137,17 @@ struct doublephimeson {
11291137
dR,
11301138
dM,
11311139
ptcorr);
1140+
1141+
// --- NEW: compute z and A from phi candidates (no cuts) ---
1142+
const double pt1 = p1.Pt();
1143+
const double pt2 = p2.Pt();
1144+
const double ptsum = pt1 + pt2;
1145+
if (ptsum <= 0.0)
1146+
continue;
1147+
const double z = pt1 / ptsum;
1148+
const double A = std::abs(pt1 - pt2) / ptsum;
1149+
// --- Fill NEW THnSparse (no cuts) ---
1150+
histos.fill(HIST("SEMassUnlike_DeltaRZA"), M, pair.Pt(), pair.Pt() * dR, z, A, dM);
11321151
}
11331152
}
11341153
PROCESS_SWITCH(doublephimeson, processopti4, "Process Optimized same event", true);
@@ -1310,6 +1329,17 @@ struct doublephimeson {
13101329
dR, // ΔR(phi1, phi2)
13111330
dM, // Δm(phi)
13121331
ptcorr); // pT correlation
1332+
1333+
// --- NEW: compute z and A from phi candidates (no cuts) ---
1334+
const double pt1 = phi1.Pt();
1335+
const double pt2 = phi2.Pt();
1336+
const double ptsum = pt1 + pt2;
1337+
if (ptsum <= 0.0)
1338+
continue;
1339+
const double z = pt1 / ptsum;
1340+
const double A = std::abs(pt1 - pt2) / ptsum;
1341+
// --- Fill NEW THnSparse (no cuts) ---
1342+
histos.fill(HIST("MEMassUnlike_DeltaRZA"), pair.M(), pair.Pt(), pair.Pt() * dR, z, A, dM);
13131343
}
13141344
}
13151345
}

0 commit comments

Comments
 (0)