![]() |
Project
|
The usage of EPOS4 with the O2 machinery is presented in this short manual. An in-depth explanation of the mechanisms behind the HepMC(3) data handling can be found in the HepMC_fifo folder of the MC examples. The scripts use the cmd
parameter of GeneratorHepMC
to spawn the EPOS4 generation via the epos.sh
script.
EPOS4 uses the outdated HepMC2 libraries, so this had to be specified in the steering scripts of the generators configuration. If HepMC.version=2
is removed then the scripts will not work anymore. This is to say that the balance achieved with the configurations provided is easily destroyed if the user base edits parts that are not understood completely.
Four scripts are available to run the simulations
In addition an example.optns file is provided to start EPOS4, but more can be found in the generator example folder or in the website epos4learn.web.cern.ch where an extensive tutorial on the generator is provided.
It can be run without the help of the other scripts to simply generate an .hepmc file or print to the stdout the HepMC results. It it worth nothing though that EPOS4 must be loaded (via cvmfs through AliGenerators or O2sim for example) or installed. In this case the user should simply redirect the stdout to a file:
This example shows all the functionalities of the script (which are implemented in a similar way inside the generation steering scripts). In particular the -i
flag allows to provide .optns parameters to EPOS4, -s
feeds the generator with a user seed, and the HepMC output is given by test.hepmc by redirecting the stdout which will contain only the HepMC data thanks to the -hepstd
flag set automatically in epos.sh and the set ihepmc 2
option which MUST be set in the option file (otherwise either an hepmc file will be created - ihepmc 1 - or nothing will be generated - missing ihepmc or != 1|2 ).
It is important to note that setting an empty/null seed in the generator out of the box makes EPOS4 crash, so a protection was added in our steering epos.sh script which now generates a random number if 0 is provided.
The three scripts have little differences (especially in the first part), so they will be described together. They work after loading any O2sim version after the 20/09/2024 (included), since multiple modifications had to be performed on both EPOS4 and the introduction of AliGenO2 in order to be able to load both O2sim and EPOS4 simultaneously.
If no parameters are provided to the scripts, they will run with default values (energy and nevents provided in the example.optns file), but few flags are available to change the settings of the generation:
In the rundpg.sh
script an additional flag is available
In this case the options file will be copied in each tf$n folder, otherwise the epos script won't be able to run with multiple timeframes. In o2sim and DPG scripts the randomly generated seed is set directly, instead this is not feasible with the DPL one, given that the –seed option is not able to redirect this number to GeneratorHepMC. So a seed 0 is automatically given to epos.sh which generates a random number in return.
Now the three scripts start to differ:
The last few lines of the scripts contain the execution of o2-sim, DPG worflow creator/runner and DPL software respectively, so this part can be modified by the users following their requirements. It's important not to delete from the configuration keys GeneratorFileOrCmd.cmd=$cmd -i $optns;GeneratorFileOrCmd.bMaxSwitch=none;HepMC.version=2;
and it would be better to provide additional configurations via the -m flag. EPOS4 cannot set a maximum impact parameter value, so it's better to leave the bMaxSwitch to none, while the others serve the sole purpose of running successfully the generator using auto generated FIFOs.