Skip to content

Commit 741cc7d

Browse files
authored
Merge pull request #122 from rest-for-physics/negative-energy
Do not error on negative energy (why?)
2 parents 79268d2 + 04dec5e commit 741cc7d

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/TRestDetectorHitsReadoutAnalysisProcess.cxx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,11 @@ TRestEvent* TRestDetectorHitsReadoutAnalysisProcess::ProcessEvent(TRestEvent* in
2424
if (energy == 0) {
2525
continue;
2626
} else if (energy < 0) {
27-
// this should never happen
27+
// This should never happen. Why does it happen?
2828
cerr << "TRestDetectorHitsReadoutAnalysisProcess::ProcessEvent() : "
29-
<< "Negative energy found in hit " << hitIndex << endl;
30-
exit(1);
29+
<< "Negative energy found in hit " << hitIndex << ". Energy (keV): " << energy << endl;
30+
// exit(1);
31+
continue; // We should error, but for now we just skip the hit
3132
}
3233
// when working with hits derived from experimental data, only relative z is available, so it cannot
3334
// be used to check if a position is inside the readout. We use z=0 in this case which in most cases

0 commit comments

Comments
 (0)