next-exp / nexus

Geant4 simulation framework of the NEXT Collaboration
5 stars 55 forks source link

Fix order of energies #203

Closed paolafer closed 1 year ago

paolafer commented 1 year ago

The energy vector of the wavelength shifter property had a bug, being the last value of energy lower than the second-to-last one (energies in property vectors must be in increasing order). This PR fixes the bug and replaces the last value of absorption length, which was infinite, with a value closer to the real value appearing in the reference plot. In my opinion this is a more correct approach, since we know that at that energy the absorption length is not infinite.

halmamol commented 1 year ago

I'm having issues trying to read the absorption length plot (to see where do you get the 108 nm value, basically). Could you point it to me offline maybe?

paolafer commented 1 year ago

I'm having issues trying to read the absorption length plot (to see where do you get the 108 nm value, basically). Could you point it to me offline maybe?

The 108 nm value is arbitrary, I just wanted to obtain an energy lower than optPhotMaxE_ and as close as possible to it. Since in that range the absorption length is always 400 nm, according to the plot, the exact value is not relevant. In fact, I think we can simplify it even more, removing that value completely.

paolafer commented 1 year ago

I also wonder, do we need to keep what is between the commented lines 827 and 856?

That was kept by @jmunozv, when we changed the way we implemented the property to avoid secondary wavelength shifting. I think we can keep it, for the moment, since the wavelength shifting process can still be improved.

halmamol commented 1 year ago

The 108 nm value is arbitrary, I just wanted to obtain an energy lower than optPhotMaxE_ and as close as possible to it. Since in that range the absorption length is always 400 nm, according to the plot, the exact value is not relevant. In fact, I think we can simplify it even more, removing that value completely.

I see what you mean, and I like how you simplified it now (including the commented text).