Skip to content

Commit 9c87dab

Browse files
committed
Fix minor bugs
1 parent cfe5d9d commit 9c87dab

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

PWGMM/Lumi/Tasks/lumiStabilityPP.cxx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -215,17 +215,17 @@ struct LumiStabilityPP {
215215
for (int iBC = 0; iBC < o2::constants::lhc::LHCMaxBunches; iBC++) {
216216
if (bcPatternB[iBC]) { // Check if current BC is of type B
217217
int nonBtypeBCsBefore{0}, emptyBCsBefore{0}; // Count how many consecutive BCs before this one are non-B
218-
for (int j = 1; j <= numEmptyBCsBeforeLeadingBC; j++) {
218+
for (int j = 1; j <= numEmptyBCsBeforeLeadingBC->get(0u, 0u); j++) {
219219
int prevBC = (iBC - j + o2::constants::lhc::LHCMaxBunches) % o2::constants::lhc::LHCMaxBunches; // Protection for BCs at small indices to check the end of the orbit
220220
if (!bcPatternB[prevBC]) {
221221
nonBtypeBCsBefore++;
222222
} else {
223223
break; // Stop counting if we hit a BCB
224224
}
225225
}
226-
for (int j = 1; j <= numEmptyBCsBeforeLeadingBC; j++) {
226+
for (int j = 1; j <= numEmptyBCsBeforeLeadingBC->get(0u, 1u); j++) {
227227
int prevBC = (iBC - j + o2::constants::lhc::LHCMaxBunches) % o2::constants::lhc::LHCMaxBunches; // Protection for BCs at small indices to check the end of the orbit
228-
if (bcPatternE[prevBCE]) {
228+
if (bcPatternE[prevBC]) {
229229
emptyBCsBefore++;
230230
} else {
231231
break; // Stop counting if we hit a non BCE
@@ -330,10 +330,10 @@ struct LumiStabilityPP {
330330
int localBCFDD = globalBCFDD % nBCsPerOrbit;
331331

332332
bool isSuperLeadingBcFDD{true}, isSuperLeadingBcFT0{true};
333-
if (globalBCFDD - globalBCIdOfLastBCWithActivityFDD < numEmptyBCsBeforeLeadingBC) {
333+
if (globalBCFDD - globalBCIdOfLastBCWithActivityFDD < numEmptyBCsBeforeLeadingBC->get(0u, 2u)) {
334334
isSuperLeadingBcFDD = false; // not a super-leading BC for FDD
335335
}
336-
if (globalBC - globalBCIdOfLastBCWithActivityFT0 < numEmptyBCsBeforeLeadingBC) {
336+
if (globalBC - globalBCIdOfLastBCWithActivityFT0 < numEmptyBCsBeforeLeadingBC->get(0u, 2u)) {
337337
isSuperLeadingBcFT0 = false; // not a super-leading BC for FT0
338338
}
339339

0 commit comments

Comments
 (0)