Skip to content

Commit 7471a7d

Browse files
nstrangmNicolas Strangmann
andauthored
[PWGEM/PhotonMeson,PWGJE/EMCal] Add MC smearing functionality and add found FT0 gen histogram (#11918)
Co-authored-by: Nicolas Strangmann <nicolas.strangmann@.cern.ch>
1 parent 05d0bb2 commit 7471a7d

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

PWGEM/PhotonMeson/Tasks/emcalBcWiseGammaGamma.cxx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,10 +113,12 @@ struct EmcalBcWiseGammaGamma {
113113
mHistManager.add("True/eta_invMassVsPt_HadronicShower", "Reconstructed validated eta meson from hadronic shower;#bf{#it{M}^{#gamma#gamma} (GeV/#it{c}^{2})};#bf{#it{p}_{T}^{#gamma#gamma} (GeV/#it{c})};#bf{FT0M centrality (%)}", HistType::kTH3F, {{400, 0., 0.8}, {200, 0., 20.}, cfgCentralityBinning});
114114

115115
mHistManager.add("Generated/pi0_AllBCs", "pT spectrum of generated pi0s in all BCs;#bf{#it{p}_{T} (GeV/#it{c})};#bf{FT0M centrality (%)};#bf{#it{N}_{#pi^{0}}^{gen}}", HistType::kTH2F, {{200, 0, 20}, cfgCentralityBinning});
116+
mHistManager.add("Generated/pi0_FT0", "pT spectrum of generated pi0s in BCs with found FT0;#bf{#it{p}_{T} (GeV/#it{c})};#bf{FT0M centrality (%)};#bf{#it{N}_{#pi^{0}}^{gen}}", HistType::kTH2F, {{200, 0, 20}, cfgCentralityBinning});
116117
mHistManager.add("Generated/pi0_TVX", "pT spectrum of generated pi0s in TVX triggered BCs;#bf{#it{p}_{T} (GeV/#it{c})};#bf{FT0M centrality (%)};#bf{#it{N}_{#pi^{0}}^{gen}}", HistType::kTH2F, {{200, 0, 20}, cfgCentralityBinning});
117118
mHistManager.add("Generated/pi0_kTVXinEMC", "pT spectrum of generated pi0s in kTVXinEMC triggered BCs;#bf{#it{p}_{T} (GeV/#it{c})};#bf{FT0M centrality (%)};#bf{#it{N}_{#pi^{0}}^{gen}}", HistType::kTH2F, {{200, 0, 20}, cfgCentralityBinning});
118119
mHistManager.add("Accepted/pi0_kTVXinEMC", "pT spectrum of accepted pi0s in kTVXinEMC triggered BCs;#bf{#it{p}_{T} (GeV/#it{c})};#bf{FT0M centrality (%)};#bf{#it{N}_{#pi^{0}}^{acc}}", HistType::kTH2F, {{200, 0, 20}, cfgCentralityBinning});
119120
mHistManager.add("Generated/eta_AllBCs", "pT spectrum of generated eta mesons in all BCs;#bf{#it{p}_{T} (GeV/#it{c})};#bf{FT0M centrality (%)};#bf{#it{N}_{#eta}^{gen}}", HistType::kTH2F, {{200, 0, 20}, cfgCentralityBinning});
121+
mHistManager.add("Generated/eta_FT0", "pT spectrum of generated eta mesons in BCs with found FT0;#bf{#it{p}_{T} (GeV/#it{c})};#bf{FT0M centrality (%)};#bf{#it{N}_{#eta}^{gen}}", HistType::kTH2F, {{200, 0, 20}, cfgCentralityBinning});
120122
mHistManager.add("Generated/eta_TVX", "pT spectrum of generated eta mesons in TVX triggered BCs;#bf{#it{p}_{T} (GeV/#it{c})};#bf{FT0M centrality (%)};#bf{#it{N}_{#eta}^{gen}}", HistType::kTH2F, {{200, 0, 20}, cfgCentralityBinning});
121123
mHistManager.add("Generated/eta_kTVXinEMC", "pT spectrum of generated eta mesons in kTVXinEMC triggered BCs;#bf{#it{p}_{T} (GeV/#it{c})};#bf{FT0M centrality (%)};#bf{#it{N}_{#eta}^{gen}}", HistType::kTH2F, {{200, 0, 20}, cfgCentralityBinning});
122124
mHistManager.add("Accepted/eta_kTVXinEMC", "pT spectrum of accepted eta mesons in kTVXinEMC triggered BCs;#bf{#it{p}_{T} (GeV/#it{c})};#bf{FT0M centrality (%)};#bf{#it{N}_{#eta}^{acc}}", HistType::kTH2F, {{200, 0, 20}, cfgCentralityBinning});
@@ -306,6 +308,8 @@ struct EmcalBcWiseGammaGamma {
306308
for (const auto& mcPi0 : mcPi0s) {
307309
if (mcPi0.isPrimary()) {
308310
mHistManager.fill(HIST("Generated/pi0_AllBCs"), mcPi0.pt(), bc.centrality());
311+
if (bc.hasFT0())
312+
mHistManager.fill(HIST("Generated/pi0_FT0"), mcPi0.pt(), bc.centrality());
309313
if (bc.hasTVX())
310314
mHistManager.fill(HIST("Generated/pi0_TVX"), mcPi0.pt(), bc.centrality());
311315
if (bc.haskTVXinEMC())
@@ -317,6 +321,8 @@ struct EmcalBcWiseGammaGamma {
317321
for (const auto& mcEta : mcEtas) {
318322
if (mcEta.isPrimary()) {
319323
mHistManager.fill(HIST("Generated/eta_AllBCs"), mcEta.pt(), bc.centrality());
324+
if (bc.hasFT0())
325+
mHistManager.fill(HIST("Generated/eta_FT0"), mcEta.pt(), bc.centrality());
320326
if (bc.hasTVX())
321327
mHistManager.fill(HIST("Generated/eta_TVX"), mcEta.pt(), bc.centrality());
322328
if (bc.haskTVXinEMC())

PWGJE/TableProducer/emcalCorrectionTask.cxx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,7 @@ struct EmcalCorrectionTask {
117117
Configurable<bool> applyTempCalib{"applyTempCalib", false, "Switch to turn on Temperature calibration."};
118118
Configurable<std::string> pathTempCalibCCDB{"pathTempCalibCCDB", "Users/j/jokonig/EMCalTempCalibParams", "Path in the ccdb where slope and intercept for each cell are stored"}; // change to official path as soon as it is available
119119
Configurable<bool> useTempCalibMean{"useTempCalibMean", false, "Switch to turn on Temperature mean calculation instead of median."};
120+
Configurable<float> mcCellEnergyResolutionBroadening{"mcCellEnergyResolutionBroadening", 0., "Relative widening of the MC cell energy resolution. 0 for no widening, 0.1 for 10% widening, etc. Only applied to MC."};
120121

121122
// Require EMCAL cells (CALO type 1)
122123
Filter emccellfilter = aod::calo::caloType == selectedCellType;
@@ -488,6 +489,9 @@ struct EmcalCorrectionTask {
488489
if (static_cast<bool>(hasShaperCorrection) && emcal::intToChannelType(cell.cellType()) == emcal::ChannelType_t::LOW_GAIN) { // Apply shaper correction to LG cells
489490
amplitude = o2::emcal::NonlinearityHandler::evaluateShaperCorrectionCellEnergy(amplitude);
490491
}
492+
if (mcCellEnergyResolutionBroadening != 0.) {
493+
amplitude *= (1. + normalgaus(rdgen) * mcCellEnergyResolutionBroadening); // Fine tune the MC cell energy resolution
494+
}
491495
cellsBC.emplace_back(cell.cellNumber(),
492496
amplitude,
493497
cell.time() + getCellTimeShift(cell.cellNumber(), amplitude, o2::emcal::intToChannelType(cell.cellType()), runNumber),

0 commit comments

Comments
 (0)