Skip to content

Commit

Permalink
Merge pull request #122 from rest-for-physics/negative-energy
Browse files Browse the repository at this point in the history
Do not error on negative energy (why?)
  • Loading branch information
lobis authored Oct 25, 2024
2 parents 79268d2 + 04dec5e commit 741cc7d
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/TRestDetectorHitsReadoutAnalysisProcess.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,11 @@ TRestEvent* TRestDetectorHitsReadoutAnalysisProcess::ProcessEvent(TRestEvent* in
if (energy == 0) {
continue;
} else if (energy < 0) {
// this should never happen
// This should never happen. Why does it happen?
cerr << "TRestDetectorHitsReadoutAnalysisProcess::ProcessEvent() : "
<< "Negative energy found in hit " << hitIndex << endl;
exit(1);
<< "Negative energy found in hit " << hitIndex << ". Energy (keV): " << energy << endl;
// exit(1);
continue; // We should error, but for now we just skip the hit
}
// when working with hits derived from experimental data, only relative z is available, so it cannot
// be used to check if a position is inside the readout. We use z=0 in this case which in most cases
Expand Down

0 comments on commit 741cc7d

Please sign in to comment.