Skip to content

Commit 36d532b

Browse files
committed
fixing typo and logical filling of histos
1 parent 4d3f704 commit 36d532b

File tree

1 file changed

+27
-25
lines changed

1 file changed

+27
-25
lines changed

PWGMM/Lumi/Tasks/lumiStability.cxx

Lines changed: 27 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -378,8 +378,9 @@ 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);
384385
histos.fill(HIST("FDD/hTimeForRateCTP"), (bc.timestamp() - tsSOR) * 1.e-3); // Converting ms into seconds
385386
}
@@ -396,29 +397,30 @@ struct LumiStabilityTask {
396397
if (bcPatternB[localBC]) {
397398
histos.fill(HIST("FV0/hTimeForRateCTP"), (bc.timestamp() - tsSOR) * 1.e-3); // Converting ms into seconds
398399
}
399-
bool isLeadBC = true;
400-
for (int jbit = localBC - minEmpty; jbit < localBC; jbit++) {
401-
int kbit = jbit;
402-
if (kbit < 0)
403-
kbit += nbin;
404-
if (bcPatternB[kbit]) {
405-
isLeadBC = false;
406-
break;
407-
}
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;
408409
}
409-
if (isLeadBC) {
410-
if (trgFDD) {
411-
histos.fill(HIST("FDD/nBCsVsTimeLeadingBCe"), timeSinceSOF);
412-
histos.fill(HIST("FDD/hTimeForRateLeadingBCCTP"), (bc.timestamp() - tsSOR) * 1.e-3);
413-
}
414-
if (trgFT0) {
415-
histos.fill(HIST("FT0/nBCsVsTimeLeadingBCe"), timeSinceSOF);
416-
histos.fill(HIST("FT0/hTimeForRateLeadingBCCTP"), (bc.timestamp() - tsSOR) * 1.e-3);
417-
}
418-
if (trgFV0) {
419-
histos.fill(HIST("FV0/hTimeForRateLeadingBCCTP"), (bc.timestamp() - tsSOR) * 1.e-3);
420-
}
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);
421419
}
420+
if (trgFV0) {
421+
histos.fill(HIST("FV0/hTimeForRateLeadingBCCTP"), (bc.timestamp() - tsSOR) * 1.e-3);
422+
}
423+
}
422424
// }
423425
} // loop over bcs
424426

@@ -457,9 +459,9 @@ struct LumiStabilityTask {
457459

458460
histos.fill(HIST("FDD/hCounts"), 0);
459461
if (vertex) {
460-
histos.fill(HIST("FDD/bcVertexTrigger"), localBC);
461-
histos.fill(HIST("FDD/hCounts"), 1);
462462
histos.fill(HIST("hOrbitFDDVertex"), orbit - minOrbit);
463+
histos.fill(HIST("FDD/hCounts"), 1);
464+
histos.fill(HIST("FDD/bcVertexTrigger"), localBC);
463465

464466
if (bcPatternB[localBC]) {
465467
histos.fill(HIST("FDD/hTimeForRate"), (bc.timestamp() - tsSOR) * 1.e-3); // Converting ms into seconds

0 commit comments

Comments
 (0)