OpenGATE / Gate

Official public repository of Gate
http://www.opengatecollaboration.org
GNU Lesser General Public License v3.0
236 stars 263 forks source link

make sure energy resolution has a initial value #699

Closed tontyoutoure closed 2 months ago

tontyoutoure commented 3 months ago

Energy resolution digitizer may malfunction and generate bizzare energy value under certain circumstances. It all due to the fact that if resolution is set to 0, then the function will use a unitialized auto variable reso. Gate does not forbid a zero input of resolution, therefore it should guarantee to generate a correct value