Hello everyone. Sorry to bother you. I am trying to model a Micromegas detector mesh in Garfield++. As a first step, I want to model a single square hole in the mesh. The hole size is 70 × 70 µm. The detector configuration is the following: the cathode is at -300 V, the mesh/grid is at 0 V, and the anode is at +500 V. The drift gap between the cathode and the mesh is 5 mm, and the amplification gap between the mesh and the anode is 128 µm. From one primary electron entering the amplification region, I expect a gain of roughly 2000–4000 electrons on anode from one electron, but in my simulations I obtain only about 150–200 electrons from one. I have tried two approaches: first, building the mesh hole geometry explicitly with SolidBox objects, and second, using an interface-style approach similar to the ASACUSA Garfield++ example, where the mesh is treated more like a boundary between regions. So I suspect that I may be missing some important feature of the mesh description or the field/transport setup. Could someone please point out what I might be doing wrong? Is the problem more likely related to the geometry of the hole, the field calculation, the gas/transport settings, or the way the avalanche is started and counted? Thanks in advance for any advice.
Dear @rostislav from your code I believe you only simulate a single track. If you want to simulate the gain I would suggest you simulate the response of a single electron and not of an ionizing track. You would need also a lot of statistics in order to verify you obtain the right gain. Can you try to simulate ~5000 events (single electrons) and make a histogram of the gain?
I would suggest you first go with the ASACUSA example, as this is less precise but mich faster than calculating the fieldmap with neBEM as you are doing with the SolidBox geometry you have created.
“A track crossing the drift volume of the TPC ionizes the gas there. This primary charge drifts to the mesh in the low electrical field of the drift volume. When this charge penetrates in the small amplification gap, a cascade is generated in the large electrical field in this volume so that a much larger charge (Gain ∼ 10^3) is deposited on the anode.”
I believe you are missing the Penning effect in your simulations. I made a gas box of 1cm x 1cm x 128 um and applied 500V over it and simulated a single electron. When doing this without applying the Penning effect I obtained a gain of ~200. However when I applied it with a value of rPenning = 0.42 as suggested by Ozkan Sahin [1], I obtained a value that was unrealistically high. Unfortunately you are working with a 3-component gasmixture, and I believe the code might not be adapted to this, we would need to investigate this. Therefore I ran the simulation with the “previous” MM gas mixture: 93% Ar and 7% CO2. There again without the Penning effect the gain was 240, with the Penning effect the gain was ~1800. For binary mixtures this Penning effect is well simulated. More info in [2,3].
In Ar:CO2 the scaling with the CO2 concentration is automated and you can activate it like this: gas.EnablePenningTransfer()
For other mixtures you have to do it this way: // Penning transfer probability. constexpr double rPenning = 0.42; // Mean distance from the point of excitation. constexpr double lambdaPenning = 0.; gas.EnablePenningTransfer(rPenning, lambdaPenning, "ar");
). For the first electron, the simulation gave about 5000 electrons, which looks very good. The second electron did not end on the anode, but on the mesh.
However, with the same code, when the simulation starts processing the third electron, it seems to run indefinitely and never finishes.
I also tried launching a single electron from a higher position, for example:
const double xStart = -0.490;
In this case, the calculation also runs indefinitely and does not produce any result.
For one electron with
const double xStart = -0.496;
I get the following result:
=== Results (1 primary electrons) ===
Primary mesh transmission Tmesh = 1
Mean total avalanche size Gtotal = 5061
Mean electrons on anode Ganode = 5055
Endpoints on anode = 5055
Endpoints lost on mesh = 0
Endpoints lost on cathode = 0
Other endpoints = 6
Saved endpoints to electron_endpoints.txt
If you have a closer look at the figure on slide 8 of [1], then you can see that for the Ar:CO2:iC4H10 mixture the expected gain at 500V potential difference is between 2E4 and 4E4 (see 2 curves for 2 different but similar detectors). Instead if you were to use the Ar:CO2 mixture the gain at 500V potential difference would be between 4E3 and 6E3. I would think that your program “running indefinitely and never finishes” is due to computing restraints for events with an upward fluctuation of the gain. As you know the gain curve is a distribution and can have large tails. In general I always would like to know how much time a simulation takes by starting at lower values and plotting the gain obtained at lower potentials vs the computing time or computing resources used. If I were you I would try one of the following approaches, each one has their advantages and limitations:
simulate with the Ar:CO2:iC4H10 gas mixture at a potential where you expect a gain of few 1000 instead of few 10000: e.g. 400V or 420V.
simulate with Ar:CO2mixture at 500V, again to get a gain of few 1000 instead of few 10000
use faster simulation methods: e.g. driftlineRKF, but this would not simulate electrons stopped on the mesh. Slower but more precise would be AvalanceMC.
use a smart simulation approach, where you simulate only the first half of the amplification gap (76um instead of 128um). The statistical fluctuation in the number of electrons created in the first half of the gap is enough to get a good estimate for the final gain, and you can extrapolate to the full gain, see the method pioneered in [2].