Create a messenger file for G4PARTICLEXS and PhotonEvaporation database

Hello, in our simulation we use the two files:

data/G4PARTICLEXS4.0/proton/rescap10_21
data/PhotonEvaporation5.7/z11.a22

Given that we are studying two close resonance, we are currently studying them separately (i.e. one time we launch the simulation using the values for the first resonance, one time using values of the second one), then we have to replace each time the

data/G4PARTICLEXS4.0/proton/rescap10_21
data/PhotonEvaporation5.7/z11.a22

with the correct files for the for the resonance that we are studying.

Due to the fact that we are 4 people working to the simulation (we run it on laboratory machine) when I launch the simulation, I’ve to advice the other 3 people do not change the rescap10_21 and z11.a22 untill I end my simulation (and they must do the same).

I would know where are these files called? Because I would write (if possible) a messenger file so that in the run.mac we can write a flag to call the wanted file.
For example we will have

data/G4PARTICLEXS4.0/proton/rescap10_21_resonance1
data/PhotonEvaporation5.7/z11.a22_resonance1
data/G4PARTICLEXS4.0/proton/rescap10_21_resonance2
data/PhotonEvaporation5.7/z11.a22_resonance2

and by the run.mac we call the need files…

Thanks

1 Like

Here’s another option; it’s not great, but it would help your situation. Those directories are specified by two environment variables:

G4PARTICLEXSDATA=<path-to-your-G4-data>/G4PARTICLEXS4.0
G4LEVELGAMMADATA=<path-to-your-G4-data>/PhotonEvaporation5.7

What you could do is create two additional copies of those directories, e.g.,

<path-to-your-G4-data>/G4PARTICLEXS4.0_res1
<path-to-your-G4-data>/PhononEvaporation5.7_res1
<path-to-your-G4-data>/G4PARTICLEXS4.0_res2
<path-to-your-G4-data>/PhononEvaporation5.7_res2

and in those directories, do the appropriate file replacement to match the directory name.

Now, when each of the five people on your team runs, they set those two envvars to point to the particular version they want (maybe set up your own shell scripts to take care of it). You don’t have to coordinate changing a single central directory. Everybody can be running simultaneously with different configurations.

The down side is that those envvironment variable settings aren’t saved as part of the Geant4 output log. You’ll have to keep track of it separately to know the provenance of the different outputs.

1 Like

Thank you @mkelsey , then I’ve to propose this solution to the the responsable of the machine.