From 8cfdac6c3c8ed6f4f7057fdb367451ae040fae98 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=B2=20Jacazio?= Date: Mon, 22 Sep 2025 15:35:46 +0200 Subject: [PATCH 1/4] A3: Update LUT fetching in TOF and RICH --- ALICE3/TableProducer/OTF/onTheFlyRichPid.cxx | 113 +++++++++---------- ALICE3/TableProducer/OTF/onTheFlyTofPid.cxx | 101 ++++++++--------- 2 files changed, 101 insertions(+), 113 deletions(-) diff --git a/ALICE3/TableProducer/OTF/onTheFlyRichPid.cxx b/ALICE3/TableProducer/OTF/onTheFlyRichPid.cxx index 79279bbc70e..560d0f2d73b 100644 --- a/ALICE3/TableProducer/OTF/onTheFlyRichPid.cxx +++ b/ALICE3/TableProducer/OTF/onTheFlyRichPid.cxx @@ -38,31 +38,31 @@ #include "Common/Core/trackUtilities.h" #include "Common/DataModel/TrackSelectionTables.h" -#include "CCDB/BasicCCDBManager.h" -#include "CCDB/CcdbApi.h" -#include "CommonConstants/GeomConstants.h" -#include "CommonConstants/MathConstants.h" -#include "CommonConstants/PhysicsConstants.h" -#include "CommonUtils/NameConf.h" -#include "DataFormatsCalibration/MeanVertexObject.h" -#include "DataFormatsParameters/GRPMagField.h" -#include "DetectorsBase/GeometryManager.h" -#include "DetectorsBase/Propagator.h" -#include "DetectorsVertexing/HelixHelper.h" -#include "Framework/ASoAHelpers.h" -#include "Framework/AnalysisDataModel.h" -#include "Framework/AnalysisTask.h" -#include "Framework/HistogramRegistry.h" -#include "Framework/O2DatabasePDGPlugin.h" -#include "Framework/RunningWorkflowInfo.h" -#include "Framework/runDataProcessing.h" -#include "ReconstructionDataFormats/DCA.h" -#include "ReconstructionDataFormats/PID.h" - -#include "TRandom3.h" -#include "TString.h" -#include "TVector3.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + #include +#include +#include +#include #include #include @@ -80,6 +80,8 @@ struct OnTheFlyRichPid { // necessary for particle charges Service pdg; + // Necessary for LUTs + Service ccdb; // master setting: magnetic field Configurable magneticField{"magneticField", 0, "magnetic field (kilogauss) if 0, taken from the tracker task"}; @@ -137,6 +139,9 @@ struct OnTheFlyRichPid { Configurable lutPi{"lutPi", "inherit", "LUT for pions (if inherit, inherits from otf tracker task)"}; Configurable lutKa{"lutKa", "inherit", "LUT for kaons (if inherit, inherits from otf tracker task)"}; Configurable lutPr{"lutPr", "inherit", "LUT for protons (if inherit, inherits from otf tracker task)"}; + Configurable lutDe{"lutDe", "inherit", "LUT for deuterons (if inherit, inherits from otf tracker task)"}; + Configurable lutTr{"lutTr", "inherit", "LUT for tritons (if inherit, inherits from otf tracker task)"}; + Configurable lutHe3{"lutHe3", "inherit", "LUT for helions (if inherit, inherits from otf tracker task)"}; } simConfig; o2::base::Propagator::MatCorrType matCorr = o2::base::Propagator::MatCorrType::USEMatCorrNONE; @@ -304,47 +309,31 @@ struct OnTheFlyRichPid { LOG(info) << "Bz = " << magneticField.value << " T"; } - // Check if inheriting the LUT configuration - auto configLutPath = [&](Configurable& lut) { - if (lut.value != "inherit") { - return; - } - if (!getTaskOptionValue(initContext, "on-the-fly-tracker", lut, false)) { - LOG(fatal) << "Could not get " << lut.name << " from on-the-fly-tracker task"; - } - }; - configLutPath(simConfig.lutEl); - configLutPath(simConfig.lutMu); - configLutPath(simConfig.lutPi); - configLutPath(simConfig.lutKa); - configLutPath(simConfig.lutPr); - // Load LUT for pt and eta smearing if (flagIncludeTrackAngularRes && flagRICHLoadDelphesLUTs) { - std::map mapPdgLut; - const char* lutElChar = simConfig.lutEl->c_str(); - const char* lutMuChar = simConfig.lutMu->c_str(); - const char* lutPiChar = simConfig.lutPi->c_str(); - const char* lutKaChar = simConfig.lutKa->c_str(); - const char* lutPrChar = simConfig.lutPr->c_str(); - - LOGF(info, "Will load electron lut file ..: %s for RICH PID", lutElChar); - LOGF(info, "Will load muon lut file ......: %s for RICH PID", lutMuChar); - LOGF(info, "Will load pion lut file ......: %s for RICH PID", lutPiChar); - LOGF(info, "Will load kaon lut file ......: %s for RICH PID", lutKaChar); - LOGF(info, "Will load proton lut file ....: %s for RICH PID", lutPrChar); - - mapPdgLut.insert(std::make_pair(11, lutElChar)); - mapPdgLut.insert(std::make_pair(13, lutMuChar)); - mapPdgLut.insert(std::make_pair(211, lutPiChar)); - mapPdgLut.insert(std::make_pair(321, lutKaChar)); - mapPdgLut.insert(std::make_pair(2212, lutPrChar)); - - for (const auto& e : mapPdgLut) { - if (!mSmearer.loadTable(e.first, e.second)) { - LOG(fatal) << "Having issue with loading the LUT " << e.first << " " << e.second; + mSmearer.setCcdbManager(ccdb.operator->()); + auto loadLUT = [&](int pdg, Configurable& lut) { + if (lut.value != "inherit") { + return; } - } + if (!getTaskOptionValue(initContext, "on-the-fly-tracker", lut, false)) { + LOG(fatal) << "Could not get " << lut.name << " from on-the-fly-tracker task"; + } + std::string lutFile = lut.value; + + bool success = mSmearer.loadTable(pdg, lutFile.c_str()); + if (!success && !lutFile.empty()) { + LOG(fatal) << "Having issue with loading the LUT " << pdg << " " << lutFile; + } + }; + loadLUT(11, simConfig.lutEl); + loadLUT(13, simConfig.lutMu); + loadLUT(211, simConfig.lutPi); + loadLUT(321, simConfig.lutKa); + loadLUT(2212, simConfig.lutPr); + loadLUT(1000010020, simConfig.lutDe); + loadLUT(1000010030, simConfig.lutTr); + loadLUT(1000020030, simConfig.lutHe3); } if (doQAplots) { diff --git a/ALICE3/TableProducer/OTF/onTheFlyTofPid.cxx b/ALICE3/TableProducer/OTF/onTheFlyTofPid.cxx index 4c062fd0e7a..32f1c341d9e 100644 --- a/ALICE3/TableProducer/OTF/onTheFlyTofPid.cxx +++ b/ALICE3/TableProducer/OTF/onTheFlyTofPid.cxx @@ -32,30 +32,30 @@ #include "Common/Core/trackUtilities.h" #include "Common/DataModel/TrackSelectionTables.h" -#include "CCDB/BasicCCDBManager.h" -#include "CCDB/CcdbApi.h" -#include "CommonConstants/GeomConstants.h" -#include "CommonConstants/MathConstants.h" -#include "CommonConstants/PhysicsConstants.h" -#include "CommonUtils/NameConf.h" -#include "DataFormatsCalibration/MeanVertexObject.h" -#include "DataFormatsParameters/GRPMagField.h" -#include "DetectorsBase/GeometryManager.h" -#include "DetectorsBase/Propagator.h" -#include "DetectorsVertexing/HelixHelper.h" -#include "Framework/ASoAHelpers.h" -#include "Framework/AnalysisDataModel.h" -#include "Framework/AnalysisTask.h" -#include "Framework/HistogramRegistry.h" -#include "Framework/O2DatabasePDGPlugin.h" -#include "Framework/RunningWorkflowInfo.h" -#include "Framework/runDataProcessing.h" -#include "ReconstructionDataFormats/DCA.h" - -#include "TEfficiency.h" -#include "THashList.h" -#include "TRandom3.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include #include +#include #include #include @@ -81,6 +81,8 @@ struct OnTheFlyTofPid { // necessary for particle charges Service pdg; + // Necessary for LUTs + Service ccdb; // these are the settings governing the TOF layers to be used // note that there are two layers foreseen for now: inner and outer TOF @@ -102,6 +104,9 @@ struct OnTheFlyTofPid { Configurable lutPi{"lutPi", "inherit", "LUT for pions (if inherit, inherits from otf tracker task)"}; Configurable lutKa{"lutKa", "inherit", "LUT for kaons (if inherit, inherits from otf tracker task)"}; Configurable lutPr{"lutPr", "inherit", "LUT for protons (if inherit, inherits from otf tracker task)"}; + Configurable lutDe{"lutDe", "inherit", "LUT for deuterons (if inherit, inherits from otf tracker task)"}; + Configurable lutTr{"lutTr", "inherit", "LUT for tritons (if inherit, inherits from otf tracker task)"}; + Configurable lutHe3{"lutHe3", "inherit", "LUT for helions (if inherit, inherits from otf tracker task)"}; } simConfig; struct : ConfigurableGroup { @@ -160,38 +165,32 @@ struct OnTheFlyTofPid { LOG(fatal) << "Could not get " << lut.name << " from on-the-fly-tracker task"; } }; - configLutPath(simConfig.lutEl); - configLutPath(simConfig.lutMu); - configLutPath(simConfig.lutPi); - configLutPath(simConfig.lutKa); - configLutPath(simConfig.lutPr); // Load LUT for pt and eta smearing if (simConfig.flagIncludeTrackTimeRes && simConfig.flagTOFLoadDelphesLUTs) { - std::map mapPdgLut; - const char* lutElChar = simConfig.lutEl->c_str(); - const char* lutMuChar = simConfig.lutMu->c_str(); - const char* lutPiChar = simConfig.lutPi->c_str(); - const char* lutKaChar = simConfig.lutKa->c_str(); - const char* lutPrChar = simConfig.lutPr->c_str(); - - LOGF(info, "Will load electron lut file ..: %s for TOF PID", lutElChar); - LOGF(info, "Will load muon lut file ......: %s for TOF PID", lutMuChar); - LOGF(info, "Will load pion lut file ......: %s for TOF PID", lutPiChar); - LOGF(info, "Will load kaon lut file ......: %s for TOF PID", lutKaChar); - LOGF(info, "Will load proton lut file ....: %s for TOF PID", lutPrChar); - - mapPdgLut.insert(std::make_pair(11, lutElChar)); - mapPdgLut.insert(std::make_pair(13, lutMuChar)); - mapPdgLut.insert(std::make_pair(211, lutPiChar)); - mapPdgLut.insert(std::make_pair(321, lutKaChar)); - mapPdgLut.insert(std::make_pair(2212, lutPrChar)); - - for (const auto& e : mapPdgLut) { - if (!mSmearer.loadTable(e.first, e.second)) { - LOG(fatal) << "Having issue with loading the LUT " << e.first << " " << e.second; + mSmearer.setCcdbManager(ccdb.operator->()); + auto loadLUT = [&](int pdg, Configurable& lut) { + if (lut.value != "inherit") { + return; } - } + if (!getTaskOptionValue(initContext, "on-the-fly-tracker", lut, false)) { + LOG(fatal) << "Could not get " << lut.name << " from on-the-fly-tracker task"; + } + std::string lutFile = lut.value; + + bool success = mSmearer.loadTable(pdg, lutFile.c_str()); + if (!success && !lutFile.empty()) { + LOG(fatal) << "Having issue with loading the LUT " << pdg << " " << lutFile; + } + }; + loadLUT(11, simConfig.lutEl); + loadLUT(13, simConfig.lutMu); + loadLUT(211, simConfig.lutPi); + loadLUT(321, simConfig.lutKa); + loadLUT(2212, simConfig.lutPr); + loadLUT(1000010020, simConfig.lutDe); + loadLUT(1000010030, simConfig.lutTr); + loadLUT(1000020030, simConfig.lutHe3); } if (plotsConfig.doQAplots) { From 5efe381e65a71b05f981b2749fd87cad84c56f0f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=B2=20Jacazio?= Date: Mon, 22 Sep 2025 15:46:25 +0200 Subject: [PATCH 2/4] Fix --- ALICE3/TableProducer/OTF/onTheFlyTofPid.cxx | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/ALICE3/TableProducer/OTF/onTheFlyTofPid.cxx b/ALICE3/TableProducer/OTF/onTheFlyTofPid.cxx index 32f1c341d9e..daf7303d8aa 100644 --- a/ALICE3/TableProducer/OTF/onTheFlyTofPid.cxx +++ b/ALICE3/TableProducer/OTF/onTheFlyTofPid.cxx @@ -156,16 +156,6 @@ struct OnTheFlyTofPid { LOG(info) << "Bz = " << simConfig.magneticField.value << " T"; } - // Check if inheriting the LUT configuration - auto configLutPath = [&](Configurable& lut) { - if (lut.value != "inherit") { - return; - } - if (!getTaskOptionValue(initContext, "on-the-fly-tracker", lut, false)) { - LOG(fatal) << "Could not get " << lut.name << " from on-the-fly-tracker task"; - } - }; - // Load LUT for pt and eta smearing if (simConfig.flagIncludeTrackTimeRes && simConfig.flagTOFLoadDelphesLUTs) { mSmearer.setCcdbManager(ccdb.operator->()); From 24d38a474f202497f8386465ab4174094e34ae9b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=B2=20Jacazio?= Date: Mon, 22 Sep 2025 15:51:10 +0200 Subject: [PATCH 3/4] Remove cfg --- ALICE3/TableProducer/OTF/onTheFlyRichPid.cxx | 44 +++++++------------- ALICE3/TableProducer/OTF/onTheFlyTofPid.cxx | 41 +++++++----------- 2 files changed, 28 insertions(+), 57 deletions(-) diff --git a/ALICE3/TableProducer/OTF/onTheFlyRichPid.cxx b/ALICE3/TableProducer/OTF/onTheFlyRichPid.cxx index 560d0f2d73b..2ece50a29fa 100644 --- a/ALICE3/TableProducer/OTF/onTheFlyRichPid.cxx +++ b/ALICE3/TableProducer/OTF/onTheFlyRichPid.cxx @@ -133,17 +133,6 @@ struct OnTheFlyRichPid { Configurable bRICHPixelSize{"bRICHPixelSize", 0.1, "barrel RICH pixel size (cm)"}; Configurable bRichGapRefractiveIndex{"bRichGapRefractiveIndex", 1.000283, "barrel RICH gap refractive index"}; - struct : ConfigurableGroup { - Configurable lutEl{"lutEl", "inherit", "LUT for electrons (if inherit, inherits from otf tracker task)"}; - Configurable lutMu{"lutMu", "inherit", "LUT for muons (if inherit, inherits from otf tracker task)"}; - Configurable lutPi{"lutPi", "inherit", "LUT for pions (if inherit, inherits from otf tracker task)"}; - Configurable lutKa{"lutKa", "inherit", "LUT for kaons (if inherit, inherits from otf tracker task)"}; - Configurable lutPr{"lutPr", "inherit", "LUT for protons (if inherit, inherits from otf tracker task)"}; - Configurable lutDe{"lutDe", "inherit", "LUT for deuterons (if inherit, inherits from otf tracker task)"}; - Configurable lutTr{"lutTr", "inherit", "LUT for tritons (if inherit, inherits from otf tracker task)"}; - Configurable lutHe3{"lutHe3", "inherit", "LUT for helions (if inherit, inherits from otf tracker task)"}; - } simConfig; - o2::base::Propagator::MatCorrType matCorr = o2::base::Propagator::MatCorrType::USEMatCorrNONE; // Track smearer (here used to get relative pt and eta uncertainties) @@ -312,28 +301,23 @@ struct OnTheFlyRichPid { // Load LUT for pt and eta smearing if (flagIncludeTrackAngularRes && flagRICHLoadDelphesLUTs) { mSmearer.setCcdbManager(ccdb.operator->()); - auto loadLUT = [&](int pdg, Configurable& lut) { - if (lut.value != "inherit") { - return; - } - if (!getTaskOptionValue(initContext, "on-the-fly-tracker", lut, false)) { - LOG(fatal) << "Could not get " << lut.name << " from on-the-fly-tracker task"; + auto loadLUT = [&](int pdg, std::string cfgNameToInherit) { + if (!getTaskOptionValue(initContext, "on-the-fly-tracker", cfgNameToInherit, false)) { + LOG(fatal) << "Could not get " << cfgNameToInherit << " from on-the-fly-tracker task"; } - std::string lutFile = lut.value; - - bool success = mSmearer.loadTable(pdg, lutFile.c_str()); - if (!success && !lutFile.empty()) { - LOG(fatal) << "Having issue with loading the LUT " << pdg << " " << lutFile; + bool success = mSmearer.loadTable(pdg, cfgNameToInherit.c_str()); + if (!success && !cfgNameToInherit.empty()) { + LOG(fatal) << "Having issue with loading the LUT " << pdg << " " << cfgNameToInherit; } }; - loadLUT(11, simConfig.lutEl); - loadLUT(13, simConfig.lutMu); - loadLUT(211, simConfig.lutPi); - loadLUT(321, simConfig.lutKa); - loadLUT(2212, simConfig.lutPr); - loadLUT(1000010020, simConfig.lutDe); - loadLUT(1000010030, simConfig.lutTr); - loadLUT(1000020030, simConfig.lutHe3); + loadLUT(11, "lutEl"); + loadLUT(13, "lutMu"); + loadLUT(211, "lutPi"); + loadLUT(321, "lutKa"); + loadLUT(2212, "lutPr"); + loadLUT(1000010020, "lutDe"); + loadLUT(1000010030, "lutTr"); + loadLUT(1000020030, "lutHe3"); } if (doQAplots) { diff --git a/ALICE3/TableProducer/OTF/onTheFlyTofPid.cxx b/ALICE3/TableProducer/OTF/onTheFlyTofPid.cxx index daf7303d8aa..53fccb05989 100644 --- a/ALICE3/TableProducer/OTF/onTheFlyTofPid.cxx +++ b/ALICE3/TableProducer/OTF/onTheFlyTofPid.cxx @@ -99,14 +99,6 @@ struct OnTheFlyTofPid { Configurable multiplicityEtaRange{"multiplicityEtaRange", 0.800000012, "eta range to compute the multiplicity"}; Configurable flagIncludeTrackTimeRes{"flagIncludeTrackTimeRes", true, "flag to include or exclude track time resolution"}; Configurable flagTOFLoadDelphesLUTs{"flagTOFLoadDelphesLUTs", false, "flag to load Delphes LUTs for tracking correction (use recoTrack parameters if false)"}; - Configurable lutEl{"lutEl", "inherit", "LUT for electrons (if inherit, inherits from otf tracker task)"}; - Configurable lutMu{"lutMu", "inherit", "LUT for muons (if inherit, inherits from otf tracker task)"}; - Configurable lutPi{"lutPi", "inherit", "LUT for pions (if inherit, inherits from otf tracker task)"}; - Configurable lutKa{"lutKa", "inherit", "LUT for kaons (if inherit, inherits from otf tracker task)"}; - Configurable lutPr{"lutPr", "inherit", "LUT for protons (if inherit, inherits from otf tracker task)"}; - Configurable lutDe{"lutDe", "inherit", "LUT for deuterons (if inherit, inherits from otf tracker task)"}; - Configurable lutTr{"lutTr", "inherit", "LUT for tritons (if inherit, inherits from otf tracker task)"}; - Configurable lutHe3{"lutHe3", "inherit", "LUT for helions (if inherit, inherits from otf tracker task)"}; } simConfig; struct : ConfigurableGroup { @@ -159,28 +151,23 @@ struct OnTheFlyTofPid { // Load LUT for pt and eta smearing if (simConfig.flagIncludeTrackTimeRes && simConfig.flagTOFLoadDelphesLUTs) { mSmearer.setCcdbManager(ccdb.operator->()); - auto loadLUT = [&](int pdg, Configurable& lut) { - if (lut.value != "inherit") { - return; + auto loadLUT = [&](int pdg, std::string cfgNameToInherit) { + if (!getTaskOptionValue(initContext, "on-the-fly-tracker", cfgNameToInherit, false)) { + LOG(fatal) << "Could not get " << cfgNameToInherit << " from on-the-fly-tracker task"; } - if (!getTaskOptionValue(initContext, "on-the-fly-tracker", lut, false)) { - LOG(fatal) << "Could not get " << lut.name << " from on-the-fly-tracker task"; - } - std::string lutFile = lut.value; - - bool success = mSmearer.loadTable(pdg, lutFile.c_str()); - if (!success && !lutFile.empty()) { - LOG(fatal) << "Having issue with loading the LUT " << pdg << " " << lutFile; + bool success = mSmearer.loadTable(pdg, cfgNameToInherit.c_str()); + if (!success && !cfgNameToInherit.empty()) { + LOG(fatal) << "Having issue with loading the LUT " << pdg << " " << cfgNameToInherit; } }; - loadLUT(11, simConfig.lutEl); - loadLUT(13, simConfig.lutMu); - loadLUT(211, simConfig.lutPi); - loadLUT(321, simConfig.lutKa); - loadLUT(2212, simConfig.lutPr); - loadLUT(1000010020, simConfig.lutDe); - loadLUT(1000010030, simConfig.lutTr); - loadLUT(1000020030, simConfig.lutHe3); + loadLUT(11, "lutEl"); + loadLUT(13, "lutMu"); + loadLUT(211, "lutPi"); + loadLUT(321, "lutKa"); + loadLUT(2212, "lutPr"); + loadLUT(1000010020, "lutDe"); + loadLUT(1000010030, "lutTr"); + loadLUT(1000020030, "lutHe3"); } if (plotsConfig.doQAplots) { From 5ee533576316baa7404da2701a07ad383eb6f33f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=B2=20Jacazio?= Date: Mon, 22 Sep 2025 15:54:00 +0200 Subject: [PATCH 4/4] U --- ALICE3/TableProducer/OTF/onTheFlyRichPid.cxx | 11 ++++++----- ALICE3/TableProducer/OTF/onTheFlyTofPid.cxx | 11 ++++++----- 2 files changed, 12 insertions(+), 10 deletions(-) diff --git a/ALICE3/TableProducer/OTF/onTheFlyRichPid.cxx b/ALICE3/TableProducer/OTF/onTheFlyRichPid.cxx index 2ece50a29fa..9ccc09b3a5d 100644 --- a/ALICE3/TableProducer/OTF/onTheFlyRichPid.cxx +++ b/ALICE3/TableProducer/OTF/onTheFlyRichPid.cxx @@ -301,13 +301,14 @@ struct OnTheFlyRichPid { // Load LUT for pt and eta smearing if (flagIncludeTrackAngularRes && flagRICHLoadDelphesLUTs) { mSmearer.setCcdbManager(ccdb.operator->()); - auto loadLUT = [&](int pdg, std::string cfgNameToInherit) { - if (!getTaskOptionValue(initContext, "on-the-fly-tracker", cfgNameToInherit, false)) { + auto loadLUT = [&](int pdg, const std::string& cfgNameToInherit) { + std::string lut = "none"; + if (!getTaskOptionValue(initContext, "on-the-fly-tracker", cfgNameToInherit, lut, false)) { LOG(fatal) << "Could not get " << cfgNameToInherit << " from on-the-fly-tracker task"; } - bool success = mSmearer.loadTable(pdg, cfgNameToInherit.c_str()); - if (!success && !cfgNameToInherit.empty()) { - LOG(fatal) << "Having issue with loading the LUT " << pdg << " " << cfgNameToInherit; + bool success = mSmearer.loadTable(pdg, lut.c_str()); + if (!success && !lut.empty()) { + LOG(fatal) << "Having issue with loading the LUT " << pdg << " " << lut; } }; loadLUT(11, "lutEl"); diff --git a/ALICE3/TableProducer/OTF/onTheFlyTofPid.cxx b/ALICE3/TableProducer/OTF/onTheFlyTofPid.cxx index 53fccb05989..b28d48d92ff 100644 --- a/ALICE3/TableProducer/OTF/onTheFlyTofPid.cxx +++ b/ALICE3/TableProducer/OTF/onTheFlyTofPid.cxx @@ -151,13 +151,14 @@ struct OnTheFlyTofPid { // Load LUT for pt and eta smearing if (simConfig.flagIncludeTrackTimeRes && simConfig.flagTOFLoadDelphesLUTs) { mSmearer.setCcdbManager(ccdb.operator->()); - auto loadLUT = [&](int pdg, std::string cfgNameToInherit) { - if (!getTaskOptionValue(initContext, "on-the-fly-tracker", cfgNameToInherit, false)) { + auto loadLUT = [&](int pdg, const std::string& cfgNameToInherit) { + std::string lut = "none"; + if (!getTaskOptionValue(initContext, "on-the-fly-tracker", cfgNameToInherit, lut, false)) { LOG(fatal) << "Could not get " << cfgNameToInherit << " from on-the-fly-tracker task"; } - bool success = mSmearer.loadTable(pdg, cfgNameToInherit.c_str()); - if (!success && !cfgNameToInherit.empty()) { - LOG(fatal) << "Having issue with loading the LUT " << pdg << " " << cfgNameToInherit; + bool success = mSmearer.loadTable(pdg, lut.c_str()); + if (!success && !lut.empty()) { + LOG(fatal) << "Having issue with loading the LUT " << pdg << " " << lut; } }; loadLUT(11, "lutEl");