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
Configurable<int> cfgEmptyBCsBeforeLeadingBC{"cfgEmptyBCsBeforeLeadingBC", 5, "Minimum number of empty BCs before a leading BC to identify it as such"};
mHistManager.add("FT0Vtx_EvSel/nBCsVsTime", "Time of TVX triggered BCs since the start of fill;;#bf{#it{N}_{BC}}", HistType::kTH1F, {timeAxis});
124
120
mHistManager.add("nBCsVsBCID", "Time of TVX triggered BCs since the start of fill;#bf{t-t_{SOF} (min)};#bf{#it{N}_{BC}}", HistType::kTH1F, {bcIDAxis});
125
-
mHistManager.add("InteractionRateVsTime", "IR from CTP vs time since SOF;#bf{t-t_{SOF} (min)};#bf{#it{N}_{BC}}", HistType::kTH1F, {timeAxis});
126
121
mHistManager.add("TFsPerMinute", "TFs seen in this minute (to account for failed jobs);#bf{t-t_{SOF} (min)};#bf{#it{N}_{TFs}}", HistType::kTH1F, {timeAxis});
// Create bcPatternL: leading BCs of type B that follow at least "cfgEmptyBCsBeforeLeadingBC" empty BCs
147
+
bcPatternL.reset(); // Initialize all bits to false
148
+
LOG(info) << "Starting to create bcPatternL from bcPatternB";
149
+
LOG(info) << "Total number of BCs to check: " << o2::constants::lhc::LHCMaxBunches;
150
+
151
+
int totalLeadingBCs = 0;
152
+
for (int iBC = 0; iBC < o2::constants::lhc::LHCMaxBunches; iBC++) {
153
+
if (bcPatternB[iBC]) { // Check if current BC is of type B
154
+
int emptyBCsBefore = 0; // Count how many consecutive BCs before this one are NOT type B
155
+
for (int j = 1; j <= cfgEmptyBCsBeforeLeadingBC; j++) {
156
+
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
157
+
if (!bcPatternB[prevBC]) {
158
+
emptyBCsBefore++;
159
+
} else {
160
+
break; // Stop counting if we hit a type B BC
161
+
}
162
+
}
163
+
if (emptyBCsBefore >= cfgEmptyBCsBeforeLeadingBC) { // If we found at least cfgEmptyBCsBeforeLeadingBC empty BCs before this one, mark it as leading
164
+
bcPatternL[iBC] = true;
165
+
totalLeadingBCs++;
166
+
}
167
+
}
168
+
}
169
+
LOG(info) << "bcPatternL creation complete. Total leading BCs found: " << totalLeadingBCs;
170
+
154
171
auto runInfo = o2::parameters::AggregatedRunInfo::buildAggregatedRunInfo(o2::ccdb::BasicCCDBManager::instance(), mRunNumber, strLPMProductionTag);
155
172
bcSOR = runInfo.orbitSOR * nBCsPerOrbit; // first bc of the first orbit
0 commit comments