Skip to content

Commit 5de05cd

Browse files
committed
Revert BCL defition requiring not-BCB instead of BCE and reduce number of bins
1 parent 27fef86 commit 5de05cd

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

PWGMM/Lumi/Tasks/lumiStabilityPP.cxx

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ struct LumiStabilityPP {
7575
static constexpr int defaulFlags[1][NBCCategories] = {{1, 1, 1, 1, 1, 1, 1, 1, 1, 1}};
7676
Configurable<LabeledArray<int>> doTypeBC{"doTypeBC", {defaulFlags[0], NBCCategories, {"BCA", "BCB", "BCC", "BCE", "BCL", "BCSLFDD", "BCSLFT0", "BCNL", "BCNSLFDD", "BCNSLFT0"}}, "Create and fill histograms for different BC types"};
7777

78-
Configurable<int> numEmptyBCsBeforeLeadingBC{"numEmptyBCsBeforeLeadingBC", 5, "Number of empty BCs before a (super)leading BC"};
78+
Configurable<int> numEmptyBCsBeforeLeadingBC{"numEmptyBCsBeforeLeadingBC", 5, "Number of (empty) non-B BCs before a (super)leading BC"};
7979
Configurable<int> bcShiftFDDForData2023{"bcShiftFDDForData2023", 7, "Number of bc to shift for FDD to be applied for 2023 data only"};
8080

8181
std::bitset<o2::constants::lhc::LHCMaxBunches> beamPatternA, beamPatternC;
@@ -146,8 +146,8 @@ struct LumiStabilityPP {
146146
if (doTypeBC->get(0u, iBCCategory)) {
147147
histBcVsTime[iTrigger][iBCCategory][runNumber] = registry.add<TH1>(Form("%d/%s", runNumber, std::string(NBCsVsTimeHistNames[iTrigger][iBCCategory]).c_str()), "Time of triggered BCs since the start of fill;#bf{t-t_{SOF} (min)};#bf{#it{N}_{BC}}", HistType::kTH1D, {timeAxis});
148148
histBcVsBcId[iTrigger][iBCCategory][runNumber] = registry.add<TH1>(Form("%d/%s", runNumber, std::string(NBCsVsBCIDHistNames[iTrigger][iBCCategory]).c_str()), "BC ID of triggered BCs;#bf{BC ID in orbit};#bf{#it{N}_{BC}}", HistType::kTH1D, {bcIDAxis});
149-
histMu[iTrigger][iBCCategory][runNumber] = registry.add<TH1>(Form("%d/%s", runNumber, std::string(MuHistNames[iTrigger][iBCCategory]).c_str()), "pile-up #mu of different triggers;#mu;counts", HistType::kTH1D, {{1000, 0., 0.2}});
150-
histMuPerBcId[iTrigger][iBCCategory][runNumber] = registry.add<TH2>(Form("%d/%sVsBcId", runNumber, std::string(MuHistNames[iTrigger][iBCCategory]).c_str()), "pile-up #mu of different triggers per BCId;#mu;counts", HistType::kTH2D, {{bcIDAxis}, {1000, 0., 0.2}});
149+
histMu[iTrigger][iBCCategory][runNumber] = registry.add<TH1>(Form("%d/%s", runNumber, std::string(MuHistNames[iTrigger][iBCCategory]).c_str()), "pile-up #mu of different triggers;#mu;counts", HistType::kTH1D, {{400, 0., 0.2}});
150+
histMuPerBcId[iTrigger][iBCCategory][runNumber] = registry.add<TH2>(Form("%d/%sVsBcId", runNumber, std::string(MuHistNames[iTrigger][iBCCategory]).c_str()), "pile-up #mu of different triggers per BCId;#mu;counts", HistType::kTH2D, {{bcIDAxis}, {400, 0., 0.2}});
151151
}
152152
}
153153
}
@@ -203,16 +203,16 @@ struct LumiStabilityPP {
203203
int totalLeadingBCs = 0;
204204
for (int iBC = 0; iBC < o2::constants::lhc::LHCMaxBunches; iBC++) {
205205
if (bcPatternB[iBC]) { // Check if current BC is of type B
206-
int emptyBCsBefore = 0; // Count how many consecutive BCs before this one are empty
206+
int nonBtypeBCsBefore = 0; // Count how many consecutive BCs before this one are empty
207207
for (int j = 1; j <= numEmptyBCsBeforeLeadingBC; j++) {
208208
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
209-
if (bcPatternE[prevBC]) {
210-
emptyBCsBefore++;
209+
if (!bcPatternB[prevBC]) {
210+
nonBtypeBCsBefore++;
211211
} else {
212212
break; // Stop counting if we hit a non-empty BC
213213
}
214214
}
215-
if (emptyBCsBefore >= numEmptyBCsBeforeLeadingBC) { // If we found at least numEmptyBCsBeforeLeadingBC empty BCs before this one, mark it as leading
215+
if (nonBtypeBCsBefore >= numEmptyBCsBeforeLeadingBC) { // If we found at least numEmptyBCsBeforeLeadingBC empty BCs before this one, mark it as leading
216216
bcPatternL[iBC] = true;
217217
totalLeadingBCs++;
218218
}

0 commit comments

Comments
 (0)