Skip to content

Commit 1388606

Browse files
[PWGLF] Fix recalibrate procedure (#17888)
Co-authored-by: ALICE Action Bot <alibuild@cern.ch>
1 parent 5e60851 commit 1388606

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

PWGLF/Utils/mcCentralityModule.h

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -202,10 +202,10 @@ struct BuilderModule {
202202
std::vector<std::shared_ptr<TProfile>> hCalibPVMC;
203203

204204
int nEnabledTables = 0;
205-
int mRunNumber;
205+
int mRunNumber = 0;
206206

207207
// TAxis
208-
int nCentBins;
208+
int nCentBins = 0;
209209
std::vector<double> centralityBins;
210210

211211
// Registers the on-the-fly-calibration QA histograms for one estimator (no-op unless recalibrateCentrality
@@ -445,7 +445,7 @@ struct BuilderModule {
445445
double meanMult_MC = -1;
446446
double diffMultDataVsMC = 1e+09;
447447
int endBinMc = startBinMc;
448-
for (int j = startBinMc; j >= 1; j--) {
448+
for (int j = startBinMc - 1; j >= 1; j--) {
449449
// Loop over MC bins
450450
TH1D* projMC = h2dMultRecoVsMultGen_MC->ProjectionY("", j, startBinMc);
451451
int nEntries = projMC->Integral();
@@ -518,9 +518,9 @@ struct BuilderModule {
518518
double meanMult_MC = -1;
519519
double diffMultDataVsMC = 1e+09;
520520
int endBinMc = h1dCalib->GetNbinsX();
521-
for (int j = startBinMc; j <= h1dCalib->GetNbinsX(); j++) {
521+
for (int j = startBinMc + 1; j <= h1dCalib->GetNbinsX(); j++) {
522522
// Loop over MC bins
523-
TH1D* projMC = h2dMultRecoVsMultGen_MC->ProjectionY("", startBinMc, endBinMc);
523+
TH1D* projMC = h2dMultRecoVsMultGen_MC->ProjectionY("", startBinMc, j);
524524
int nEntries = projMC->Integral();
525525
double meanMC = projMC->GetMean();
526526
double ldiff = std::abs(meanMC - meanMult_Data);
@@ -733,4 +733,4 @@ struct BuilderModule {
733733
} // namespace pwglf
734734
} // namespace o2
735735

736-
#endif // PWGLF_UTILS_MCCENTRALITYMODULE_
736+
#endif // PWGLF_UTILS_MCCENTRALITYMODULE_H_

0 commit comments

Comments
 (0)