+After first encouraging results with the novel machine-code-based AD tool [Derivgrind](https://www.scicomp.uni-kl.de/software/derivgrind/), we applied the operator-overloading AD tool [CoDiPack](https://www.scicomp.uni-kl.de/software/codi/) to the simulation parts of G4HepEm and HepEmShow. The code for the [differentiated G4HepEm](https://github.com/SciCompKL/g4hepem/) and [HepEmShow](https://github.com/SciCompKL/hepemshow/) is available on GitHub. It allows us to compute, e.g., the mean pathwise algorithmic derivative of the energy depositions in the layers of the calorimeter, with respect to the initial kinetic energy of the incoming electrons. It turns out that the code is "AD-friendly" once a single process called multiple scattering is disabled. Comparing with the numerical derivatives (difference quotients) of the mean energy depositions, we get only a small deviation of about 5%.
0 commit comments