@@ -457,7 +457,22 @@ struct LumiStabilityTask {
457457 histos.fill (HIST (" FDD/bcVertexTrigger" ), localBC);
458458 histos.fill (HIST (" FDD/hCounts" ), 1 );
459459 histos.fill (HIST (" hOrbitFDDVertex" ), orbit - minOrbit);
460- histos.fill (HIST (" FDD/hTimeForRate" ), (bc.timestamp () - tsSOR) * 1 .e -3 ); // Converting ms into seconds
460+
461+ if (bcPatternB[localBC]) {
462+ histos.fill (HIST (" FDD/hTimeForRate" ), (bc.timestamp () - tsSOR) * 1 .e -3 ); // Converting ms into seconds
463+ bool isLeadBC = true ;
464+ for (int jbit = localBC - minEmpty; jbit < localBC; jbit++) {
465+ int kbit = jbit;
466+ if (kbit < 0 )
467+ kbit += nbin;
468+ if (bcPatternB[kbit]) {
469+ isLeadBC = false ;
470+ break ;
471+ }
472+ }
473+ if (isLeadBC)
474+ histos.fill (HIST (" FDD/hTimeForRateLeadingBC" ), (bc.timestamp () - tsSOR) * 1 .e -3 );
475+ }
461476
462477 if (bcPatternB[localBC]) {
463478 histos.fill (HIST (" FDD/hTimeForRate" ), (bc.timestamp () - tsSOR) * 1 .e -3 ); // Converting ms into seconds
@@ -750,7 +765,6 @@ struct LumiStabilityTask {
750765 if (vertex) {
751766 histos.fill (HIST (" FT0/bcVertexTrigger" ), localBC);
752767 histos.fill (HIST (" hOrbitFT0vertex" ), orbit - minOrbit);
753- histos.fill (HIST (" FT0/hTimeForRate" ), (bc.timestamp () - tsSOR) * 1 .e -3 ); // Converting ms into seconds
754768
755769 if (bcPatternA[localBC]) {
756770 histos.fill (HIST (" FT0/timeACbcA" ), ft0.timeA (), ft0.timeC ());
0 commit comments