Skip to content

Commit 919f31a

Browse files
committed
[PWGJE] Add new plots for Ds jets
1 parent 25dfd1d commit 919f31a

File tree

1 file changed

+60
-45
lines changed

1 file changed

+60
-45
lines changed

PWGJE/Tasks/jetDsSpectrumAndSubstructure.cxx

Lines changed: 60 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
// This task is used to reconstruct and analyse jets containing charged D_s
1515
// mesons
1616
//
17-
/// \author Monalisa Melo <monalisa.melo@cern.ch>
17+
/// \author Monalisa Melo <monalisa.melo@cern.ch>, Universidade de São Paulo
1818
//
1919

2020
#include "PWGHF/Core/DecayChannels.h"
@@ -105,13 +105,14 @@ struct JetDsSpecSubs {
105105
{"h_jet_eta", "jet #eta;#eta_{jet};entries", {HistType::kTH1F, {{100, -1.0, 1.0}}}},
106106
{"h_jet_phi", "jet #phi;#phi_{jet};entries", {HistType::kTH1F, {{80, -1.0, 7.}}}},
107107
{"h_collision_counter", "# of collisions;", {HistType::kTH1F, {{200, 0., 200.}}}},
108-
{"h_jet_counter", ";# of D_{S} jets;", {HistType::kTH1F, {{6, 0., 3.0}}}},
108+
{"h_jet_counter", ";type;counts", {HistType::kTH1F, {{2, 0., 2.}}}},
109109
{"h_ds_jet_projection", ";z^{D_{S},jet}_{||};dN/dz^{D_{S},jet}_{||}", {HistType::kTH1F, {{1000, 0., 2.}}}},
110110
{"h_ds_jet_distance_vs_projection", ";#DeltaR_{D_{S},jet};z^{D_{S},jet}_{||}", {HistType::kTH2F, {{1000, 0., 1.}, {1000, 0., 2.}}}},
111111
{"h_ds_jet_distance", ";#DeltaR_{D_{S},jet};dN/d(#DeltaR)", {HistType::kTH1F, {{1000, 0., 1.}}}},
112112
{"h_ds_jet_pt", ";p_{T,D_{S} jet};dN/dp_{T,D_{S} jet}", {HistType::kTH1F, {{1000, 0., 100.}}}},
113113
{"h_ds_jet_eta", ";#eta_{D_{S} jet};entries", {HistType::kTH1F, {{250, -1., 1.}}}},
114114
{"h_ds_jet_phi", ";#phi_{D_{S} jet};entries", {HistType::kTH1F, {{250, -1., 7.}}}},
115+
{"hSparse_ds", ";m_{D_{S}};p_{T,D_{S}};z^{D_{S},jet}_{||};#DeltaR_{D_{S},jet}", {HistType::kTHnSparseF, {{60, 1.7, 2.1}, {60, 0., 100.}, {60, 0., 2.}, {60, 0., 1.0}}}},
115116
{"h_ds_mass", ";m_{D_{S}} (GeV/c^{2});entries", {HistType::kTH1F, {{1000, 0., 6.}}}},
116117
{"h_ds_eta", ";#eta_{D_{S}};entries", {HistType::kTH1F, {{250, -1., 1.}}}},
117118
{"h_ds_phi", ";#phi_{D_{S}};entries", {HistType::kTH1F, {{250, -1., 7.}}}},
@@ -123,8 +124,6 @@ struct JetDsSpecSubs {
123124
{"h2_dsjet_pt_lambda12", ";#it{p}_{T,jet} (GeV/#it{c});#lambda_{2}^{1}", {HistType::kTH2F, {{100, 0., 100.}, {200, 0., 1.0}}}},
124125
{"h2_dsjet_pt_mass", ";#it{p}_{T,jet} (GeV/#it{c});m_{jet}^{ch} (GeV/#it{c}^{2})", {HistType::kTH2F, {{100, 0., 100.}, {200, 0., 50.0}}}},
125126
{"h2_dsjet_pt_girth", ";#it{p}_{T,jet} (GeV/#it{c});g", {HistType::kTH2F, {{100, 0., 100.}, {200, 0., 0.5}}}},
126-
{"h_ds_jet_lambda_extra", ";#lambda_{#alpha}^{#kappa};entries", {HistType::kTH1F, {{200, 0., 1.0}}}},
127-
{"h2_dsjet_pt_lambda_extra", ";#it{p}_{T,jet} (GeV/#it{c});#lambda_{#alpha}^{#kappa}", {HistType::kTH2F, {{100, 0., 100.}, {200, 0., 1.0}}}},
128127
}};
129128

130129
Configurable<float> vertexZCut{"vertexZCut", 10.0f, "Accepted z-vertex range"};
@@ -134,12 +133,6 @@ struct JetDsSpecSubs {
134133
Configurable<std::string> eventSelections{"eventSelections", "sel8", "choose event selection"};
135134
Configurable<std::string> trackSelections{"trackSelections", "globalTracks", "set track selections"};
136135

137-
// extra angularity knob
138-
Configurable<float> kappa{"kappa", 1.0f, "angularity kappa"};
139-
Configurable<float> alpha{"alpha", 1.0f, "angularity alpha"};
140-
141-
bool doExtraAngularity = false;
142-
143136
std::vector<int> eventSelectionBits;
144137
int trackSelection = -1;
145138

@@ -194,9 +187,9 @@ struct JetDsSpecSubs {
194187
eventSelectionBits = jetderiveddatautilities::initialiseEventSelectionBits(static_cast<std::string>(eventSelections));
195188
trackSelection = jetderiveddatautilities::initialiseTrackSelection(static_cast<std::string>(trackSelections));
196189

197-
const bool is11 = (std::abs(kappa.value - 1.f) < 1e-6f) && (std::abs(alpha.value - 1.f) < 1e-6f);
198-
const bool is12 = (std::abs(kappa.value - 1.f) < 1e-6f) && (std::abs(alpha.value - 2.f) < 1e-6f);
199-
doExtraAngularity = !(is11 || is12);
190+
auto h = registry.get<TH1>(HIST("h_jet_counter"));
191+
h->GetXaxis()->SetBinLabel(1, "All jets");
192+
h->GetXaxis()->SetBinLabel(2, "Ds-tagged jets");
200193
}
201194

202195
Filter jetCuts = aod::jet::pt > jetPtMin&& aod::jet::r == nround(jetR.node() * 100.0f);
@@ -208,6 +201,7 @@ struct JetDsSpecSubs {
208201
if (!jetderiveddatautilities::selectCollision(collision, eventSelectionBits)) {
209202
return;
210203
}
204+
211205
registry.fill(HIST("h_collisions"), 1.5);
212206

213207
for (auto const& track : tracks) {
@@ -248,73 +242,94 @@ struct JetDsSpecSubs {
248242
registry.fill(HIST("h_collision_counter"), 3.0);
249243

250244
for (const auto& jet : jets) {
245+
251246
registry.fill(HIST("h_jet_counter"), 0.5);
252247

248+
bool hasDs = false;
249+
253250
TVector3 jetVector(jet.px(), jet.py(), jet.pz());
254251

252+
// Compute jet-level quantities once (independent of Ds candidates)
253+
auto jetTracks = jet.tracks_as<aod::JetTracks>();
254+
255+
const float lambda11 = computeLambda(jet, jetTracks, 1.f, 1.f);
256+
const float lambda12 = computeLambda(jet, jetTracks, 2.f, 1.f);
257+
const float mjet = computeJetMassFromTracksMass(jetTracks);
258+
259+
const float R = jet.r() / 100.f;
260+
const float girth = (lambda11 >= 0.f) ? (lambda11 * R) : -1.f;
261+
262+
// Loop over Ds candidates (particle level)
255263
for (const auto& dsCandidate : jet.candidates_as<aod::CandidatesDsData>()) {
264+
265+
hasDs = true;
266+
256267
TVector3 dsVector(dsCandidate.px(), dsCandidate.py(), dsCandidate.pz());
257268

269+
// zParallel defined as longitudinal momentum fraction along the jet axis
258270
const double zParallel = (jetVector * dsVector) / (jetVector * jetVector);
259271
const double axisDistance = jetutilities::deltaR(jet, dsCandidate);
260272

273+
// --- Ds-level observables ---
261274
registry.fill(HIST("h_ds_jet_projection"), zParallel);
262275
registry.fill(HIST("h_ds_jet_distance_vs_projection"), axisDistance, zParallel);
263276
registry.fill(HIST("h_ds_jet_distance"), axisDistance);
264-
registry.fill(HIST("h_ds_jet_pt"), jet.pt());
265-
registry.fill(HIST("h_ds_jet_eta"), jet.eta());
266-
registry.fill(HIST("h_ds_jet_phi"), jet.phi());
277+
267278
registry.fill(HIST("h_ds_mass"), dsCandidate.m());
268279
registry.fill(HIST("h_ds_eta"), dsCandidate.eta());
269280
registry.fill(HIST("h_ds_phi"), dsCandidate.phi());
270281

271-
auto jetTracks = jet.tracks_as<aod::JetTracks>();
282+
const float mass = dsCandidate.m();
283+
const float pt = dsCandidate.pt();
284+
const float z = zParallel;
285+
const float dR = axisDistance;
272286

273-
const float lambda11 = computeLambda(jet, jetTracks, 1.f, 1.f);
274-
const float lambda12 = computeLambda(jet, jetTracks, 2.f, 1.f); // thrust = λ_2^1
275-
const float mjet = computeJetMassFromTracksMass(jetTracks);
287+
// Main THnSparse: invariant mass, pT, z, and ΔR
288+
registry.fill(HIST("hSparse_ds"), mass, pt, z, dR);
276289

277-
const float R = jet.r() / 100.f;
278-
const float girth = (lambda11 >= 0.f) ? (lambda11 * R) : -1.f;
290+
// --- output table ---
291+
auto scores = dsCandidate.mlScores();
292+
const float s0 = (scores.size() > 0) ? scores[0] : -999.f;
293+
const float s1 = (scores.size() > 1) ? scores[1] : -999.f;
294+
const float s2 = (scores.size() > 2) ? scores[2] : -999.f;
279295

296+
distJetTable(static_cast<float>(axisDistance),
297+
jet.pt(), jet.eta(), jet.phi(),
298+
static_cast<int>(jetTracks.size()),
299+
dsCandidate.pt(), dsCandidate.eta(), dsCandidate.phi(),
300+
dsCandidate.m(), dsCandidate.y(),
301+
s0, s1, s2,
302+
mjet, girth, lambda12, lambda11);
303+
}
304+
305+
// Jet-level quantities (filled once per jet containing at least one Ds)
306+
if (hasDs) {
307+
308+
registry.fill(HIST("h_jet_counter"), 1.5);
309+
310+
// Jet properties
311+
registry.fill(HIST("h_ds_jet_pt"), jet.pt());
312+
registry.fill(HIST("h_ds_jet_eta"), jet.eta());
313+
registry.fill(HIST("h_ds_jet_phi"), jet.phi());
314+
315+
// Jet substructure observables
280316
if (lambda11 >= 0.f) {
281317
registry.fill(HIST("h_ds_jet_lambda11"), lambda11);
282318
registry.fill(HIST("h2_dsjet_pt_lambda11"), jet.pt(), lambda11);
283319
}
320+
284321
if (lambda12 >= 0.f) {
285322
registry.fill(HIST("h_ds_jet_lambda12"), lambda12);
286323
registry.fill(HIST("h2_dsjet_pt_lambda12"), jet.pt(), lambda12);
287324
}
325+
288326
registry.fill(HIST("h_ds_jet_mass"), mjet);
289327
registry.fill(HIST("h2_dsjet_pt_mass"), jet.pt(), mjet);
290328

291329
if (girth >= 0.f) {
292330
registry.fill(HIST("h_ds_jet_girth"), girth);
293331
registry.fill(HIST("h2_dsjet_pt_girth"), jet.pt(), girth);
294332
}
295-
296-
if (doExtraAngularity) {
297-
const float lambdaExtra = computeLambda(jet, jetTracks, alpha.value, kappa.value);
298-
if (lambdaExtra >= 0.f) {
299-
registry.fill(HIST("h_ds_jet_lambda_extra"), lambdaExtra);
300-
registry.fill(HIST("h2_dsjet_pt_lambda_extra"), jet.pt(), lambdaExtra);
301-
}
302-
}
303-
304-
auto scores = dsCandidate.mlScores();
305-
const float s0 = (scores.size() > 0) ? scores[0] : -999.f;
306-
const float s1 = (scores.size() > 1) ? scores[1] : -999.f;
307-
const float s2 = (scores.size() > 2) ? scores[2] : -999.f;
308-
309-
distJetTable(static_cast<float>(axisDistance),
310-
jet.pt(), jet.eta(), jet.phi(),
311-
static_cast<int>(jetTracks.size()),
312-
dsCandidate.pt(), dsCandidate.eta(), dsCandidate.phi(),
313-
dsCandidate.m(), dsCandidate.y(),
314-
s0, s1, s2,
315-
mjet, girth, lambda12, lambda11);
316-
317-
break; // only first Ds per jet
318333
}
319334
}
320335
}

0 commit comments

Comments
 (0)