@@ -378,45 +378,50 @@ struct LumiStabilityTask {
378378 histos.fill (HIST (" TFsPerMinute" ), timeSinceSOF);
379379 }
380380
381- if (bcPatternB[localBC]) {
382- if (trgFDD) {
381+ if (trgFDD) {
382+ histos.fill (HIST (" FDD/bcVertexTriggerCTP" ), localBC + 7 );
383+ if (bcPatternB[localBC]) {
383384 histos.fill (HIST (" FDD/nBCsVsTime" ), timeSinceSOF);
384- histos.fill (HIST (" FDD/bcVertexTriggerCTP" ), localBC + 7 );
385385 histos.fill (HIST (" FDD/hTimeForRateCTP" ), (bc.timestamp () - tsSOR) * 1 .e -3 ); // Converting ms into seconds
386386 }
387- if (trgFT0) {
387+ }
388+ if (trgFT0) {
389+ histos.fill (HIST (" FT0/bcVertexTriggerCTP" ), localBC);
390+ if (bcPatternB[localBC]) {
388391 histos.fill (HIST (" FT0/nBCsVsTime" ), timeSinceSOF);
389- histos.fill (HIST (" FT0/bcVertexTriggerCTP" ), localBC);
390392 histos.fill (HIST (" FT0/hTimeForRateCTP" ), (bc.timestamp () - tsSOR) * 1 .e -3 ); // Converting ms into seconds
391393 }
392- if (trgFV0) {
393- histos.fill (HIST (" FV0/bcChargeTriggerCTP" ), localBC);
394+ }
395+ if (trgFV0) {
396+ histos.fill (HIST (" FV0/bcChargeTriggerCTP" ), localBC);
397+ if (bcPatternB[localBC]) {
394398 histos.fill (HIST (" FV0/hTimeForRateCTP" ), (bc.timestamp () - tsSOR) * 1 .e -3 ); // Converting ms into seconds
395399 }
396- bool isLeadBC = true ;
397- for ( int jbit = localBC - minEmpty; jbit < localBC; jbit++) {
398- int kbit = jbit;
399- if ( kbit < 0 )
400- kbit += nbin;
401- if (bcPatternB[ kbit]) {
402- isLeadBC = false ;
403- break ;
404- }
400+ }
401+ bool isLeadBC = true ;
402+ for ( int jbit = localBC - minEmpty; jbit < localBC; jbit++) {
403+ int kbit = jbit;
404+ if ( kbit < 0 )
405+ kbit += nbin;
406+ if (bcPatternB[kbit]) {
407+ isLeadBC = false ;
408+ break ;
405409 }
406- if (isLeadBC) {
407- if (trgFDD ) {
408- histos. fill ( HIST ( " FDD/nBCsVsTimeLeadingBCe " ), timeSinceSOF);
409- histos.fill (HIST (" FDD/hTimeForRateLeadingBCCTP " ), (bc. timestamp () - tsSOR) * 1 . e - 3 );
410- }
411- if (trgFT0) {
412- histos. fill ( HIST ( " FT0/nBCsVsTimeLeadingBCe " ), timeSinceSOF);
413- histos.fill (HIST (" FT0/hTimeForRateLeadingBCCTP " ), (bc. timestamp () - tsSOR) * 1 . e - 3 );
414- }
415- if (trgFV0) {
416- histos. fill ( HIST ( " FV0/hTimeForRateLeadingBCCTP " ), (bc. timestamp () - tsSOR) * 1 . e - 3 );
417- }
410+ }
411+ if (isLeadBC ) {
412+ if (trgFDD) {
413+ histos.fill (HIST (" FDD/nBCsVsTimeLeadingBC " ), timeSinceSOF );
414+ histos. fill ( HIST ( " FDD/hTimeForRateLeadingBCCTP " ), (bc. timestamp () - tsSOR) * 1 . e - 3 );
415+ }
416+ if (trgFT0) {
417+ histos.fill (HIST (" FT0/nBCsVsTimeLeadingBC " ), timeSinceSOF );
418+ histos. fill ( HIST ( " FT0/hTimeForRateLeadingBCCTP " ), (bc. timestamp () - tsSOR) * 1 . e - 3 );
419+ }
420+ if (trgFV0) {
421+ histos. fill ( HIST ( " FV0/hTimeForRateLeadingBCCTP " ), (bc. timestamp () - tsSOR) * 1 . e - 3 );
418422 }
419423 }
424+ // }
420425 } // loop over bcs
421426
422427 for (auto const & fdd : fdds) {
@@ -454,9 +459,9 @@ struct LumiStabilityTask {
454459
455460 histos.fill (HIST (" FDD/hCounts" ), 0 );
456461 if (vertex) {
457- histos.fill (HIST (" FDD/bcVertexTrigger" ), localBC);
458- histos.fill (HIST (" FDD/hCounts" ), 1 );
459462 histos.fill (HIST (" hOrbitFDDVertex" ), orbit - minOrbit);
463+ histos.fill (HIST (" FDD/hCounts" ), 1 );
464+ histos.fill (HIST (" FDD/bcVertexTrigger" ), localBC);
460465
461466 if (bcPatternB[localBC]) {
462467 histos.fill (HIST (" FDD/hTimeForRate" ), (bc.timestamp () - tsSOR) * 1 .e -3 ); // Converting ms into seconds
0 commit comments