@@ -368,7 +368,22 @@ struct LumiStabilityTask {
368368 histos.fill (HIST (" FDD/bcVertexTrigger" ), localBC);
369369 histos.fill (HIST (" FDD/hCounts" ), 1 );
370370 histos.fill (HIST (" hOrbitFDDVertex" ), orbit - minOrbit);
371- histos.fill (HIST (" FDD/hTimeForRate" ), (bc.timestamp () - tsSOR) * 1 .e -3 ); // Converting ms into seconds
371+
372+ if (bcPatternB[localBC]) {
373+ histos.fill (HIST (" FDD/hTimeForRate" ), (bc.timestamp () - tsSOR) * 1 .e -3 ); // Converting ms into seconds
374+ bool isLeadBC = true ;
375+ for (int jbit = localBC - minEmpty; jbit < localBC; jbit++) {
376+ int kbit = jbit;
377+ if (kbit < 0 )
378+ kbit += nbin;
379+ if (bcPatternB[kbit]) {
380+ isLeadBC = false ;
381+ break ;
382+ }
383+ }
384+ if (isLeadBC)
385+ histos.fill (HIST (" FDD/hTimeForRateLeadingBC" ), (bc.timestamp () - tsSOR) * 1 .e -3 );
386+ }
372387
373388 if (bcPatternB[localBC]) {
374389 histos.fill (HIST (" FDD/hTimeForRate" ), (bc.timestamp () - tsSOR) * 1 .e -3 ); // Converting ms into seconds
@@ -660,7 +675,6 @@ struct LumiStabilityTask {
660675 if (vertex) {
661676 histos.fill (HIST (" FT0/bcVertexTrigger" ), localBC);
662677 histos.fill (HIST (" hOrbitFT0vertex" ), orbit - minOrbit);
663- histos.fill (HIST (" FT0/hTimeForRate" ), (bc.timestamp () - tsSOR) * 1 .e -3 ); // Converting ms into seconds
664678
665679 if (bcPatternA[localBC]) {
666680 histos.fill (HIST (" FT0/timeACbcA" ), ft0.timeA (), ft0.timeC ());
0 commit comments