Hello,
I’m just starting with Garfield++ and have hit my first roadblock during the geometry/detector setup.
Tl-dr: Only one of the gas volumes is used as active medium.
I am trying to simulate a 3 layer GEM detector. For this I have created a model and calculated the E-Flieds using ElmerFEM. In order to define finer meshes around the foils I have cut the gas into smaller chunks. Together with the foils I get a total of 20 volumes 11 of which are suppose to be gas. Her you can see the section of one of the foils:
The import into Garfield works without issue and the SetGas function also finds all the appropriate materials, here the output of the ComponentElmer::Initialise, ComponentElmer::SetGas, and ComponentElmer::PrintRange :
ComponentElmer::Initialise:
Read 345010 nodes and 226158 elements from file ./mesh.header.
Read potentials from file ./gem_cell.result.
Set material 0 of 20 to eps 1.
Set material 1 of 20 to eps 1.
Set material 2 of 20 to eps 1.
Set material 3 of 20 to eps 1e+09.
Set material 4 of 20 to eps 4.
Set material 5 of 20 to eps 1e+09.
Set material 6 of 20 to eps 1.
Set material 7 of 20 to eps 1.
Set material 8 of 20 to eps 1.
Set material 9 of 20 to eps 1.
Set material 10 of 20 to eps 1e+09.
Set material 11 of 20 to eps 4.
Set material 12 of 20 to eps 1e+09.
Set material 13 of 20 to eps 1.
Set material 14 of 20 to eps 1.
Set material 15 of 20 to eps 1.
Set material 16 of 20 to eps 1.
Set material 17 of 20 to eps 1e+09.
Set material 18 of 20 to eps 4.
Set material 19 of 20 to eps 1e+09.
ComponentElmer::Initialise: Finished.
ComponentElmer::Prepare:
Caching the bounding boxes of all elements... done.
Initialized tetrahedral tree.
ComponentElmer::SetGas: Associating material 0 with Ar/CO2.
ComponentElmer::SetGas: Associating material 1 with Ar/CO2.
ComponentElmer::SetGas: Associating material 2 with Ar/CO2.
ComponentElmer::SetGas: Associating material 6 with Ar/CO2.
ComponentElmer::SetGas: Associating material 7 with Ar/CO2.
ComponentElmer::SetGas: Associating material 8 with Ar/CO2.
ComponentElmer::SetGas: Associating material 9 with Ar/CO2.
ComponentElmer::SetGas: Associating material 13 with Ar/CO2.
ComponentElmer::SetGas: Associating material 14 with Ar/CO2.
ComponentElmer::SetGas: Associating material 15 with Ar/CO2.
ComponentElmer::SetGas: Associating material 16 with Ar/CO2.
ComponentElmer::PrintRange:
Dimensions of the elementary block
0 < x < 0.007 cm,
0 < y < 0.0121244 cm,
-0.1005 < z < 0.6185 cm,
-3500 < V < 0 V.
Periodicities
x: mirror with length 0.007 cm
y: mirror with length 0.0121244 cm
z: none
Here I seam to make a mistake, because only one of the gas volumes gets used as such. Here a plot of the mesh, only the lowest volume gets plotted as a gas:
When I define a sensor I also see the behavior which can be seen in the plot.
sensor_gem.IsInside(0, 0, 0.02)
returns
False
While:
sensor_gem.IsInside(0, 0, -0.02)
returns
True
Here is a link to the Jupyter notebook and the used Elmer files (The link expires on 17.02.26): (Or not, not allowed to post links jet
)
Can someone help me with this? Sadly I was not able to find any useful information myself.
Root version:
| Welcome to ROOT 6.38.00 https://root.cern |
| (c) 1995-2025, The ROOT Team; conception: R. Brun, F. Rademakers |
| Built for linuxx8664gcc on Jan 19 2026, 09:49:56 |
| From tags/v6-38-00@v6-38-00 |
Garfield version: commit 331c1c07 from 25.12.2025
Thanks in advance for any help.
Greetings
Erik Ehlert


