Skip to content

Commit 6a68c15

Browse files
aimeric-landouBenedikt Volkel
authored andcommitted
Add HF injected jet-jet sim scripts (#1236)
* Add HF injected jet-jet sim scripts
1 parent 4c28be0 commit 6a68c15

2 files changed

Lines changed: 114 additions & 0 deletions

File tree

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
#!/usr/bin/env bash
2+
3+
# Generate jet-jet events with ccbar HF injected, Pythia8 in a pre-defined pt hard bin and weighted.
4+
# Execute: ./run_jets_HF_bbbar.sh
5+
6+
# make sure O2DPG + O2 is loaded
7+
[ ! "${O2DPG_ROOT}" ] && echo "Error: This needs O2DPG loaded" && exit 1
8+
[ ! "${O2_ROOT}" ] && echo "Error: This needs O2 loaded" && exit 1
9+
10+
# ----------- LOAD UTILITY FUNCTIONS --------------------------
11+
. ${O2_ROOT}/share/scripts/jobutils.sh
12+
13+
14+
# ----------- START ACTUAL JOB -----------------------------
15+
16+
RNDSEED=${RNDSEED:-0} # [default = 0] time-based random seed
17+
18+
NSIGEVENTS=${NSIGEVENTS:-10}
19+
NTIMEFRAMES=${NTIMEFRAMES:-1}
20+
NWORKERS=${NWORKERS:-8}
21+
MODULES="--skipModules ZDC" #"PIPE ITS TPC EMCAL"
22+
CONFIG_ENERGY=${CONFIG_ENERGY:-13600.0}
23+
SIMENGINE=${SIMENGINE:-TGeant4}
24+
WEIGHTPOW=${WEIGHTPOW:-6.0}
25+
[[ ${SPLITID} != "" ]] && SEED="-seed ${SPLITID}" || SEED=""
26+
27+
# Default for weighted productions
28+
PTHATMIN=${PTHATMIN:-5.0}
29+
PTHATMAX=${PTHATMAX:-300.0}
30+
31+
# Define the pt hat bin arrays
32+
pthatbin_loweredges=(0 5 7 9 12 16 21 28 36 45 57 70 85 99 115 132 150 169 190 212 235)
33+
pthatbin_higheredges=( 5 7 9 12 16 21 28 36 45 57 70 85 99 115 132 150 169 190 212 235 -1)
34+
35+
# Recover environmental vars for pt binning
36+
#PTHATBIN=${PTHATBIN:-1}
37+
38+
if [ -z "$PTHATBIN" ]; then
39+
echo "Open Pt-hat range set"
40+
else
41+
PTHATMIN=${pthatbin_loweredges[$PTHATBIN]}
42+
PTHATMAX=${pthatbin_higheredges[$PTHATBIN]}
43+
fi
44+
45+
46+
#ccbar filter
47+
${O2DPG_ROOT}/MC/bin/o2dpg_sim_workflow.py -eCM ${CONFIG_ENERGY} -col pp -gen external -proc "jets" \
48+
-ptHatMin ${PTHATMIN} -ptHatMax ${PTHATMAX} \
49+
-tf ${NTIMEFRAMES} -ns ${NSIGEVENTS} -e ${SIMENGINE} \
50+
-j ${NWORKERS} -mod "--skipModules ZDC" \
51+
-interactionRate 500000 -confKey "Diamond.width[2]=6." ${SEED} \
52+
-ini $O2DPG_ROOT/MC/config/PWGHF/ini/GeneratorHFTrigger_bbbar.ini \
53+
-weightPow ${WEIGHTPOW}
54+
55+
# run workflow
56+
# allow increased timeframe parallelism with --cpu-limit 32
57+
${O2DPG_ROOT}/MC/bin/o2_dpg_workflow_runner.py -f workflow.json -tt aod --cpu-limit 32
Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
#!/usr/bin/env bash
2+
3+
# Generate jet-jet events with ccbar HF injected, Pythia8 in a pre-defined pt hard bin and weighted.
4+
# Execute: ./run_jets_HF_ccbar.sh
5+
6+
# make sure O2DPG + O2 is loaded
7+
[ ! "${O2DPG_ROOT}" ] && echo "Error: This needs O2DPG loaded" && exit 1
8+
[ ! "${O2_ROOT}" ] && echo "Error: This needs O2 loaded" && exit 1
9+
10+
# ----------- LOAD UTILITY FUNCTIONS --------------------------
11+
. ${O2_ROOT}/share/scripts/jobutils.sh
12+
13+
14+
# ----------- START ACTUAL JOB -----------------------------
15+
16+
RNDSEED=${RNDSEED:-0} # [default = 0] time-based random seed
17+
18+
NSIGEVENTS=${NSIGEVENTS:-10}
19+
NTIMEFRAMES=${NTIMEFRAMES:-1}
20+
NWORKERS=${NWORKERS:-8}
21+
MODULES="--skipModules ZDC" #"PIPE ITS TPC EMCAL"
22+
CONFIG_ENERGY=${CONFIG_ENERGY:-13600.0}
23+
SIMENGINE=${SIMENGINE:-TGeant4}
24+
WEIGHTPOW=${WEIGHTPOW:-6.0}
25+
[[ ${SPLITID} != "" ]] && SEED="-seed ${SPLITID}" || SEED=""
26+
27+
# Default for weighted productions
28+
PTHATMIN=${PTHATMIN:-5.0}
29+
PTHATMAX=${PTHATMAX:-300.0}
30+
31+
# Define the pt hat bin arrays
32+
pthatbin_loweredges=(0 5 7 9 12 16 21 28 36 45 57 70 85 99 115 132 150 169 190 212 235)
33+
pthatbin_higheredges=( 5 7 9 12 16 21 28 36 45 57 70 85 99 115 132 150 169 190 212 235 -1)
34+
35+
# Recover environmental vars for pt binning
36+
#PTHATBIN=${PTHATBIN:-1}
37+
38+
if [ -z "$PTHATBIN" ]; then
39+
echo "Open Pt-hat range set"
40+
else
41+
PTHATMIN=${pthatbin_loweredges[$PTHATBIN]}
42+
PTHATMAX=${pthatbin_higheredges[$PTHATBIN]}
43+
fi
44+
45+
46+
#ccbar filter
47+
${O2DPG_ROOT}/MC/bin/o2dpg_sim_workflow.py -eCM ${CONFIG_ENERGY} -col pp -gen external -proc "jets" \
48+
-ptHatMin ${PTHATMIN} -ptHatMax ${PTHATMAX} \
49+
-tf ${NTIMEFRAMES} -ns ${NSIGEVENTS} -e ${SIMENGINE} \
50+
-j ${NWORKERS} -mod "--skipModules ZDC" \
51+
-interactionRate 500000 -confKey "Diamond.width[2]=6." ${SEED} \
52+
-ini $O2DPG_ROOT/MC/config/PWGHF/ini/GeneratorHFTrigger_ccbar.ini \
53+
-weightPow ${WEIGHTPOW}
54+
55+
# run workflow
56+
# allow increased timeframe parallelism with --cpu-limit 32
57+
${O2DPG_ROOT}/MC/bin/o2_dpg_workflow_runner.py -f workflow.json -tt aod --cpu-limit 32

0 commit comments

Comments
 (0)