Skip to content

Commit ce5861f

Browse files
committed
simplify isEventSelected() function
1 parent cb06ad3 commit ce5861f

File tree

1 file changed

+4
-9
lines changed

1 file changed

+4
-9
lines changed

DPG/Tasks/TPC/utilsTpcSkimsTableCreator.h

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -43,16 +43,11 @@ enum {
4343
template <typename CollisionType>
4444
inline bool isEventSelected(const CollisionType& collision, const int applyEvSel)
4545
{
46-
if (applyEvSel == EventSelectionRun2) {
47-
if (!collision.sel7()) {
48-
return false;
49-
}
50-
} else if (applyEvSel == EventSelectionRun3) {
51-
if (!collision.sel8()) {
52-
return false;
53-
}
46+
if ((applyEvSel == EventSelectionRun2 && !collision.sel7()) || (applyEvSel == EventSelectionRun3 && !collision.sel8())) {
47+
return false;
48+
} else {
49+
return true;
5450
}
55-
return true;
5651
};
5752

5853
/// Random downsampling trigger function using Tsalis/Hagedorn spectra fit (sqrt(s) = 62.4 GeV to 13 TeV)

0 commit comments

Comments
 (0)