golosio / xrmc

17 stars 10 forks source link

Problem with Doppler broadening #31

Open golosio opened 6 years ago

golosio commented 6 years ago

Doppler broadening occasionally returns a negative energy. I observed this problem with some check on the example folder Edep in the branch detector3d. I temporarily solved this problem in the same branch by setting E=0 in case it is negative.

tschoonj commented 6 years ago

Interesting. You could also fix this by changing the while loop condition to ensure it keeps running while E < 0.0

golosio commented 6 years ago

As I do not know exactly how the Doppler broadening function is working and how this fix should be implemented, I think it is better if you check it when you can and fix the problem in the master branch, then I will replicate your solution in the detector3d branch.