@@ -91,11 +91,11 @@ struct OnTheFlyTofPid {
9191 Configurable<float > multiplicityEtaRange{" multiplicityEtaRange" , 0.800000012 , " eta range to compute the multiplicity" };
9292 Configurable<bool > flagIncludeTrackTimeRes{" flagIncludeTrackTimeRes" , true , " flag to include or exclude track time resolution" };
9393 Configurable<bool > flagTOFLoadDelphesLUTs{" flagTOFLoadDelphesLUTs" , false , " flag to load Delphes LUTs for tracking correction (use recoTrack parameters if false)" };
94- Configurable<std::string> lutEl{" lutEl" , " lutCovm.el.dat " , " LUT for electrons" };
95- Configurable<std::string> lutMu{" lutMu" , " lutCovm.mu.dat " , " LUT for muons" };
96- Configurable<std::string> lutPi{" lutPi" , " lutCovm.pi.dat " , " LUT for pions" };
97- Configurable<std::string> lutKa{" lutKa" , " lutCovm.ka.dat " , " LUT for kaons" };
98- Configurable<std::string> lutPr{" lutPr" , " lutCovm.pr.dat " , " LUT for protons" };
94+ Configurable<std::string> lutEl{" lutEl" , " inherit " , " LUT for electrons (if inherit, inherits from otf tracker task) " };
95+ Configurable<std::string> lutMu{" lutMu" , " inherit " , " LUT for muons (if inherit, inherits from otf tracker task) " };
96+ Configurable<std::string> lutPi{" lutPi" , " inherit " , " LUT for pions (if inherit, inherits from otf tracker task) " };
97+ Configurable<std::string> lutKa{" lutKa" , " inherit " , " LUT for kaons (if inherit, inherits from otf tracker task) " };
98+ Configurable<std::string> lutPr{" lutPr" , " inherit " , " LUT for protons (if inherit, inherits from otf tracker task) " };
9999 } simConfig;
100100
101101 struct : ConfigurableGroup {
@@ -131,10 +131,25 @@ struct OnTheFlyTofPid {
131131 HistogramRegistry histos{" Histos" , {}, OutputObjHandlingPolicy::AnalysisObject};
132132 static constexpr int kParticles = 5 ;
133133
134- void init (o2::framework::InitContext&)
134+ void init (o2::framework::InitContext& initContext )
135135 {
136136 pRandomNumberGenerator.SetSeed (0 ); // fully randomize
137137
138+ // Check if inheriting the LUT configuration
139+ auto configLutPath = [&](Configurable<std::string>& lut, const char * lutName) {
140+ if (lut.value != " inherit" ) {
141+ return ;
142+ }
143+ if (!getTaskOptionValue (initContext, " on-the-fly-tracker" , lutName, lut.value , true )) {
144+ LOG (fatal) << " Could not get loadResponseFromCCDB from tof-event-time task" ;
145+ }
146+ };
147+ configLutPath (simConfig.lutEl , " lutEl" );
148+ configLutPath (simConfig.lutMu , " lutMu" );
149+ configLutPath (simConfig.lutPi , " lutPi" );
150+ configLutPath (simConfig.lutKa , " lutKa" );
151+ configLutPath (simConfig.lutPr , " lutPr" );
152+
138153 // Load LUT for pt and eta smearing
139154 if (simConfig.flagIncludeTrackTimeRes && simConfig.flagTOFLoadDelphesLUTs ) {
140155 std::map<int , const char *> mapPdgLut;
0 commit comments