Using environment variables to identify GDML geometry files in REST

Hi,

This post is to follow up a discussion about the geometries we had the other day @IAXO . As we discussed, when we are working with geometries we might introduce changes to the geometric model (solids, volumes, positions), to the parameters defining those volumes, or the gas mixture, pressure or quencher of the TPC.

Because of that, I found the most convenient way in the past to define my geometry files and setup files completely separated. This is because, I could maintain a common geometry (solids, volumes, physVolumes) definition, but change the parameters at setup.gdml so that it changes the scale of the geometry. This is because the chamber is defined in absolute distances and all other volumes grow relative to it by specifying the thicknesses of materials. Then, there is some advantage of defining different setups.gdml with a common geometry file.

But of course, this is just something that might depend on each experience. Just trying to justify why I define two independent files.

The real reason of my post is to make you aware that using environment variables is already possible in GDML@REST. I introduced minor changes to GdmlPreprocessor so that we can now define also the header identifying the geometry.

Therefore, I think we should use that to define the properties of the gas.

For example, the header in TREX-DM basic geometry used to identify the geometry is as follows.

<!-- ##VERSION TREX-DM Basic geometry Version 1.1 (${GAS} - ${PRESSURE}bar - Quencher: ${QUENCHER})## -->

Then, as soon as I only change the gas properties, the version of the geometry does not need to be modified, but the gas used will be written at the version header.

We would need to launch our simulations as:

export GAS=Neon_ISO

export PRESSURE=1.5

export QUENCHER=0.02

restG4 MySim.rml

And the TRestG4Metadata class will contain something as follows:

Please, take this into account when building your geometries. And post any comments or discussion about the description of geometries here.

This post is also connected to the centralised materials and geometry version identification.

Greets
Javier

1 Like