Skip to content

Commit 5559507

Browse files
authored
Refactor conditional checks for clarity in Stack.h
1 parent f85bd63 commit 5559507

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

  • Detectors/Base/include/DetectorsBase

Detectors/Base/include/DetectorsBase/Stack.h

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -357,11 +357,13 @@ inline bool Stack::isFromRadDecay(const int id)
357357
return false;
358358
}
359359
const auto entry = mTrackIDtoParticlesEntry[id];
360-
if (entry < 0 || entry >= static_cast<int>(mParticles.size())) return false;
360+
if (entry < 0 || entry >= static_cast<int>(mParticles.size()))
361+
return false;
361362
auto part = (mParticles[entry]);
362363

363364
// primary particle ?
364-
if (part.getProcess() == 0 ) return false;
365+
if (part.getProcess() == 0 )
366+
return false;
365367
// particle directly from radioactive decay ?
366368
if (part.getProcess() == kPRadDecay) {
367369
return true;

0 commit comments

Comments
 (0)