Skip to content

Commit c0016be

Browse files
Copilotaltsybee
andauthored
Fix cppcheck boolean operation warnings in eventSelectionQa
Co-authored-by: altsybee <12641156+altsybee@users.noreply.github.com>
1 parent 831d174 commit c0016be

1 file changed

Lines changed: 7 additions & 9 deletions

File tree

‎DPG/Tasks/AOTEvent/eventSelectionQa.cxx‎

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -111,9 +111,9 @@ struct EventSelectionQaTask {
111111
ccdb->setCaching(true);
112112
ccdb->setLocalObjectValidityChecking();
113113

114-
const AxisSpec axisMultV0M{1000, 0., isLowFlux ? 40000. : 40000., "V0M multiplicity"};
114+
const AxisSpec axisMultV0M{1000, 0., 40000., "V0M multiplicity"};
115115
const AxisSpec axisMultV0A{1000, 0., isLowFlux ? 40000. : 200000., "V0A multiplicity"};
116-
const AxisSpec axisMultV0C{1000, 0., isLowFlux ? 30000. : 30000., "V0C multiplicity"};
116+
const AxisSpec axisMultV0C{1000, 0., 30000., "V0C multiplicity"};
117117
const AxisSpec axisMultT0A{1000, 0., isLowFlux ? 10000. : 200000., "T0A multiplicity"};
118118
const AxisSpec axisMultT0C{1000, 0., isLowFlux ? 2000. : 70000., "T0C multiplicity"};
119119
const AxisSpec axisMultT0M{1000, 0., isLowFlux ? 12000. : 270000., "T0M multiplicity"};
@@ -568,9 +568,7 @@ struct EventSelectionQaTask {
568568
histos.fill(HIST("hV0C012vsTklCol"), nTracklets, multRingV0C012);
569569

570570
// filling plots for accepted events
571-
bool accepted = 0;
572-
accepted |= !isINT1period & col.sel7();
573-
accepted |= isINT1period & sel1;
571+
bool accepted = (!isINT1period && col.sel7()) || (isINT1period && sel1);
574572
if (!accepted) {
575573
continue;
576574
}
@@ -786,13 +784,13 @@ struct EventSelectionQaTask {
786784
const auto& bcPast = bcs.iteratorAt(bc.globalIndex() - deltaIndex);
787785
deltaBC = globalBC - bcPast.globalBC();
788786
if (deltaBC < maxDeltaBC) {
789-
pastActivityFT0 |= bcPast.has_ft0();
790-
pastActivityFV0 |= bcPast.has_fv0a();
791-
pastActivityFDD |= bcPast.has_fdd();
787+
pastActivityFT0 = pastActivityFT0 || bcPast.has_ft0();
788+
pastActivityFV0 = pastActivityFV0 || bcPast.has_fv0a();
789+
pastActivityFDD = pastActivityFDD || bcPast.has_fdd();
792790
}
793791
}
794792

795-
bool pastActivity = pastActivityFT0 | pastActivityFV0 | pastActivityFDD;
793+
bool pastActivity = pastActivityFT0 || pastActivityFV0 || pastActivityFDD;
796794

797795
int localBC = bc.globalBC() % nBCsPerOrbit;
798796
float timeV0A = bc.has_fv0a() ? bc.fv0a().time() : -999.f;

0 commit comments

Comments
 (0)