You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Expand all lines: run/SimExamples/HepMC_EPOS4/README.md
+5-2Lines changed: 5 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,10 +7,12 @@ An in-depth explanation of the mechanisms behind the HepMC(3) data handling can
7
7
HepMC_fifo folder of the MC examples. The scripts use the `cmd` parameter of `GeneratorHepMC`
8
8
to spawn the EPOS4 generation via the `epos.sh` script.
9
9
10
-
EPOS4 uses the outdated HepMC2 libraries, so this had to be specified in the steering scripts
10
+
EPOS 4.0.0 uses the outdated HepMC2 libraries, so this had to be specified in the steering scripts
11
11
of the generators configuration. If `HepMC.version=2` is removed then the scripts will not work
12
12
anymore. This is to say that the balance achieved with the configurations provided is easily
13
13
destroyed if the user base edits parts that are not understood completely.
14
+
The latest EPOS 4.0.3 and EPOS4HQ both use HepMC3, so the version is automatically
15
+
updated when these generators are used.
14
16
15
17
# Scripts description
16
18
@@ -47,6 +49,7 @@ If no parameters are provided to the scripts, they will run with default values
47
49
-**-n , --nevents**→ changes the number of events in the .optns file or gets the one in the file if no events are provided
48
50
-**-i , --input**→ .optns filename to feed EPOS4, no extension must be set in the filename
49
51
-**-j , --jobs**→ sets the number of workers (jobs)
52
+
-**-hq**→ enables EPOS4HQ generation
50
53
-**-h , --help**→ prints usage instructions
51
54
-**-e , --ecm**→ sets the center-of-mass energy in the options file
52
55
@@ -62,6 +65,6 @@ Now the three scripts start to differ:
62
65
-**rundpg.sh**→ first the o2dpg_sim_workflow.py script will be launched generating the json configuration, then the o2_dpg_workflow_runner.py script will start the workflow
63
66
-**rundpl.sh**→ o2-sim-dpl-eventgen is executed piping its results to o2-sim-mctracks-to-aod and afterwards to o2-analysis-mctracks-to-aod-simple-task
64
67
65
-
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.
68
+
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;` 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.
Copy file name to clipboardExpand all lines: run/SimExamples/HepMC_EPOS4/rundpl.sh
+40-3Lines changed: 40 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -21,6 +21,18 @@ more=""
21
21
optns="example"
22
22
eCM=-1
23
23
JOBS=2
24
+
HEPMC=""
25
+
HQ=false
26
+
27
+
if [ -z"$EPO4VSN" ];then
28
+
echo"Error: EPOS4 version not found"
29
+
exit 7
30
+
fi
31
+
if [ "$EPO4VSN"=="4.0.0" ];then
32
+
HEPMC=";HepMC.version=2"
33
+
else
34
+
HEPMC=";HepMC.version=3"
35
+
fi
24
36
25
37
usage()
26
38
{
@@ -35,6 +47,7 @@ Options:
35
47
-j,--jobs JOBS Number of jobs ($JOBS)
36
48
-e,--ecm ENERGY Center-of-Mass energy
37
49
-h,--help Print these instructions
50
+
-hq HQ Enable EPOS4HQ
38
51
-- Rest of command line sent to o2-sim
39
52
40
53
COMMAND must be quoted if it contains spaces or other special
@@ -56,6 +69,7 @@ while test $# -gt 0 ; do
56
69
-i|--input) optns=$2;shift ;;
57
70
-j|--jobs) JOBS=$2;shift ;;
58
71
-e|--ecm) eCM=$2;shift ;;
72
+
-hq) HQ=true ;shift ;;
59
73
-h|--help) usage; o2-sim-dpl-eventgen --help full ;exit 0 ;;
60
74
--) shift;break ;;
61
75
*) echo"Unknown option '$1', did you forget '--'?">/dev/stderr
@@ -111,9 +125,32 @@ else
111
125
fi
112
126
fi
113
127
114
-
# Starting simulation => seed is fed automatically to epos with the --seed flag. HepMC.version = 2 is mandatory
128
+
# Set HQ mode
129
+
130
+
if [ "$HQ"=true ];then
131
+
echo"Setting HQ mode"
132
+
if grep -Fq "ihq"$optns.optns;then
133
+
sed -i "/ihq/c\set ihq 1"$optns.optns
134
+
else
135
+
echo"set ihq 1">>$optns.optns
136
+
fi
137
+
if [ -z"$EPO4HQVSN" ];then
138
+
echo"Error: EPOS4HQ version not found"
139
+
exit 7
140
+
else
141
+
HEPMC=";HepMC.version=3"
142
+
fi
143
+
else
144
+
echo"Turning OFF HQ mode"
145
+
if grep -Fq "ihq"$optns.optns;then
146
+
sed -i "/ihq/c\set ihq 0"$optns.optns
147
+
else
148
+
echo"set ihq 0">>$optns.optns
149
+
fi
150
+
fi
151
+
152
+
# Starting simulation => seed is fed automatically to epos with the --seed flag. HepMC.version = 2 is mandatory for version 4.0.0
115
153
# otherwise the simulation won't work.
116
154
# Seed is automatically set to Random by the epos.sh script because the --seed option with o2-sim-dpl-eventgen does not feed the number to GeneratorHepMC
0 commit comments