You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: PWGMM/Lumi/Tasks/lumiStabilityPP.cxx
+42-96Lines changed: 42 additions & 96 deletions
Original file line number
Diff line number
Diff line change
@@ -61,56 +61,22 @@ enum BCCategories { BCA = 0, // A side BCs (bunch-crossings that had beam o
61
61
BCNSLFT0 = 9, // non-super-leading BCs for FT0 of type B (bunch-crossings that had beam from both sides but are not SL for FT0 activity for a configurable number of preceding BCs)
62
62
NBCCategories };
63
63
} // namespace lumi
64
-
namespaceaod
65
-
{
66
-
// Columns to store the information about the presence of FT0 and FDD signals associated to a given BC
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"};
111
77
112
-
Configurable<int> numEmptyBCsBeforeLeadingBC{"numEmptyBCsBeforeLeadingBC", 5, "Number of empty BCs before a leading BC"};
113
-
Configurable<int> bcShiftFDDForData2023{"bcShiftFDDForData2023", -15, "Number of bc to shift for FDD to be applied for 2023 data only"};
78
+
Configurable<int> numEmptyBCsBeforeLeadingBC{"numEmptyBCsBeforeLeadingBC", 5, "Number of empty (SL) or non-B (L) BCs before a (super)leading BC"};
79
+
Configurable<int> bcShiftFDDForData2023{"bcShiftFDDForData2023", 7, "Number of bc to shift for FDD to be applied for 2023 data only"};
histBcHasFT0[runNumber] = registry.add<TH2>(Form("%d/FITQA/BCHasFT0", runNumber), "Does the BC have FT0?;BC has FT0;TVX triggered according to CTP;#bf{#it{N}_{BC}}", HistType::kTH2D, {{2, -0.5, 1.5}, {2, -0.5, 1.5}});
181
-
histBcHasFT0[runNumber]->GetYaxis()->SetBinLabel(1, "No CTP trigger");
histBcHasFDD[runNumber] = registry.add<TH2>(Form("%d/FITQA/BCHasFDD", runNumber), "Does the BC have FDD?;BC has FDD;FDD triggered according to CTP;#bf{#it{N}_{BC}}", HistType::kTH2D, {{2, -0.5, 1.5}, {2, -0.5, 1.5}});
186
-
histBcHasFDD[runNumber]->GetYaxis()->SetBinLabel(1, "No CTP trigger");
for (int iTrigger{0}; iTrigger < NTriggerAliases; ++iTrigger) {
192
145
for (int iBCCategory{0}; iBCCategory < NBCCategories; ++iBCCategory) {
193
146
if (doTypeBC->get(0u, iBCCategory)) {
@@ -242,24 +195,24 @@ struct LumiStabilityPP {
242
195
bcPatternB = beamPatternA & beamPatternC;
243
196
bcPatternE = ~beamPatternA & ~beamPatternC;
244
197
245
-
// Create bcPatternL: leading BCs of type B that follow at least "numEmptyBCsBeforeLeadingBC" empty BCs
198
+
// Create bcPatternL: leading BCs of type B that follow at least "numEmptyBCsBeforeLeadingBC" non-B BCs
246
199
bcPatternL.reset(); // Initialize all bits to false
247
200
LOG(info) << "Starting to create bcPatternL from bcPatternB";
248
201
LOG(info) << "Total number of BCs to check: " << o2::constants::lhc::LHCMaxBunches;
249
202
250
203
int totalLeadingBCs = 0;
251
204
for (int iBC = 0; iBC < o2::constants::lhc::LHCMaxBunches; iBC++) {
252
205
if (bcPatternB[iBC]) { // Check if current BC is of type B
253
-
intemptyBCsBefore = 0; // Count how many consecutive BCs before this one are NOT type B
206
+
intnonBBCsBefore = 0; // Count how many consecutive BCs before this one are NOT type B
254
207
for (int j = 1; j <= numEmptyBCsBeforeLeadingBC; j++) {
255
208
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
256
209
if (!bcPatternB[prevBC]) {
257
-
emptyBCsBefore++;
210
+
nonBBCsBefore++;
258
211
} else {
259
212
break; // Stop counting if we hit a type B BC
260
213
}
261
214
}
262
-
if (emptyBCsBefore >= numEmptyBCsBeforeLeadingBC) { // If we found at least numEmptyBCsBeforeLeadingBC empty BCs before this one, mark it as leading
215
+
if (nonBBCsBefore >= numEmptyBCsBeforeLeadingBC) { // If we found at least numEmptyBCsBeforeLeadingBC empty BCs before this one, mark it as leading
263
216
bcPatternL[iBC] = true;
264
217
totalLeadingBCs++;
265
218
}
@@ -319,21 +272,16 @@ struct LumiStabilityPP {
319
272
}
320
273
321
274
setLHCIFData(bc);
322
-
BCsWithTimeStamps::iterator bcFDD;
323
-
auto idxBc = bc.globalIndex();
275
+
int bcShiftFDD{0};
324
276
if (isData23) {
325
-
if ((bcShiftFDDForData2023 < 0 && idxBc < -bcShiftFDDForData2023) || (bcShiftFDDForData2023 > 0 && idxBc > bcs.size() - bcShiftFDDForData2023)) { // we need to skip the first/last bcs because of the FDD-FT0 shift
0 commit comments