Enable_pai flag in combination w/ gdml geometry and custom E-Field

Hi,

As Simon said, it does indeed seem to be a Geant4 problem, and specifically PAI. We’re trying to figure it out, and are in contact with Geant4 developers concerning this!
Looking at your setup with the visualiser, it seems that most decay particles end up in the collimator, and that’s where the simulation gets stuck. The opening angle of the source sadly has no effect when the particle used is a radioactively decaying one, as those decays are always isotropic, so a lot more than expected end up in the collimator.

If you don’t need the strontium-90 spectrum specifically, I would suggest running without collimator and with a beam of electrons with a given energy as a source for now, with a size given by the collimator hole.
If you do need the strontium-90, you can construct a spectrum using the General Particle Source (i.e. macro as source type in Allpix Squared). I attach an example of such a macro here (with no electrons with an energy below 100 keV generated; also note that the default unit for the General Particle Source is allegedly MeV when giving histograms to pull from, but the results I get with this indicate that the given energies are a bit low). By tweaking the maxtheta and mintheta, this can act as a collimator would. When aiming straight for the sensors, the passive material given by the PCB can also be removed without impacting the simulation results in any significant way. This can further reduce the risk of things getting stuck for a long time.

This is just a temporary workaround however, hopefully the PAI issue will be fixed soon!

Kind regards,
Håkan

sourceMacroExample.mac (28.9 KB)