From 2f61ec15b90cef276af8c53d2f4049a0fbe80574 Mon Sep 17 00:00:00 2001 From: aimeric-landou Date: Tue, 5 Sep 2023 11:57:10 +0200 Subject: [PATCH 1/2] Add HF injected jet-jet sim scriptx --- MC/run/PWGGAJE/run_jets_HF_bbbar.sh | 56 +++++++++++++++++++++++++++++ MC/run/PWGGAJE/run_jets_HF_ccbar.sh | 56 +++++++++++++++++++++++++++++ 2 files changed, 112 insertions(+) create mode 100644 MC/run/PWGGAJE/run_jets_HF_bbbar.sh create mode 100644 MC/run/PWGGAJE/run_jets_HF_ccbar.sh diff --git a/MC/run/PWGGAJE/run_jets_HF_bbbar.sh b/MC/run/PWGGAJE/run_jets_HF_bbbar.sh new file mode 100644 index 000000000..709c73cea --- /dev/null +++ b/MC/run/PWGGAJE/run_jets_HF_bbbar.sh @@ -0,0 +1,56 @@ +#!/usr/bin/env bash + +# Generate jet-jet events with ccbar HF injected, Pythia8 in a pre-defined pt hard bin and weighted. +# Execute: ./run_jets_HF_bbbar.sh + +# make sure O2DPG + O2 is loaded +[ ! "${O2DPG_ROOT}" ] && echo "Error: This needs O2DPG loaded" && exit 1 +[ ! "${O2_ROOT}" ] && echo "Error: This needs O2 loaded" && exit 1 + +# ----------- LOAD UTILITY FUNCTIONS -------------------------- +. ${O2_ROOT}/share/scripts/jobutils.sh + + +# ----------- START ACTUAL JOB ----------------------------- + +RNDSEED=${RNDSEED:-0} # [default = 0] time-based random seed + +NSIGEVENTS=${NSIGEVENTS:-10} +NTIMEFRAMES=${NTIMEFRAMES:-1} +NWORKERS=${NWORKERS:-8} +MODULES="--skipModules ZDC" #"PIPE ITS TPC EMCAL" +CONFIG_ENERGY=${CONFIG_ENERGY:-13600.0} +SIMENGINE=${SIMENGINE:-TGeant4} +WEIGHTPOW=${WEIGHTPOW:-6.0} +[[ ${SPLITID} != "" ]] && SEED="-seed ${SPLITID}" || SEED="" + +# Default for weighted productions +PTHATMIN=${PTHATMIN:-5.0} +PTHATMAX=${PTHATMAX:-300.0} + +# Define the pt hat bin arrays +pthatbin_loweredges=(0 5 7 9 12 16 21 28 36 45 57 70 85 99 115 132 150 169 190 212 235) +pthatbin_higheredges=( 5 7 9 12 16 21 28 36 45 57 70 85 99 115 132 150 169 190 212 235 -1) + +# Recover environmental vars for pt binning +#PTHATBIN=${PTHATBIN:-1} + +if [ -z "$PTHATBIN" ]; then + echo "Open Pt-hat range set" +else + PTHATMIN=${pthatbin_loweredges[$PTHATBIN]} + PTHATMAX=${pthatbin_higheredges[$PTHATBIN]} +fi + + +#ccbar filter +${O2DPG_ROOT}/MC/bin/o2dpg_sim_workflow.py -eCM ${CONFIG_ENERGY} -col pp -gen external -proc "jets" \ + -ptHatMin ${PTHATMIN} -ptHatMax ${PTHATMAX} \ + -tf ${NTIMEFRAMES} -ns ${NSIGEVENTS} -e ${SIMENGINE} \ + -j ${NWORKERS} -mod "--skipModules ZDC" \ + -interactionRate 500000 -confKey "Diamond.width[2]=6." ${SEED} \ + -ini $O2DPG_ROOT/MC/config/PWGHF/ini/GeneratorHFTrigger_bbbar.ini \ + +# run workflow +# allow increased timeframe parallelism with --cpu-limit 32 +${O2DPG_ROOT}/MC/bin/o2_dpg_workflow_runner.py -f workflow.json -tt aod --cpu-limit 32 \ No newline at end of file diff --git a/MC/run/PWGGAJE/run_jets_HF_ccbar.sh b/MC/run/PWGGAJE/run_jets_HF_ccbar.sh new file mode 100644 index 000000000..f92e223d4 --- /dev/null +++ b/MC/run/PWGGAJE/run_jets_HF_ccbar.sh @@ -0,0 +1,56 @@ +#!/usr/bin/env bash + +# Generate jet-jet events with ccbar HF injected, Pythia8 in a pre-defined pt hard bin and weighted. +# Execute: ./run_jets_HF_ccbar.sh + +# make sure O2DPG + O2 is loaded +[ ! "${O2DPG_ROOT}" ] && echo "Error: This needs O2DPG loaded" && exit 1 +[ ! "${O2_ROOT}" ] && echo "Error: This needs O2 loaded" && exit 1 + +# ----------- LOAD UTILITY FUNCTIONS -------------------------- +. ${O2_ROOT}/share/scripts/jobutils.sh + + +# ----------- START ACTUAL JOB ----------------------------- + +RNDSEED=${RNDSEED:-0} # [default = 0] time-based random seed + +NSIGEVENTS=${NSIGEVENTS:-10} +NTIMEFRAMES=${NTIMEFRAMES:-1} +NWORKERS=${NWORKERS:-8} +MODULES="--skipModules ZDC" #"PIPE ITS TPC EMCAL" +CONFIG_ENERGY=${CONFIG_ENERGY:-13600.0} +SIMENGINE=${SIMENGINE:-TGeant4} +WEIGHTPOW=${WEIGHTPOW:-6.0} +[[ ${SPLITID} != "" ]] && SEED="-seed ${SPLITID}" || SEED="" + +# Default for weighted productions +PTHATMIN=${PTHATMIN:-5.0} +PTHATMAX=${PTHATMAX:-300.0} + +# Define the pt hat bin arrays +pthatbin_loweredges=(0 5 7 9 12 16 21 28 36 45 57 70 85 99 115 132 150 169 190 212 235) +pthatbin_higheredges=( 5 7 9 12 16 21 28 36 45 57 70 85 99 115 132 150 169 190 212 235 -1) + +# Recover environmental vars for pt binning +#PTHATBIN=${PTHATBIN:-1} + +if [ -z "$PTHATBIN" ]; then + echo "Open Pt-hat range set" +else + PTHATMIN=${pthatbin_loweredges[$PTHATBIN]} + PTHATMAX=${pthatbin_higheredges[$PTHATBIN]} +fi + + +#ccbar filter +${O2DPG_ROOT}/MC/bin/o2dpg_sim_workflow.py -eCM ${CONFIG_ENERGY} -col pp -gen external -proc "jets" \ + -ptHatMin ${PTHATMIN} -ptHatMax ${PTHATMAX} \ + -tf ${NTIMEFRAMES} -ns ${NSIGEVENTS} -e ${SIMENGINE} \ + -j ${NWORKERS} -mod "--skipModules ZDC" \ + -interactionRate 500000 -confKey "Diamond.width[2]=6." ${SEED} \ + -ini $O2DPG_ROOT/MC/config/PWGHF/ini/GeneratorHFTrigger_ccbar.ini \ + +# run workflow +# allow increased timeframe parallelism with --cpu-limit 32 +${O2DPG_ROOT}/MC/bin/o2_dpg_workflow_runner.py -f workflow.json -tt aod --cpu-limit 32 \ No newline at end of file From 3c57b6cd398a156b763b76ff000850c55504d45e Mon Sep 17 00:00:00 2001 From: aimeric-landou Date: Thu, 21 Sep 2023 11:53:13 +0200 Subject: [PATCH 2/2] Add HF injected jet-jet sim scripts - fix weightPow --- MC/run/PWGGAJE/run_jets_HF_bbbar.sh | 1 + MC/run/PWGGAJE/run_jets_HF_ccbar.sh | 1 + 2 files changed, 2 insertions(+) diff --git a/MC/run/PWGGAJE/run_jets_HF_bbbar.sh b/MC/run/PWGGAJE/run_jets_HF_bbbar.sh index 709c73cea..be00d7fe9 100644 --- a/MC/run/PWGGAJE/run_jets_HF_bbbar.sh +++ b/MC/run/PWGGAJE/run_jets_HF_bbbar.sh @@ -50,6 +50,7 @@ ${O2DPG_ROOT}/MC/bin/o2dpg_sim_workflow.py -eCM ${CONFIG_ENERGY} -col pp -gen ex -j ${NWORKERS} -mod "--skipModules ZDC" \ -interactionRate 500000 -confKey "Diamond.width[2]=6." ${SEED} \ -ini $O2DPG_ROOT/MC/config/PWGHF/ini/GeneratorHFTrigger_bbbar.ini \ + -weightPow ${WEIGHTPOW} # run workflow # allow increased timeframe parallelism with --cpu-limit 32 diff --git a/MC/run/PWGGAJE/run_jets_HF_ccbar.sh b/MC/run/PWGGAJE/run_jets_HF_ccbar.sh index f92e223d4..3149f5092 100644 --- a/MC/run/PWGGAJE/run_jets_HF_ccbar.sh +++ b/MC/run/PWGGAJE/run_jets_HF_ccbar.sh @@ -50,6 +50,7 @@ ${O2DPG_ROOT}/MC/bin/o2dpg_sim_workflow.py -eCM ${CONFIG_ENERGY} -col pp -gen ex -j ${NWORKERS} -mod "--skipModules ZDC" \ -interactionRate 500000 -confKey "Diamond.width[2]=6." ${SEED} \ -ini $O2DPG_ROOT/MC/config/PWGHF/ini/GeneratorHFTrigger_ccbar.ini \ + -weightPow ${WEIGHTPOW} # run workflow # allow increased timeframe parallelism with --cpu-limit 32