Skip to content

Commit 911c7ff

Browse files
committed
Add rho shift for recoil jet distribution TTRef
1 parent d01a727 commit 911c7ff

1 file changed

Lines changed: 150 additions & 17 deletions

File tree

PWGJE/Tasks/recoilJets.cxx

Lines changed: 150 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -195,13 +195,13 @@ struct RecoilJets {
195195
multNBins{"multNBins", 600, "Number of bins for scaled FT0M multiplicity"},
196196
zdcTimeNBins{"zdcTimeNBins", 240, "Number of bins for ZDC timing histograms"};
197197

198-
ConfigurableAxis multFT0CThresh{"multFT0CThresh", {VARIABLE_WIDTH, 0.0, 0.133333, 0.233333, 0.366667, 0.533333, 0.733333, 1, 1.33333, 1.76667, 2.36667, 3.63333, 20.}, "Percentiles of scaled FT0C: 100%, 90%, 80%, 70%, 60%, 50%, 40%, 30%, 20%, 10%, 1%"};
199-
ConfigurableAxis multFT0CThreshPartLevel{"multFT0CThreshPartLevel", {VARIABLE_WIDTH, 0.0, 0.06, 0.14, 0.3, 0.46, 0.7, 1, 1.36, 1.82, 2.42, 3.64, 20.}, "Percentiles of scaled FT0C: 100%, 90%, 80%, 70%, 60%, 50%, 40%, 30%, 20%, 10%, 1%"};
198+
ConfigurableAxis multFT0CThresh{"multFT0CThresh", {VARIABLE_WIDTH, 0.0, 0.133333, 0.233333, 0.366667, 0.533333, 0.733333, 1.0, 1.33333, 1.76667, 2.36667, 3.63333, 20.}, "Percentiles of scaled FT0C: 100%, 90%, 80%, 70%, 60%, 50%, 40%, 30%, 20%, 10%, 1%, 0%"};
199+
ConfigurableAxis multFT0CThreshPartLevel{"multFT0CThreshPartLevel", {VARIABLE_WIDTH, 0.0, 0.06, 0.14, 0.3, 0.46, 0.7, 1.0, 1.36, 1.82, 2.42, 3.64, 20.}, "Percentiles of scaled FT0C: 100%, 90%, 80%, 70%, 60%, 50%, 40%, 30%, 20%, 10%, 1%, 0%"};
200200

201-
ConfigurableAxis multFT0MThresh{"multFT0MThresh", {VARIABLE_WIDTH, 0.0, 0.133333, 0.266667, 0.366667, 0.533333, 0.766667, 1, 1.33333, 1.76667, 2.33333, 3.4, 20.}, "Percentiles of scaled FT0M: 100%, 90%, 80%, 70%, 60%, 50%, 40%, 30%, 20%, 10%, 1%"};
202-
ConfigurableAxis multFT0MThreshPartLevel{"multFT0MThreshPartLevel", {VARIABLE_WIDTH, 0.0, 0.08, 0.18, 0.32, 0.5, 0.7, 1, 1.36, 1.82, 2.4, 3.5, 20.}, "Percentiles of scaled FT0M: 100%, 90%, 80%, 70%, 60%, 50%, 40%, 30%, 20%, 10%, 1%"};
201+
ConfigurableAxis multFT0MThresh{"multFT0MThresh", {VARIABLE_WIDTH, 0.0, 0.133333, 0.266667, 0.366667, 0.533333, 0.766667, 1.0, 1.33333, 1.76667, 2.33333, 3.4, 20.}, "Percentiles of scaled FT0M: 100%, 90%, 80%, 70%, 60%, 50%, 40%, 30%, 20%, 10%, 1%, 0%"};
202+
ConfigurableAxis multFT0MThreshPartLevel{"multFT0MThreshPartLevel", {VARIABLE_WIDTH, 0.0, 0.08, 0.18, 0.32, 0.5, 0.7, 1.0, 1.36, 1.82, 2.4, 3.5, 20.}, "Percentiles of scaled FT0M: 100%, 90%, 80%, 70%, 60%, 50%, 40%, 30%, 20%, 10%, 1%, 0%"};
203203

204-
ConfigurableAxis axisPtTrackEff{"axisPtTrackEff", {VARIABLE_WIDTH, 0.15, 0.2, 0.25, 0.3, 0.4, 0.5, 0.6, 0.8, 1.0, 1.2, 1.5, 2.0, 2.5, 3.0, 4.0, 5.0, 6.0, 8.0, 10.0, 12.0, 15.0, 20.0, 25.0, 30.0, 40.0, 50.0, 70.0, 100.0}, "#it{p}_{T} (GeV/#it{c})"};
204+
ConfigurableAxis axisPtTrackEff{"axisPtTrackEff", {VARIABLE_WIDTH, 0.0, 0.15, 0.2, 0.25, 0.3, 0.4, 0.5, 0.6, 0.8, 1.0, 1.2, 1.5, 2.0, 2.5, 3.0, 4.0, 5.0, 6.0, 8.0, 10.0, 12.0, 15.0, 20.0, 25.0, 30.0, 40.0, 50.0, 70.0, 100.0}, "#it{p}_{T} (GeV/#it{c})"};
205205

206206
ConfigurableAxis axisCentrality{"axisCentrality", {VARIABLE_WIDTH, -5.0, 0.0, 1.0, 2.0, 3.0, 4.0, 5.0, 10.0, 15.0, 20.0, 25.0, 30.0, 35.0, 40.0, 45.0, 50.0, 55.0, 60.0, 65.0, 70.0, 75.0, 80.0, 85.0, 90.0, 95.0, 100.0, 105.0}, "Centrality (%)"};
207207
} hist;
@@ -251,11 +251,58 @@ struct RecoilJets {
251251
float scaledFT0M = 0.f;
252252
};
253253

254+
// Indices of the FT0 percentile boundaries in the configurable axis
255+
enum FT0PercentileEdge {
256+
kEA100 = 0,
257+
kEA90,
258+
kEA80,
259+
kEA70,
260+
kEA60,
261+
kEA50,
262+
kEA40,
263+
kEA30,
264+
kEA20,
265+
kEA10,
266+
kEA1,
267+
kEA0
268+
};
269+
270+
// EA intervals used for the rho-shift correction
271+
enum EAInterval {
272+
kMB,
273+
kEA0_20,
274+
kEA0_10,
275+
kEA20_40,
276+
kEA60_80,
277+
kEA50_100,
278+
kEA80_100
279+
};
280+
281+
282+
// Configuration of an EA interval used for the TTRef rho shift
283+
struct EARhoShift {
284+
EAInterval interval;
285+
const char* label;
286+
float rhoShift;
287+
};
288+
289+
// Hard-coded rho-shift values obtained from train 701159
290+
const std::array<EARhoShift, 7> eaRhoShifts{{
291+
{kMB, "EA_MB", 0.283998f},
292+
{kEA0_20, "EA_Perc_0_20", 0.199249f},
293+
{kEA0_10, "EA_Perc_0_10", 0.186661f},
294+
{kEA20_40, "EA_Perc_20_40", 0.137945f},
295+
{kEA60_80, "EA_Perc_60_80", 0.0962535f},
296+
{kEA50_100, "EA_Perc_50_100", 0.106919f},
297+
{kEA80_100, "EA_Perc_80_100", 0.0871301f}
298+
}};
299+
254300
void init(InitContext const&)
255301
{
256302
// Initialize histogram axes: configurable
257303
AxisSpec pT{hist.jetPtMax, 0.0, hist.jetPtMax * 1., "#it{p}_{T} (GeV/#it{c})"};
258304
AxisSpec jetPTcorr{hist.jetPtMax + 20, -20., hist.jetPtMax * 1.0, "#it{p}_{T, jet}^{ch, corr} (GeV/#it{c})"};
305+
AxisSpec jetPTcorrFinnerBin{4800, -20., 100., "#it{p}_{T, jet}^{ch, corr} (GeV/#it{c})"};
259306
AxisSpec scaledFT0A{hist.multNBins, 0.0, 20., "FT0A / #LT FT0A #GT"};
260307
AxisSpec scaledFT0C{hist.multNBins, 0.0, 20., "FT0C / #LT FT0C #GT"};
261308
AxisSpec scaledFT0M{hist.multNBins, 0.0, 20., "FT0M^{*}"};
@@ -382,11 +429,11 @@ struct RecoilJets {
382429

383430
spectra.add(Form("hScaled%s_Recoil_JetPt_Corr_TTRef", eaAxis.label),
384431
Form("Events w. TT_{Ref}: scaled %s & #it{p}_{T} of recoil jets", eaAxis.label),
385-
kTH2F, {{eaAxis.axis, eaAxis.axisName}, jetPTcorr}, hist.sumw2);
432+
kTH2F, {{eaAxis.axis, eaAxis.axisName}, jetPTcorrFinnerBin}, hist.sumw2);
386433

387434
spectra.add(Form("hScaled%s_Recoil_JetPt_Corr_TTSig", eaAxis.label),
388435
Form("Events w. TT_{Sig}: scaled %s & #it{p}_{T} of recoil jets", eaAxis.label),
389-
kTH2F, {{eaAxis.axis, eaAxis.axisName}, jetPTcorr}, hist.sumw2);
436+
kTH2F, {{eaAxis.axis, eaAxis.axisName}, jetPTcorrFinnerBin}, hist.sumw2);
390437

391438
spectra.add(Form("hScaled%s_Recoil_JetPt_TTRef", eaAxis.label),
392439
Form("Events w. TT_{Ref}: scaled %s & #it{p}_{T} of recoil jets", eaAxis.label),
@@ -415,11 +462,11 @@ struct RecoilJets {
415462

416463
spectra.add(Form("hScaled%s_Recoil_JetPt_Corr_TTRef_RestrictedPhi", eaAxis.label),
417464
Form("Events w. TT_{Ref}: scaled %s & #it{p}_{T} of recoil jets", eaAxis.label),
418-
kTH2F, {{eaAxis.axis, eaAxis.axisName}, jetPTcorr}, hist.sumw2);
465+
kTH2F, {{eaAxis.axis, eaAxis.axisName}, jetPTcorrFinnerBin}, hist.sumw2);
419466

420467
spectra.add(Form("hScaled%s_Recoil_JetPt_Corr_TTSig_RestrictedPhi", eaAxis.label),
421468
Form("Events w. TT_{Sig}: scaled %s & #it{p}_{T} of recoil jets", eaAxis.label),
422-
kTH2F, {{eaAxis.axis, eaAxis.axisName}, jetPTcorr}, hist.sumw2);
469+
kTH2F, {{eaAxis.axis, eaAxis.axisName}, jetPTcorrFinnerBin}, hist.sumw2);
423470

424471
spectra.add(Form("hScaled%s_DPhi_JetPt_Corr_TTRef_RestrictedPhi", eaAxis.label),
425472
Form("Events w. TT_{Ref} #in #varphi (%.2f, %.2f): scaled %s & #Delta#varphi & #it{p}_{T, jet}^{ch}", phiMin, phiMax, eaAxis.label),
@@ -500,16 +547,23 @@ struct RecoilJets {
500547

501548
spectra.add(Form("h%s_Recoil_JetPt_Corr_TTRef", centAxis.label),
502549
Form("Events w. TT_{Ref}: %s & #it{p}_{T} of recoil jets", centAxis.label),
503-
kTH2F, {{centAxis.axis, centAxis.axisName}, jetPTcorr}, hist.sumw2);
550+
kTH2F, {{centAxis.axis, centAxis.axisName}, jetPTcorrFinnerBin}, hist.sumw2);
504551

505552
spectra.add(Form("h%s_Recoil_JetPt_Corr_TTSig", centAxis.label),
506553
Form("Events w. TT_{Sig}: %s & #it{p}_{T} of recoil jets", centAxis.label),
507-
kTH2F, {{centAxis.axis, centAxis.axisName}, jetPTcorr}, hist.sumw2);
554+
kTH2F, {{centAxis.axis, centAxis.axisName}, jetPTcorrFinnerBin}, hist.sumw2);
508555

509556
spectra.add(Form("h%s_FT0MStar", centAxis.label),
510557
Form("Correlation of %s vs. FT0M^{*}", centAxis.label),
511558
kTH2F, {{centAxis.axis, centAxis.axisName}, scaledFT0M}, hist.sumw2);
512559
}
560+
561+
// Register TTRef recoil spectra with rho-shift correction.
562+
for (const auto& ea : eaRhoShifts) {
563+
spectra.add(Form("h%s_Recoil_JetPt_Corr_RhoShifted_TTRef", ea.label),
564+
Form("%s recoil jet p_{T} (rho shifted)", ea.label),
565+
kTH1F, {jetPTcorrFinnerBin}, hist.sumw2);
566+
}
513567
}
514568

515569
// List of MC particle level distributions
@@ -567,11 +621,11 @@ struct RecoilJets {
567621

568622
spectra.add(Form("hScaled%s_Recoil_JetPt_Corr_TTRef_Part", eaAxis.label),
569623
Form("MC events w. TT_{Ref}: scaled %s & #it{p}_{T} of recoil jets", eaAxis.label),
570-
kTH2F, {{eaAxis.axis, eaAxis.axisName}, jetPTcorr}, hist.sumw2);
624+
kTH2F, {{eaAxis.axis, eaAxis.axisName}, jetPTcorrFinnerBin}, hist.sumw2);
571625

572626
spectra.add(Form("hScaled%s_Recoil_JetPt_Corr_TTSig_Part", eaAxis.label),
573627
Form("MC events w. TT_{Sig}: scaled %s & #it{p}_{T} of recoil jets", eaAxis.label),
574-
kTH2F, {{eaAxis.axis, eaAxis.axisName}, jetPTcorr}, hist.sumw2);
628+
kTH2F, {{eaAxis.axis, eaAxis.axisName}, jetPTcorrFinnerBin}, hist.sumw2);
575629

576630
spectra.add(Form("hScaled%s_Recoil_JetPt_TTRef_Part", eaAxis.label),
577631
Form("MC events w. TT_{Ref}: scaled %s & #it{p}_{T} of recoil jets", eaAxis.label),
@@ -600,11 +654,11 @@ struct RecoilJets {
600654

601655
spectra.add(Form("hScaled%s_Recoil_JetPt_Corr_TTRef_RestrictedPhi_Part", eaAxis.label),
602656
Form("Events w. TT_{Ref}: scaled %s & #it{p}_{T} of recoil jets", eaAxis.label),
603-
kTH2F, {{eaAxis.axis, eaAxis.axisName}, jetPTcorr}, hist.sumw2);
657+
kTH2F, {{eaAxis.axis, eaAxis.axisName}, jetPTcorrFinnerBin}, hist.sumw2);
604658

605659
spectra.add(Form("hScaled%s_Recoil_JetPt_Corr_TTSig_RestrictedPhi_Part", eaAxis.label),
606660
Form("Events w. TT_{Sig}: scaled %s & #it{p}_{T} of recoil jets", eaAxis.label),
607-
kTH2F, {{eaAxis.axis, eaAxis.axisName}, jetPTcorr}, hist.sumw2);
661+
kTH2F, {{eaAxis.axis, eaAxis.axisName}, jetPTcorrFinnerBin}, hist.sumw2);
608662

609663
spectra.add(Form("hScaled%s_DPhi_JetPt_Corr_TTRef_RestrictedPhi_Part", eaAxis.label),
610664
Form("MC events w. TT_{Ref} #in #varphi (%.2f, %.2f): scaled %s & #Delta#varphi & #it{p}_{T, jet}^{ch}", phiMin, phiMax, eaAxis.label),
@@ -685,11 +739,11 @@ struct RecoilJets {
685739

686740
spectra.add(Form("h%s_Recoil_JetPt_Corr_TTRef_Part", centAxis.label),
687741
Form("MC events w. TT_{Ref}: %s & #it{p}_{T} of recoil jets", centAxis.label),
688-
kTH2F, {{centAxis.axis, centAxis.axisName}, jetPTcorr}, hist.sumw2);
742+
kTH2F, {{centAxis.axis, centAxis.axisName}, jetPTcorrFinnerBin}, hist.sumw2);
689743

690744
spectra.add(Form("h%s_Recoil_JetPt_Corr_TTSig_Part", centAxis.label),
691745
Form("MC events w. TT_{Sig}: %s & #it{p}_{T} of recoil jets", centAxis.label),
692-
kTH2F, {{centAxis.axis, centAxis.axisName}, jetPTcorr}, hist.sumw2);
746+
kTH2F, {{centAxis.axis, centAxis.axisName}, jetPTcorrFinnerBin}, hist.sumw2);
693747
}
694748
}
695749

@@ -1243,6 +1297,9 @@ struct RecoilJets {
12431297
JTracks const& tracks,
12441298
float weight = 1.)
12451299
{
1300+
// Get the configured scaled FT0M percentile boundaries
1301+
const std::vector<double> ft0mEdges = hist.multFT0MThresh;
1302+
12461303
bool bSigEv = false;
12471304
std::vector<double> vPhiOfTT;
12481305
double phiTT = 0.;
@@ -1466,6 +1523,46 @@ struct RecoilJets {
14661523

14671524
if (bRecoilJet) {
14681525

1526+
// Fill EA-dependent TTRef recoil spectra using the corresponding rho shift
1527+
for (const auto& ea : eaRhoShifts) {
1528+
1529+
if (!isInEAInterval(scaledFT0M, ft0mEdges, ea.interval))
1530+
continue;
1531+
1532+
const float rhoRefShifted = rho + ea.rhoShift;
1533+
const float jetPtCorrShifted = jetPt - rhoRefShifted * jetArea;
1534+
1535+
switch (ea.interval) {
1536+
case kMB:
1537+
spectra.fill(HIST("hEA_MB_Recoil_JetPt_Corr_RhoShifted_TTRef"), jetPtCorrShifted, weight);
1538+
break;
1539+
1540+
case kEA0_20:
1541+
spectra.fill(HIST("hEA_Perc_0_20_Recoil_JetPt_Corr_RhoShifted_TTRef"), jetPtCorrShifted, weight);
1542+
break;
1543+
1544+
case kEA0_10:
1545+
spectra.fill(HIST("hEA_Perc_0_10_Recoil_JetPt_Corr_RhoShifted_TTRef"), jetPtCorrShifted, weight);
1546+
break;
1547+
1548+
case kEA20_40:
1549+
spectra.fill(HIST("hEA_Perc_20_40_Recoil_JetPt_Corr_RhoShifted_TTRef"), jetPtCorrShifted, weight);
1550+
break;
1551+
1552+
case kEA60_80:
1553+
spectra.fill(HIST("hEA_Perc_60_80_Recoil_JetPt_Corr_RhoShifted_TTRef"), jetPtCorrShifted, weight);
1554+
break;
1555+
1556+
case kEA50_100:
1557+
spectra.fill(HIST("hEA_Perc_50_100_Recoil_JetPt_Corr_RhoShifted_TTRef"), jetPtCorrShifted, weight);
1558+
break;
1559+
1560+
case kEA80_100:
1561+
spectra.fill(HIST("hEA_Perc_80_100_Recoil_JetPt_Corr_RhoShifted_TTRef"), jetPtCorrShifted, weight);
1562+
break;
1563+
}
1564+
}
1565+
14691566
// EA dependence
14701567
spectra.fill(HIST("hScaledFT0C_Recoil_JetPt_Corr_TTRef"), scaledFT0C, jetPtCorr, weight);
14711568
spectra.fill(HIST("hScaledFT0M_Recoil_JetPt_Corr_TTRef"), scaledFT0M, jetPtCorr, weight);
@@ -3580,6 +3677,42 @@ struct RecoilJets {
35803677
}
35813678
return bothSet;
35823679
}
3680+
3681+
// Check whether scaled FT0 belongs to the requested EA interval
3682+
bool isInEAInterval(float scaledFT0,
3683+
const std::vector<double>& ft0Edges,
3684+
EAInterval eaInterval)
3685+
{
3686+
switch (eaInterval) {
3687+
case kMB:
3688+
return true;
3689+
3690+
case kEA0_20:
3691+
return scaledFT0 >= ft0Edges[kEA20] &&
3692+
scaledFT0 <= ft0Edges[kEA0];
3693+
3694+
case kEA0_10:
3695+
return scaledFT0 >= ft0Edges[kEA10] &&
3696+
scaledFT0 <= ft0Edges[kEA0];
3697+
3698+
case kEA20_40:
3699+
return scaledFT0 >= ft0Edges[kEA40] &&
3700+
scaledFT0 <= ft0Edges[kEA20];
3701+
3702+
case kEA60_80:
3703+
return scaledFT0 >= ft0Edges[kEA80] &&
3704+
scaledFT0 <= ft0Edges[kEA60];
3705+
3706+
case kEA50_100:
3707+
return scaledFT0 >= ft0Edges[kEA100] &&
3708+
scaledFT0 <= ft0Edges[kEA50];
3709+
3710+
case kEA80_100:
3711+
return scaledFT0 >= ft0Edges[kEA100] &&
3712+
scaledFT0 <= ft0Edges[kEA80];
3713+
}
3714+
return false;
3715+
}
35833716
};
35843717

35853718
WorkflowSpec defineDataProcessing(ConfigContext const& cfgc)

0 commit comments

Comments
 (0)