Skip to content

Commit d9830c0

Browse files
authored
[PWGJE] fix rho shift data (#17511)
1 parent 09fa1c4 commit d9830c0

1 file changed

Lines changed: 75 additions & 20 deletions

File tree

PWGJE/Tasks/recoilJets.cxx

Lines changed: 75 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -195,17 +195,30 @@ 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.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%"};
198+
ConfigurableAxis multFT0CThresh{"multFT0CThresh", {VARIABLE_WIDTH, 0.0, 0.109421, 0.215022, 0.343214, 0.50515, 0.712277, 0.978245, 1.3189, 1.75744, 2.36001, 3.59696, 25.}, "Percentiles of scaled FT0C: 100%, 90%, 80%, 70%, 60%, 50%, 40%, 30%, 20%, 10%, 1%"};
199+
ConfigurableAxis multFT0CThreshPartLevel{"multFT0CThreshPartLevel", {VARIABLE_WIDTH, 0.0, 0.0570661, 0.13847, 0.280558, 0.457027, 0.692287, 0.983008, 1.34127, 1.80253, 2.41528, 3.62342, 25.}, "Percentiles of scaled FT0C: 100%, 90%, 80%, 70%, 60%, 50%, 40%, 30%, 20%, 10%, 1%"};
200200

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%"};
201+
ConfigurableAxis multFT0MThresh{"multFT0MThresh", {VARIABLE_WIDTH, 0.0, 0.130987, 0.237916, 0.36664, 0.528441, 0.734705, 0.996611, 1.32785, 1.74896, 2.31024, 3.37852, 25.}, "Percentiles of scaled FT0M: 100%, 90%, 80%, 70%, 60%, 50%, 40%, 30%, 20%, 10%, 1%"};
202+
ConfigurableAxis multFT0MThreshPartLevel{"multFT0MThreshPartLevel", {VARIABLE_WIDTH, 0.0, 0.0682096, 0.160082, 0.302476, 0.480633, 0.699907, 0.986263, 1.34813, 1.80188, 2.39325, 3.49311, 25.}, "Percentiles of scaled FT0M: 100%, 90%, 80%, 70%, 60%, 50%, 40%, 30%, 20%, 10%, 1%"};
203203

204204
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;
208208

209+
// ---------- Rho-shift settings ----------
210+
struct RhoShift : ConfigurableGroup {
211+
std::string prefix = "rhoShiftTTRef";
212+
213+
Configurable<float> mb{"mb", 0.283998f, "Rho shift for MB"};
214+
Configurable<float> ea0To20{"ea0To20", 0.199249f, "Rho shift for EA 0-20%"};
215+
Configurable<float> ea0To10{"ea0To10", 0.186661f, "Rho shift for EA 0-10%"};
216+
Configurable<float> ea20To40{"ea20To40", 0.137945f, "Rho shift for EA 20-40%"};
217+
Configurable<float> ea60To80{"ea60To80", 0.0962535f, "Rho shift for EA 60-80%"};
218+
Configurable<float> ea50To100{"ea50To100", 0.106919f, "Rho shift for EA 50-100%"};
219+
Configurable<float> ea80To100{"ea80To100", 0.0871301f, "Rho shift for EA 80-100%"};
220+
} cfgRhoShift;
221+
209222
// Auxiliary variables
210223
std::unique_ptr<TRandom3> randGen = std::make_unique<TRandom3>(0);
211224

@@ -269,7 +282,7 @@ struct RecoilJets {
269282

270283
// EA intervals used for the rho-shift correction
271284
enum EAInterval {
272-
kMB,
285+
kMB = 0,
273286
kEA0_20,
274287
kEA0_10,
275288
kEA20_40,
@@ -285,17 +298,25 @@ struct RecoilJets {
285298
float rhoShift;
286299
};
287300

288-
// Hard-coded rho-shift values obtained from train 701159
289-
std::array<EARhoShift, 7> eaRhoShifts{{{.interval = kMB, .label = "EA_MB", .rhoShift = 0.283998f},
290-
{.interval = kEA0_20, .label = "EA_Perc_0_20", .rhoShift = 0.199249f},
291-
{.interval = kEA0_10, .label = "EA_Perc_0_10", .rhoShift = 0.186661f},
292-
{.interval = kEA20_40, .label = "EA_Perc_20_40", .rhoShift = 0.137945f},
293-
{.interval = kEA60_80, .label = "EA_Perc_60_80", .rhoShift = 0.0962535f},
294-
{.interval = kEA50_100, .label = "EA_Perc_50_100", .rhoShift = 0.106919f},
295-
{.interval = kEA80_100, .label = "EA_Perc_80_100", .rhoShift = 0.0871301f}}};
301+
std::array<EARhoShift, 7> eaRhoShifts{{{.interval = kMB, .label = "EA_MB", .rhoShift = 0.0f},
302+
{.interval = kEA0_20, .label = "EA_Perc_0_20", .rhoShift = 0.0f},
303+
{.interval = kEA0_10, .label = "EA_Perc_0_10", .rhoShift = 0.0f},
304+
{.interval = kEA20_40, .label = "EA_Perc_20_40", .rhoShift = 0.0f},
305+
{.interval = kEA60_80, .label = "EA_Perc_60_80", .rhoShift = 0.0f},
306+
{.interval = kEA50_100, .label = "EA_Perc_50_100", .rhoShift = 0.0f},
307+
{.interval = kEA80_100, .label = "EA_Perc_80_100", .rhoShift = 0.0f}}};
296308

297309
void init(InitContext const&)
298310
{
311+
// Initialize rho-shift values from configurables
312+
eaRhoShifts[kMB].rhoShift = cfgRhoShift.mb.value;
313+
eaRhoShifts[kEA0_20].rhoShift = cfgRhoShift.ea0To20.value;
314+
eaRhoShifts[kEA0_10].rhoShift = cfgRhoShift.ea0To10.value;
315+
eaRhoShifts[kEA20_40].rhoShift = cfgRhoShift.ea20To40.value;
316+
eaRhoShifts[kEA60_80].rhoShift = cfgRhoShift.ea60To80.value;
317+
eaRhoShifts[kEA50_100].rhoShift = cfgRhoShift.ea50To100.value;
318+
eaRhoShifts[kEA80_100].rhoShift = cfgRhoShift.ea80To100.value;
319+
299320
// Initialize histogram axes: configurable
300321
AxisSpec pT{hist.jetPtMax, 0.0, hist.jetPtMax * 1., "#it{p}_{T} (GeV/#it{c})"};
301322
AxisSpec jetPTcorr{hist.jetPtMax + 20, -20., hist.jetPtMax * 1.0, "#it{p}_{T, jet}^{ch, corr} (GeV/#it{c})"};
@@ -1449,6 +1470,47 @@ struct RecoilJets {
14491470

14501471
spectra.fill(HIST("hCentFT0C_Rho_TTRef"), centFT0C, rho, weight);
14511472
spectra.fill(HIST("hCentFT0M_Rho_TTRef"), centFT0M, rho, weight);
1473+
1474+
//_____________________________________________________
1475+
// Fill EA-dependent rho spectra in events with TTRef with corresponding rho shift
1476+
for (const auto& ea : eaRhoShifts) {
1477+
1478+
if (!isInEAInterval(scaledFT0M, ft0mEdges, ea.interval)) {
1479+
continue;
1480+
}
1481+
1482+
const float rhoRefShifted = rho + ea.rhoShift;
1483+
1484+
switch (ea.interval) {
1485+
case kMB:
1486+
spectra.fill(HIST("hEA_MB_RhoShifted_TTRef"), rhoRefShifted, weight);
1487+
break;
1488+
1489+
case kEA0_20:
1490+
spectra.fill(HIST("hEA_Perc_0_20_RhoShifted_TTRef"), rhoRefShifted, weight);
1491+
break;
1492+
1493+
case kEA0_10:
1494+
spectra.fill(HIST("hEA_Perc_0_10_RhoShifted_TTRef"), rhoRefShifted, weight);
1495+
break;
1496+
1497+
case kEA20_40:
1498+
spectra.fill(HIST("hEA_Perc_20_40_RhoShifted_TTRef"), rhoRefShifted, weight);
1499+
break;
1500+
1501+
case kEA60_80:
1502+
spectra.fill(HIST("hEA_Perc_60_80_RhoShifted_TTRef"), rhoRefShifted, weight);
1503+
break;
1504+
1505+
case kEA50_100:
1506+
spectra.fill(HIST("hEA_Perc_50_100_RhoShifted_TTRef"), rhoRefShifted, weight);
1507+
break;
1508+
1509+
case kEA80_100:
1510+
spectra.fill(HIST("hEA_Perc_80_100_RhoShifted_TTRef"), rhoRefShifted, weight);
1511+
break;
1512+
}
1513+
}
14521514
}
14531515
}
14541516

@@ -1540,37 +1602,30 @@ struct RecoilJets {
15401602
switch (ea.interval) {
15411603
case kMB:
15421604
spectra.fill(HIST("hEA_MB_Recoil_JetPt_Corr_RhoShifted_TTRef"), jetPtCorrShifted, weight);
1543-
spectra.fill(HIST("hEA_MB_RhoShifted_TTRef"), rhoRefShifted, weight);
15441605
break;
15451606

15461607
case kEA0_20:
15471608
spectra.fill(HIST("hEA_Perc_0_20_Recoil_JetPt_Corr_RhoShifted_TTRef"), jetPtCorrShifted, weight);
1548-
spectra.fill(HIST("hEA_Perc_0_20_RhoShifted_TTRef"), rhoRefShifted, weight);
15491609
break;
15501610

15511611
case kEA0_10:
15521612
spectra.fill(HIST("hEA_Perc_0_10_Recoil_JetPt_Corr_RhoShifted_TTRef"), jetPtCorrShifted, weight);
1553-
spectra.fill(HIST("hEA_Perc_0_10_RhoShifted_TTRef"), rhoRefShifted, weight);
15541613
break;
15551614

15561615
case kEA20_40:
15571616
spectra.fill(HIST("hEA_Perc_20_40_Recoil_JetPt_Corr_RhoShifted_TTRef"), jetPtCorrShifted, weight);
1558-
spectra.fill(HIST("hEA_Perc_20_40_RhoShifted_TTRef"), rhoRefShifted, weight);
15591617
break;
15601618

15611619
case kEA60_80:
15621620
spectra.fill(HIST("hEA_Perc_60_80_Recoil_JetPt_Corr_RhoShifted_TTRef"), jetPtCorrShifted, weight);
1563-
spectra.fill(HIST("hEA_Perc_60_80_RhoShifted_TTRef"), rhoRefShifted, weight);
15641621
break;
15651622

15661623
case kEA50_100:
15671624
spectra.fill(HIST("hEA_Perc_50_100_Recoil_JetPt_Corr_RhoShifted_TTRef"), jetPtCorrShifted, weight);
1568-
spectra.fill(HIST("hEA_Perc_50_100_RhoShifted_TTRef"), rhoRefShifted, weight);
15691625
break;
15701626

15711627
case kEA80_100:
15721628
spectra.fill(HIST("hEA_Perc_80_100_Recoil_JetPt_Corr_RhoShifted_TTRef"), jetPtCorrShifted, weight);
1573-
spectra.fill(HIST("hEA_Perc_80_100_RhoShifted_TTRef"), rhoRefShifted, weight);
15741629
break;
15751630
}
15761631
}

0 commit comments

Comments
 (0)