Skip to content

Commit c6951aa

Browse files
authored
Improve accounting of the analysed triggers (#7047)
1 parent 1277151 commit c6951aa

2 files changed

Lines changed: 4 additions & 3 deletions

File tree

EventFiltering/Zorro.cxx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,7 @@ std::vector<int> Zorro::initCCDB(o2::ccdb::BasicCCDBManager* ccdb, int runNumber
121121

122122
std::bitset<128> Zorro::fetch(uint64_t bcGlobalId, uint64_t tolerance)
123123
{
124+
uint64_t lastSelectedIdx = mLastSelectedIdx;
124125
mLastResult.reset();
125126
o2::dataformats::IRFrame bcFrame{InteractionRecord::long2IR(bcGlobalId) - tolerance, InteractionRecord::long2IR(bcGlobalId) + tolerance};
126127
if (bcGlobalId < mLastBCglobalId) {
@@ -133,7 +134,7 @@ std::bitset<128> Zorro::fetch(uint64_t bcGlobalId, uint64_t tolerance)
133134
for (int iTOI{0}; iTOI < 64; ++iTOI) {
134135
if (mZorroHelpers->at(i).selMask[iMask] & (1ull << iTOI)) {
135136
mLastResult.set(iMask * 64 + iTOI, 1);
136-
if (mAnalysedTriggers) {
137+
if (mAnalysedTriggers && i != lastSelectedIdx) {
137138
mAnalysedTriggers->Fill(iMask * 64 + iTOI);
138139
}
139140
}
@@ -166,4 +167,4 @@ bool Zorro::isSelected(uint64_t bcGlobalId, uint64_t tolerance)
166167
}
167168
}
168169
return false;
169-
}
170+
}

EventFiltering/Zorro.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,4 +77,4 @@ class Zorro
7777
o2::ccdb::BasicCCDBManager* mCCDB = nullptr;
7878
};
7979

80-
#endif // EVENTFILTERING_ZORRO_H_
80+
#endif // EVENTFILTERING_ZORRO_H_

0 commit comments

Comments
 (0)