Hi everyone,
I am trying to simulate the Landau distribution of the CSA signals (signal area, signal maximum, Gaussian ToT) from a silicon pad detector with MIP particles. In order to get the CSA Signals, I use the TransientPropagation + PulseTransfer
modules together with the new PixelPulse
object (see the very helpful merge request by Simon).
For sufficient statistics, I need to run a large number of Simulations (10-20k), which is where I run into a problem: Even though the probability is very low, the Landau tail of the energy deposition inside the detector implies that some events with “incredibly” large energy deposition occur. This energy deposition leads to a very large number of electrons and holes, that need to be propagated by TransientPropagation
. This can then result in Allpix getting “stuck” on an event.
I attached a minimum reproducible example (with fixed seed), which I ran using the v2.3.0
docker image.
detector.conf (143 Bytes)
geometry.conf (105 Bytes)
simulation.conf (1.2 KB)
Here, event #361 will generate ~41’362ke, compared to the mean deposited charge of ~36ke.
With a ~1000x as large charge deposition, the propagation will also take 1000x as long to complete. When I use multiprocessing, this ends up “blocking” the simulation (after the buffer is filled) until the propagation is finished.
Do I understand correctly that this “blocking” happens because Allpix² wants to enforce the correct order of events?
Would it be possible to relax somehow the requirement of events finishing in order and let the other workers continue computation while a very large charge deposition is still being propagated?
Another approach I thought about using is to “cut off” the spectrum of the deposited energy/charge (at for example, 10 * the median energy/charge). This could be done by splitting the simulation into two after DepositionGeant4
(using ROOTObjectWriter
and ROOTObjectReader
) and manually removing events from the ROOT file.
However, I feel that manually deleting events is quite a “hacky” way, and I’m not sure if Allpix² likes it if there are fewer events in a file than expected.
PS:
I have one more question, this one about the ElectricFieldReader module and linear electric fields:
The TransientPropagation
module explicitly disallows linear electric fields (mode = "linear"
).
What is the exact reason for this?
For a simple pad diode, the electric field would accurately be described by a linear function and indeed, using an electric field model = "custom"
with a linear field function results in no issues during execution.
Thanks for your help,
Andreas