@@ -462,7 +462,22 @@ struct LumiStabilityTask {
462462 histos.fill (HIST (" FDD/bcVertexTrigger" ), localBC);
463463 histos.fill (HIST (" FDD/hCounts" ), 1 );
464464 histos.fill (HIST (" hOrbitFDDVertex" ), orbit - minOrbit);
465- histos.fill (HIST (" FDD/hTimeForRate" ), (bc.timestamp () - tsSOR) * 1 .e -3 ); // Converting ms into seconds
465+
466+ if (bcPatternB[localBC]) {
467+ histos.fill (HIST (" FDD/hTimeForRate" ), (bc.timestamp () - tsSOR) * 1 .e -3 ); // Converting ms into seconds
468+ bool isLeadBC = true ;
469+ for (int jbit = localBC - minEmpty; jbit < localBC; jbit++) {
470+ int kbit = jbit;
471+ if (kbit < 0 )
472+ kbit += nbin;
473+ if (bcPatternB[kbit]) {
474+ isLeadBC = false ;
475+ break ;
476+ }
477+ }
478+ if (isLeadBC)
479+ histos.fill (HIST (" FDD/hTimeForRateLeadingBC" ), (bc.timestamp () - tsSOR) * 1 .e -3 );
480+ }
466481
467482 if (bcPatternB[localBC]) {
468483 histos.fill (HIST (" FDD/hTimeForRate" ), (bc.timestamp () - tsSOR) * 1 .e -3 ); // Converting ms into seconds
@@ -755,7 +770,6 @@ struct LumiStabilityTask {
755770 if (vertex) {
756771 histos.fill (HIST (" FT0/bcVertexTrigger" ), localBC);
757772 histos.fill (HIST (" hOrbitFT0vertex" ), orbit - minOrbit);
758- histos.fill (HIST (" FT0/hTimeForRate" ), (bc.timestamp () - tsSOR) * 1 .e -3 ); // Converting ms into seconds
759773
760774 if (bcPatternA[localBC]) {
761775 histos.fill (HIST (" FT0/timeACbcA" ), ft0.timeA (), ft0.timeC ());
0 commit comments