diff --git a/PWGCF/FemtoUniverse/Core/FemtoUniverseEfficiencyCalculator.h b/PWGCF/FemtoUniverse/Core/FemtoUniverseEfficiencyCalculator.h index da40cfbf4d3..7b66ac2fc45 100644 --- a/PWGCF/FemtoUniverse/Core/FemtoUniverseEfficiencyCalculator.h +++ b/PWGCF/FemtoUniverse/Core/FemtoUniverseEfficiencyCalculator.h @@ -23,6 +23,8 @@ #include "CCDB/BasicCCDBManager.h" #include "Framework/Configurable.h" +#include + #include #include #include @@ -36,7 +38,7 @@ enum ParticleNo : size_t { }; template -concept isOneOrTwo = T == ParticleNo::ONE || T == ParticleNo::TWO; +concept IsOneOrTwo = T == ParticleNo::ONE || T == ParticleNo::TWO; template consteval auto getHistDim() -> int @@ -104,7 +106,7 @@ class EfficiencyCalculator auto hEff = hLoaded[partNo - 1]; if (shouldApplyCorrections && hEff) { - auto bin = hEff->FindBin(binVars...); + auto bin = hEff->FindBin(static_cast(binVars)...); auto eff = hEff->GetBinContent(bin); weight /= eff > 0 ? eff : 1.0f; } @@ -149,8 +151,11 @@ class EfficiencyCalculator LOGF(warn, notify("Histogram \"%s/%ld\" has been loaded, but it is empty"), config->confCCDBPath.value, timestamp); } + auto clonedEffHist = static_cast(hEff->Clone()); + clonedEffHist->SetDirectory(nullptr); + LOGF(info, notify("Successfully loaded %ld"), timestamp); - return hEff; + return clonedEffHist; } EfficiencyConfigurableGroup* config{}; @@ -158,7 +163,7 @@ class EfficiencyCalculator bool shouldApplyCorrections = false; o2::ccdb::BasicCCDBManager& ccdb{o2::ccdb::BasicCCDBManager::instance()}; - std::array hLoaded{}; + std::array hLoaded{nullptr, nullptr}; }; } // namespace o2::analysis::femto_universe::efficiency diff --git a/PWGCF/FemtoUniverse/Tasks/femtoUniversePairTaskTrackD0.cxx b/PWGCF/FemtoUniverse/Tasks/femtoUniversePairTaskTrackD0.cxx index 57abc100ee4..4305313815e 100644 --- a/PWGCF/FemtoUniverse/Tasks/femtoUniversePairTaskTrackD0.cxx +++ b/PWGCF/FemtoUniverse/Tasks/femtoUniversePairTaskTrackD0.cxx @@ -1346,8 +1346,8 @@ struct FemtoUniversePairTaskTrackD0 { mcRecoRegistry.fill(HIST("hMcRecD0PromptPhi"), part.phi()); } else if (part.tpcNClsFound() == 1) { // non-prompt candidates mcRecoRegistry.fill(HIST("hMcRecD0NonPrompt"), part.pt(), part.eta()); - mcRecoRegistry.fill(HIST("hMcRecD0PromptPt"), part.pt()); - mcRecoRegistry.fill(HIST("hMcRecD0PromptPhi"), part.phi()); + mcRecoRegistry.fill(HIST("hMcRecD0NonPromptPt"), part.pt()); + mcRecoRegistry.fill(HIST("hMcRecD0NonPromptPhi"), part.phi()); } } else if (mcpart.pdgMCTruth() == ConfDmesons.confPDGCodeD0bar) { mcRecoRegistry.fill(HIST("hMcRecD0bar"), part.pt(), part.eta());