@@ -99,14 +99,6 @@ struct OnTheFlyTofPid {
9999 Configurable<float > multiplicityEtaRange{" multiplicityEtaRange" , 0.800000012 , " eta range to compute the multiplicity" };
100100 Configurable<bool > flagIncludeTrackTimeRes{" flagIncludeTrackTimeRes" , true , " flag to include or exclude track time resolution" };
101101 Configurable<bool > flagTOFLoadDelphesLUTs{" flagTOFLoadDelphesLUTs" , false , " flag to load Delphes LUTs for tracking correction (use recoTrack parameters if false)" };
102- Configurable<std::string> lutEl{" lutEl" , " inherit" , " LUT for electrons (if inherit, inherits from otf tracker task)" };
103- Configurable<std::string> lutMu{" lutMu" , " inherit" , " LUT for muons (if inherit, inherits from otf tracker task)" };
104- Configurable<std::string> lutPi{" lutPi" , " inherit" , " LUT for pions (if inherit, inherits from otf tracker task)" };
105- Configurable<std::string> lutKa{" lutKa" , " inherit" , " LUT for kaons (if inherit, inherits from otf tracker task)" };
106- Configurable<std::string> lutPr{" lutPr" , " inherit" , " LUT for protons (if inherit, inherits from otf tracker task)" };
107- Configurable<std::string> lutDe{" lutDe" , " inherit" , " LUT for deuterons (if inherit, inherits from otf tracker task)" };
108- Configurable<std::string> lutTr{" lutTr" , " inherit" , " LUT for tritons (if inherit, inherits from otf tracker task)" };
109- Configurable<std::string> lutHe3{" lutHe3" , " inherit" , " LUT for helions (if inherit, inherits from otf tracker task)" };
110102 } simConfig;
111103
112104 struct : ConfigurableGroup {
@@ -159,28 +151,23 @@ struct OnTheFlyTofPid {
159151 // Load LUT for pt and eta smearing
160152 if (simConfig.flagIncludeTrackTimeRes && simConfig.flagTOFLoadDelphesLUTs ) {
161153 mSmearer .setCcdbManager (ccdb.operator ->());
162- auto loadLUT = [&](int pdg, Configurable< std::string>& lut ) {
163- if (lut. value != " inherit " ) {
164- return ;
154+ auto loadLUT = [&](int pdg, std::string cfgNameToInherit ) {
155+ if (! getTaskOptionValue (initContext, " on-the-fly-tracker " , cfgNameToInherit, false ) ) {
156+ LOG (fatal) << " Could not get " << cfgNameToInherit << " from on-the-fly-tracker task " ;
165157 }
166- if (!getTaskOptionValue (initContext, " on-the-fly-tracker" , lut, false )) {
167- LOG (fatal) << " Could not get " << lut.name << " from on-the-fly-tracker task" ;
168- }
169- std::string lutFile = lut.value ;
170-
171- bool success = mSmearer .loadTable (pdg, lutFile.c_str ());
172- if (!success && !lutFile.empty ()) {
173- LOG (fatal) << " Having issue with loading the LUT " << pdg << " " << lutFile;
158+ bool success = mSmearer .loadTable (pdg, cfgNameToInherit.c_str ());
159+ if (!success && !cfgNameToInherit.empty ()) {
160+ LOG (fatal) << " Having issue with loading the LUT " << pdg << " " << cfgNameToInherit;
174161 }
175162 };
176- loadLUT (11 , simConfig. lutEl );
177- loadLUT (13 , simConfig. lutMu );
178- loadLUT (211 , simConfig. lutPi );
179- loadLUT (321 , simConfig. lutKa );
180- loadLUT (2212 , simConfig. lutPr );
181- loadLUT (1000010020 , simConfig. lutDe );
182- loadLUT (1000010030 , simConfig. lutTr );
183- loadLUT (1000020030 , simConfig. lutHe3 );
163+ loadLUT (11 , " lutEl" );
164+ loadLUT (13 , " lutMu" );
165+ loadLUT (211 , " lutPi" );
166+ loadLUT (321 , " lutKa" );
167+ loadLUT (2212 , " lutPr" );
168+ loadLUT (1000010020 , " lutDe" );
169+ loadLUT (1000010030 , " lutTr" );
170+ loadLUT (1000020030 , " lutHe3" );
184171 }
185172
186173 if (plotsConfig.doQAplots ) {
0 commit comments