@@ -225,6 +225,8 @@ struct LumiStabilityLightIons {
225225
226226 void processZDCQA (MyBCs const & bcs, aod::Zdcs const &)
227227 {
228+ const int maxTimeZDC = 50 ; // Maximum time the histogram allows before setting a dummy value
229+ const int dummyZDCTime = 42 .f ; // Time value to indicate missing ZDC time
228230 for (const auto & bc : bcs) {
229231
230232 std::bitset<64 > ctpInputMask (bc.inputMask ());
@@ -234,18 +236,18 @@ struct LumiStabilityLightIons {
234236 if (!bc.has_zdc ())
235237 continue ;
236238
237- mHistManager .fill (HIST (" ZDCQA/ZNCTimeVsEnergy" ), bc.zdc ().energyCommonZNC () > -2 ? bc.zdc ().energyCommonZNC () : -1 , std::abs (bc.zdc ().timeZNC ()) < 50 ? bc.zdc ().timeZNC () : 42 . f );
239+ mHistManager .fill (HIST (" ZDCQA/ZNCTimeVsEnergy" ), bc.zdc ().energyCommonZNC () > -1 ? bc.zdc ().energyCommonZNC () : -1 , std::abs (bc.zdc ().timeZNC ()) < maxTimeZDC ? bc.zdc ().timeZNC () : dummyZDCTime );
238240
239241 float timeZNA = bc.zdc ().timeZNA ();
240242 float timeZNC = bc.zdc ().timeZNC ();
241243
242- if (std::abs (timeZNA) > 50 ) {
243- timeZNA = 42 . f ; // set dummy value for missing ZDC times to be able to plot them
244+ if (std::abs (timeZNA) > maxTimeZDC ) {
245+ timeZNA = dummyZDCTime ; // set dummy value for missing ZDC times to be able to plot them
244246 mHistManager .fill (HIST (" ZDCQA/ZNCTime" ), timeZNC);
245247 }
246- if (std::abs (timeZNC) > 50 ) {
247- timeZNC = 42 . f ; // set dummy value for missing ZDC times to be able to plot them
248- if (timeZNA != 42 . f ) // If ZNA and ZNC are both missing, do not fill the ZNA histogram with the dummy value
248+ if (std::abs (timeZNC) > maxTimeZDC ) {
249+ timeZNC = dummyZDCTime ; // set dummy value for missing ZDC times to be able to plot them
250+ if (timeZNA != dummyZDCTime ) // If ZNA and ZNC are both missing, do not fill the ZNA histogram with the dummy value
249251 mHistManager .fill (HIST (" ZDCQA/ZNATime" ), timeZNA);
250252 }
251253
0 commit comments