Skip to content

Commit

Permalink
do not error on negative energy (why?)
Browse files Browse the repository at this point in the history
lobis committed Oct 25, 2024
1 parent 79268d2 commit 63fb132
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
@@ -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

0 comments on commit 63fb132

Please sign in to comment.