-
Notifications
You must be signed in to change notification settings - Fork 496
Expand file tree
/
Copy pathruno2sim.sh
More file actions
executable file
·60 lines (49 loc) · 1.78 KB
/
runo2sim.sh
File metadata and controls
executable file
·60 lines (49 loc) · 1.78 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
#!/usr/bin/env bash
#
# Hybrid generator simulation example with triggers and cocktail:
# the simulation is configured using a JSON file (hybridconfig.json in this folder), whose
# template can be generated using the script ${O2DPG_ROOT}/MC/bin/o2_hybrid_gen.py.
# Trigger is taken from the trigger.macro and it's a simple impact parameter selection for
# heavy ion collisions
set -x
if [ ! "${O2DPG_ROOT}" ]; then
echo "This needs O2DPG loaded; alienv enter ..."
exit 1
fi
[ ! "${O2_ROOT}" ] && echo "Error: This needs O2 loaded" && exit 2
NEV=1
more=""
JOBS=2
usage()
{
cat <<EOF
Usage: $0 [OPTIONS]
Options:
-m,--more CONFIG More configurations ($more)
-n,--nevents EVENTS Number of events ($NEV)
-j,--jobs JOBS Number of jobs ($JOBS)
-h,--help Print these instructions
-- Rest of command line sent to o2-sim
COMMAND must be quoted if it contains spaces or other special
characters
Below follows the help output of o2-sim
EOF
}
if [ "$#" -lt 2 ]; then
echo "Running with default values"
fi
while test $# -gt 0 ; do
case $1 in
-m|--more) more="$2" ; shift ;;
-n|--nevents) NEV=$2 ; shift ;;
-j|--jobs) JOBS=$2 ; shift ;;
-h|--help) usage; o2-sim --help full ; exit 0 ;;
--) shift ; break ;;
*) echo "Unknown option '$1', did you forget '--'?" >/dev/stderr
exit 3
;;
esac
shift
done
# Starting simulation with Hybrid generator
${O2_ROOT}/bin/o2-sim --noGeant -j $JOBS --field ccdb --vertexMode kCCDB --run 300000 --configKeyValues "MFTBase.buildAlignment=true;GeneratorHybrid.configFile=$PWD/hybridconfig.json;GeneratorHybrid.randomize=false;${more}" -g hybrid -o genevents --timestamp 1546300800000 --seed 836302859 -n $NEV