Skip to content

Commit 452b827

Browse files
committed
Update of example including EPOS4.0.3 version
1 parent 6f985de commit 452b827

File tree

2 files changed

+36
-13
lines changed

2 files changed

+36
-13
lines changed

MC/config/examples/epos4/epos.sh

Lines changed: 25 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,29 @@
66

77
optns="example"
88
seed=$RANDOM
9+
EPOS4=""
10+
11+
if [ -z "$EPO4VSN" ]; then
12+
echo "Error: EPO4VSN environment variable is not set"
13+
exit 1
14+
fi
15+
16+
if [ "$EPO4VSN" = "4.0.0" ]; then
17+
EPOS4="$EPOS4_ROOT/epos4/scripts/epos"
18+
export LIBDIR=$EPOS4_ROOT/epos4/bin
19+
else
20+
EPOS4="$EPOS4_ROOT/epos4/bin/epos"
21+
export BIN_DIR=$EPOS4_ROOT/epos4/bin
22+
fi
23+
24+
# Check if the environment variable EPO4 is set (mandatory with o2dpg-sim-tests on CI machines)
25+
# If not, set all the EPOS4 related variables, most likely they are unset as well.
26+
if [ -z "${EPO4}" ]; then
27+
export EPO4=$EPOS4_ROOT/epos4/
28+
export OPT=./
29+
export HTO=./
30+
export CHK=./
31+
fi
932

1033
while test $# -gt 0 ; do
1134
case $1 in
@@ -26,16 +49,5 @@ if [ $seed -eq 0 ]; then
2649
seed=$RANDOM
2750
fi
2851

29-
# Check if the environment variable EPO4 is set (mandatory with o2dpg-sim-tests on CI machines)
30-
# If not, set all the EPOS4 related variables, most likely they are unset as well.
31-
if [ -z "${EPO4}" ]; then
32-
export EPO4=$EPOS4_ROOT/epos4/
33-
export LIBDIR=$EPOS4_ROOT/epos4/bin
34-
export EPO4VSN=4.0.0
35-
export OPT=./
36-
export HTO=./
37-
export CHK=./
38-
fi
39-
40-
# Or filters the stdout with only HepMC2 useful data
41-
$EPOS4_ROOT/epos4/scripts/epos -hepstd -s $seed $optns | sed -n 's/^\(HepMC::\|[EAUWVP] \)/\1/p'
52+
# OR filters the stdout with only HepMC useful data
53+
$EPOS4 -hepstd -s $seed $optns | sed -n 's/^\(HepMC::\|[EAUWVP] \)/\1/p'
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
#---> GeneratorEPOS4
2+
[GeneratorExternal]
3+
fileName=${O2DPG_MC_CONFIG_ROOT}/MC/config/examples/epos4/generator_EPOS4.C
4+
funcName=generateEPOS4("${O2DPG_MC_CONFIG_ROOT}/MC/config/examples/epos4/generator/example.optns", 2147483647)
5+
6+
[GeneratorFileOrCmd]
7+
cmd=${O2DPG_MC_CONFIG_ROOT}/MC/config/examples/epos4/epos.sh -i cfg
8+
bMaxSwitch=none
9+
10+
[HepMC]
11+
version=3

0 commit comments

Comments
 (0)