cosmicrays / hermes

HERMES is a publicly available computational framework for the line of sight integration over galactic radiative processes which creates sky maps in the HEALPix-compatibile format.
GNU General Public License v3.0
22 stars 9 forks source link

Implement AAFRAG cross-section for gammas and neutrinos #31

Closed carmeloevoli closed 1 year ago

carmeloevoli commented 1 year ago

Init working on this:

  1. I created an empty class for AAfrag cross-section which will contain reading and interpolating functions https://github.com/cosmicrays/hermes/blob/9cd80ef1129ee8c7d07a68be60fc52f4c958384d/include/hermes/interactions/AAfragGamma.h#L23

  2. I modified the base class DiffCrossSection to account for independent channels and I removed the deprecated QNumber getSigma function: https://github.com/cosmicrays/hermes/blob/9cd80ef1129ee8c7d07a68be60fc52f4c958384d/include/hermes/interactions/DiffCrossSection.h#L29

  3. I had to substantially modify the function QPiZeroIntegral PiZeroIntegrator::integrateOverEnergy to compute the integral as the sum of independent contributions, to give: I(E_gamma) = c \int [f_p \Phi_p(E) dsigma_pp/dE_gamma(E, E_gamma) + f_p \Phi_He(E) dsigma_Hep/dE_gamma(E, E_gamma + f_He \Phi_p(E) dsigma_pHe/dE_gamma(E, E_gamma) + f_He \Phi_He(E) * dsigma_HeHe/dE_gamma(E, E_gamma]

https://github.com/cosmicrays/hermes/blob/9cd80ef1129ee8c7d07a68be60fc52f4c958384d/src/integrators/PiZeroIntegrator.cpp#L194

carmeloevoli commented 1 year ago

Now implemented in AAfragGamma.cpp.

I decide to use in place interpolation, but in the future it would be nice to use the Grid2D method.

carmeloevoli commented 1 year ago

Added UnitTests for AAfrag model, all tests seems working, I am confident is correctly implemented. Let's celebrate with a Montepulciano 🍷

adundovi commented 1 year ago

Great work @carmeloevoli! I'm sorry for not helping you with this.