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
for (auto iMother = particleMother.mothersIds().front(); iMother <= particleMother.mothersIds().back(); ++iMother) { // loop over the mother particles of the analysed particle
939
949
if (std::find(arrayIdsStage.begin(), arrayIdsStage.end(), iMother) != arrayIdsStage.end()) { // if a mother is still present in the vector, do not check it again
for (int iBin{2}; iBin < mSelections->GetNbinsX(); ++iBin) { // Exclude first and last bins as they are total number of analysed and selected events, respectively
if (bcGlobalId < mLastBCglobalId) {/// Handle the possible discontinuity in the BC processed by the analyses
127
143
mLastSelectedIdx = 0;
128
144
}
145
+
uint64_t lastSelectedIdx = mLastSelectedIdx;
129
146
mLastBCglobalId = bcGlobalId;
130
147
for (size_t i = mLastSelectedIdx; i < mBCranges.size(); i++) {
131
148
if (!mBCranges[i].isOutside(bcFrame)) {
132
149
for (int iMask{0}; iMask < 2; ++iMask) {
133
150
for (int iTOI{0}; iTOI < 64; ++iTOI) {
134
151
if (mZorroHelpers->at(i).selMask[iMask] & (1ull << iTOI)) {
135
152
mLastResult.set(iMask * 64 + iTOI, 1);
136
-
if (mAnalysedTriggers) {
153
+
if (mAnalysedTriggers && !mAccountedBCranges[i]) {
137
154
mAnalysedTriggers->Fill(iMask * 64 + iTOI);
138
155
}
139
156
}
140
157
}
141
158
}
142
-
mLastSelectedIdx = i;
143
-
returnmLastResult;
159
+
mAccountedBCranges[i] = true;
160
+
mLastSelectedIdx = mLastSelectedIdx == lastSelectedIdx-- ? i : mLastSelectedIdx; /// Decrease lastSelectedIdx to make sure this check is valid only in its first instance
0 commit comments