From 93a9db96fe553d35d59911b433546722cf87163a Mon Sep 17 00:00:00 2001 From: jparkkil Date: Tue, 5 Aug 2025 00:45:23 +0200 Subject: [PATCH 1/2] Use THnF efficiency, allow efficiency correction without NUA --- PWGCF/JCorran/Tasks/jflucWeightsLoader.cxx | 36 ++++++++++------------ 1 file changed, 17 insertions(+), 19 deletions(-) diff --git a/PWGCF/JCorran/Tasks/jflucWeightsLoader.cxx b/PWGCF/JCorran/Tasks/jflucWeightsLoader.cxx index 244035fd310..61401a31362 100644 --- a/PWGCF/JCorran/Tasks/jflucWeightsLoader.cxx +++ b/PWGCF/JCorran/Tasks/jflucWeightsLoader.cxx @@ -12,27 +12,27 @@ /// \since May 2024 // o2-linter: disable='doc/file' -#include -#include -#include -#include - -#include "Framework/AnalysisTask.h" -#include "Framework/ASoAHelpers.h" -#include "Framework/RunningWorkflowInfo.h" -#include "Framework/HistogramRegistry.h" +#include "PWGCF/DataModel/CorrelationsDerived.h" +#include "PWGCF/JCorran/DataModel/JCatalyst.h" -#include "Common/DataModel/EventSelection.h" #include "Common/Core/TrackSelection.h" -#include "Common/DataModel/TrackSelectionTables.h" #include "Common/DataModel/Centrality.h" -#include "ReconstructionDataFormats/V0.h" +#include "Common/DataModel/EventSelection.h" +#include "Common/DataModel/TrackSelectionTables.h" #include "CCDB/BasicCCDBManager.h" - -#include "PWGCF/JCorran/DataModel/JCatalyst.h" -#include "PWGCF/DataModel/CorrelationsDerived.h" +#include "Framework/ASoAHelpers.h" +#include "Framework/AnalysisTask.h" +#include "Framework/HistogramRegistry.h" +#include "Framework/RunningWorkflowInfo.h" #include "Framework/runDataProcessing.h" +#include "ReconstructionDataFormats/V0.h" + +#include +#include + +#include +#include using namespace o2; using namespace o2::framework; @@ -50,7 +50,7 @@ struct JflucWeightsLoader { THnF* ph = 0; TFile* pf = 0; - THnD* pheff = 0; + THnF* pheff = 0; TFile* pfeff = 0; int runNumber = 0; int timestamp = 0; @@ -108,7 +108,6 @@ struct JflucWeightsLoader { useCCDB = false; } else { LOGF(info, "Didn't find \"local://\" or \"ccdb\" for non-uniform acceptance corrections."); - return; } if (cfgPathEffWeights.value.substr(0, 8) == "local://") { @@ -120,14 +119,13 @@ struct JflucWeightsLoader { LOGF(fatal, "Efficiency correction weights file not found: %s", cfgPathEffWeights.value.substr(8).c_str()); } // - if (!(pheff = pfeff->Get("ccdb_object"))) { + if (!(pheff = pfeff->Get("ccdb_object"))) { LOGF(warning, "Efficiency correction histogram not found."); } else { LOGF(info, "Loaded efficiency correction histogram locally."); } } else { LOGF(info, "Didn't find \"local://\" or \"ccdb\" for efficiency corrections."); - return; } } From 56690708378a1b030aebfd4f6a0cb06dda617097 Mon Sep 17 00:00:00 2001 From: jparkkil Date: Tue, 5 Aug 2025 00:58:42 +0200 Subject: [PATCH 2/2] Fix cpplint --- PWGCF/JCorran/Tasks/jflucWeightsLoader.cxx | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/PWGCF/JCorran/Tasks/jflucWeightsLoader.cxx b/PWGCF/JCorran/Tasks/jflucWeightsLoader.cxx index 61401a31362..7d15d9b2a6d 100644 --- a/PWGCF/JCorran/Tasks/jflucWeightsLoader.cxx +++ b/PWGCF/JCorran/Tasks/jflucWeightsLoader.cxx @@ -117,9 +117,7 @@ struct JflucWeightsLoader { delete pfeff; pfeff = 0; LOGF(fatal, "Efficiency correction weights file not found: %s", cfgPathEffWeights.value.substr(8).c_str()); - } - // - if (!(pheff = pfeff->Get("ccdb_object"))) { + } else if (!(pheff = pfeff->Get("ccdb_object"))) { LOGF(warning, "Efficiency correction histogram not found."); } else { LOGF(info, "Loaded efficiency correction histogram locally.");