Skip to content

Commit 45dbf17

Browse files
committed
update to use current workflow
1 parent 211dd19 commit 45dbf17

File tree

7 files changed

+115
-167
lines changed

7 files changed

+115
-167
lines changed

MC/run/PWGGAJE/run_decaygammajets.sh

Lines changed: 19 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -17,41 +17,40 @@
1717
RNDSEED=${RNDSEED:-0} # [default = 0] time-based random seed
1818

1919
NSIGEVENTS=${NSIGEVENTS:-20}
20+
NTIMEFRAMES=${NTIMEFRAMES:-5}
2021
NWORKERS=${NWORKERS:-8}
21-
MODULES="--skipModules ZDC" #"PIPE ITS TPC EMCAL"
22-
CONFIG_ENERGY=${CONFIG_ENERGY:-5020.0}
23-
CONFIG_NUCLEUSA=${CONFIG_NUCLEUSA:-2212}
24-
CONFIG_NUCLEUSB=${CONFIG_NUCLEUSB:-2212}
22+
CONFIG_ENERGY=${CONFIG_ENERGY:-13000.0}
23+
SIMENGINE=${SIMENGINE:-TGeant4}
2524

2625
# Recover environmental vars for detector acceptance binning
2726
# accessed inside prompt_gamma.C
28-
export CONFIG_DECAYGAMMA_PTMIN=${CONFIG_DECAYGAMMA_PTMIN:-3.5}
27+
export PTTRIGMIN=${PTTRIGMIN:-3.5}
2928

30-
if [ -z "$CONFIG_DECAYGAMMA_PTMIN" ]; then
29+
if [ -z "$PTTRIGMIN" ]; then
3130
echo "Detector acceptance option (env. var. CONFIG_DECAYGAMMA_PTMIN) not set, abort."
3231
exit 1
3332
fi
3433

35-
echo 'Decay photon minimum pT option ' $CONFIG_DECAYGAMMA_PTMIN "GeV/c"
34+
echo 'Decay photon minimum pT option ' $PTTRIGMIN "GeV/c"
3635

3736
# Recover environmental vars for pt binning
38-
PTHATBIN=${PTHATBIN:-1}
37+
#PTHATBIN=${PTHATBIN:-1}
3938

4039
if [ -z "$PTHATBIN" ]; then
4140
echo "Pt-hat bin (env. var. PTHATBIN) not set, abort."
4241
exit 1
4342
fi
4443

4544
# Define the pt hat bin arrays and set bin depending threshold
46-
if [ $CONFIG_DECAYGAMMA_PTMIN = "3.5" ]; then
45+
if [ $PTTRIGMIN = "3.5" ]; then
4746
pthatbin_loweredges=(5 7 9 12 16 21)
4847
pthatbin_higheredges=(7 9 12 16 21 -1)
4948

5049
PTHATMIN=${pthatbin_loweredges[$PTHATBIN]}
5150
PTHATMAX=${pthatbin_higheredges[$PTHATBIN]}
5251
fi
5352

54-
if [ $CONFIG_DECAYGAMMA_PTMIN = "7" ]; then
53+
if [ $PTTRIGMIN = "7" ]; then
5554
pthatbin_loweredges=(8 10 14 19 26 35 48 66)
5655
pthatbin_higheredges=(10 14 19 26 35 48 66 -1)
5756

@@ -72,21 +71,14 @@ fi
7271

7372
echo 'Detector acceptance option ' $PARTICLE_ACCEPTANCE
7473

75-
# Generate PYTHIA8 gamma-jet configuration
76-
${O2DPG_ROOT}/MC/config/common/pythia8/utils/mkpy8cfg.py \
77-
--output=pythia8_jets.cfg \
78-
--seed=${RNDSEED} \
79-
--idA=${CONFIG_NUCLEUSA} \
80-
--idB=${CONFIG_NUCLEUSB} \
81-
--eCM=${CONFIG_ENERGY} \
82-
--process=jets \
83-
--ptHatMin=${PTHATMIN} \
84-
--ptHatMax=${PTHATMAX}
85-
86-
# Generate signal
87-
taskwrapper sgnsim.log o2-sim -j ${NWORKERS} -n ${NSIGEVENTS} \
88-
-m ${MODULES} -o sgn -g pythia8 \
89-
-t external --configFile $O2DPG_ROOT/MC/config/PWGGAJE/ini/trigger_decay_gamma.ini
90-
91-
# We need to exit for the ALIEN JOB HANDLER!
74+
# create workflow
75+
${O2DPG_ROOT}/MC/bin/o2dpg_sim_workflow.py -eCM ${CONFIG_ENERGY} -col pp -gen pythia8 -proc "jets" \
76+
-ptHatMin ${PTHATMIN} -ptHatMax ${PTHATMAX} \
77+
-tf ${NTIMEFRAMES} -ns ${NSIGEVENTS} -e ${SIMENGINE} \
78+
-j ${NWORKERS} -mod "--skipModules ZDC" \
79+
-trigger "external" -ini "\$O2DPG_ROOT/MC/config/PWGGAJE/ini/trigger_decay_gamma.ini"
80+
81+
# run workflow
82+
${O2DPG_ROOT}/MC/bin/o2_dpg_workflow_runner.py -f workflow.json
83+
9284
exit 0

MC/run/PWGGAJE/run_dirgamma.sh

Lines changed: 13 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,11 @@
1717
RNDSEED=${RNDSEED:-0} # [default = 0] time-based random seed
1818

1919
NSIGEVENTS=${NSIGEVENTS:-20}
20+
NTIMEFRAMES=${NTIMEFRAMES:-5}
2021
NWORKERS=${NWORKERS:-8}
2122
MODULES="--skipModules ZDC" #"PIPE ITS TPC EMCAL"
22-
CONFIG_ENERGY=${CONFIG_ENERGY:-5020.0}
23-
CONFIG_NUCLEUSA=${CONFIG_NUCLEUSA:-2212}
24-
CONFIG_NUCLEUSB=${CONFIG_NUCLEUSB:-2212}
23+
CONFIG_ENERGY=${CONFIG_ENERGY:-13000.0}
24+
SIMENGINE=${SIMENGINE:-TGeant4}
2525

2626
# Define the pt hat bin arrays
2727
pthatbin_loweredges=(5 11 21 36 57 84)
@@ -55,21 +55,14 @@ export CONFIG_OUTPARTON_PDG=${CONFIG_OUTPARTON_PDG:-0}
5555

5656
echo 'Parton PDG option ' $CONFIG_OUTPARTON_PDG
5757

58-
# Generate PYTHIA8 gamma-jet configuration
59-
${O2DPG_ROOT}/MC/config/common/pythia8/utils/mkpy8cfg.py \
60-
--output=pythia8_dirgamma.cfg \
61-
--seed=${RNDSEED} \
62-
--idA=${CONFIG_NUCLEUSA} \
63-
--idB=${CONFIG_NUCLEUSB} \
64-
--eCM=${CONFIG_ENERGY} \
65-
--process=dirgamma \
66-
--ptHatMin=${PTHATMIN} \
67-
--ptHatMax=${PTHATMAX}
68-
69-
# Generate signal
70-
taskwrapper sgnsim.log o2-sim -j ${NWORKERS} -n ${NSIGEVENTS} \
71-
-m ${MODULES} -o sgn -g pythia8 \
72-
-t external --configFile $O2DPG_ROOT/MC/config/PWGGAJE/ini/trigger_prompt_gamma.ini
73-
74-
# We need to exit for the ALIEN JOB HANDLER!
58+
# create workflow
59+
${O2DPG_ROOT}/MC/bin/o2dpg_sim_workflow.py -eCM ${CONFIG_ENERGY} -col pp -gen pythia8 -proc "dirgamma" \
60+
-ptHatMin ${PTHATMIN} -ptHatMax ${PTHATMAX} \
61+
-tf ${NTIMEFRAMES} -ns ${NSIGEVENTS} -e ${SIMENGINE} \
62+
-j ${NWORKERS} -mod "--skipModules ZDC" \
63+
-trigger "external" -ini "\$O2DPG_ROOT/MC/config/PWGGAJE/ini/trigger_prompt_gamma.ini"
64+
65+
# run workflow
66+
${O2DPG_ROOT}/MC/bin/o2_dpg_workflow_runner.py -f workflow.json
67+
7568
exit 0

MC/run/PWGGAJE/run_dirgamma_embedding.sh

Lines changed: 30 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,12 @@
1212
# ----------- START ACTUAL JOB -----------------------------
1313

1414
RNDSEED=${RNDSEED:-0} # [default = 0] time-based random seed
15-
NSIGEVENTS=${NSIGEVENTS:-20}
16-
NBKGEVENTS=${NBKGEVENTS:-20}
15+
NSIGEVENTS=${NSIGEVENTS:-2}
16+
NBKGEVENTS=${NBKGEVENTS:-1}
17+
NTIMEFRAMES=${NTIMEFRAMES:-5}
1718
NWORKERS=${NWORKERS:-8}
18-
MODULES="--skipModules ZDC" #"PIPE ITS TPC EMCAL"
1919
CONFIG_ENERGY=${CONFIG_ENERGY:-5020.0}
20-
CONFIG_NUCLEUSA=${CONFIG_NUCLEUSA:-2212}
21-
CONFIG_NUCLEUSB=${CONFIG_NUCLEUSB:-2212}
20+
SIMENGINE=${SIMENGINE:-TGeant4}
2221

2322
# Define the pt hat bin arrays
2423
pthatbin_loweredges=(5 11 21 36 57 84)
@@ -35,28 +34,30 @@ fi
3534
PTHATMIN=${pthatbin_loweredges[$PTHATBIN]}
3635
PTHATMAX=${pthatbin_higheredges[$PTHATBIN]}
3736

38-
# Generate background
39-
taskwrapper bkgsim.log o2-sim -j ${NWORKERS} -n ${NBKGEVENTS} \
40-
-g pythia8hi -m ${MODULES} -o bkg \
41-
--configFile ${O2DPG_ROOT}/MC/config/common/ini/basic.ini
42-
43-
# Generate Pythia8 gamma-jet configuration
44-
${O2DPG_ROOT}/MC/config/common/pythia8/utils/mkpy8cfg.py \
45-
--output=pythia8_dirgamma.cfg \
46-
--seed=${RNDSEED} \
47-
--idA=${CONFIG_NUCLEUSA} \
48-
--idB=${CONFIG_NUCLEUSB} \
49-
--eCM=${CONFIG_ENERGY} \
50-
--process=dirgamma \
51-
--ptHatMin=${PTHATMIN} \
52-
--ptHatMax=${PTHATMAX}
53-
54-
# Generate and embed signal into background
55-
taskwrapper sgnsim.log o2-sim -j ${NWORKERS} -n ${NSIGEVENTS} \
56-
-g pythia8 -m ${MODULES} \
57-
--configKeyValues "GeneratorPythia8.config=pythia8_dirgamma.cfg" \
58-
--embedIntoFile bkg_Kine.root \
59-
-o sgn
60-
61-
# We need to exit for the ALIEN JOB HANDLER!
37+
# Recover environmental vars for detector acceptance binning
38+
# accessed inside prompt_gamma.C
39+
export PARTICLE_ACCEPTANCE=${PARTICLE_ACCEPTANCE:-1}
40+
41+
if [ -z "$PARTICLE_ACCEPTANCE" ]; then
42+
echo "Detector acceptance option (env. var. PARTICLE_ACCEPTANCE) not set, abort."
43+
exit 1
44+
fi
45+
46+
echo 'Detector acceptance option ' $PARTICLE_ACCEPTANCE
47+
48+
# Recover environmental vars for outgoing parton flavour
49+
# accessed inside prompt_gamma.C
50+
export CONFIG_OUTPARTON_PDG=${CONFIG_OUTPARTON_PDG:-0}
51+
52+
# create workflow
53+
${O2DPG_ROOT}/MC/bin/o2dpg_sim_workflow.py -eCM ${CONFIG_ENERGY} -col pp -gen pythia8 -proc "dirgamma" \
54+
-ptHatMin ${PTHATMIN} -ptHatMax ${PTHATMAX} \
55+
-tf ${NTIMEFRAMES} -ns ${NSIGEVENTS} -e ${SIMENGINE} \
56+
-nb ${NBKGEVENTS} --embedding \
57+
-j ${NWORKERS} -mod "--skipModules ZDC" \
58+
-trigger "external" -ini "\$O2DPG_ROOT/MC/config/PWGGAJE/ini/trigger_prompt_gamma.ini"
59+
60+
# run workflow
61+
${O2DPG_ROOT}/MC/bin/o2_dpg_workflow_runner.py -f workflow.json
62+
6263
exit 0

MC/run/PWGGAJE/run_dirgamma_hook.sh

Lines changed: 13 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,11 @@
1818
RNDSEED=${RNDSEED:-0} # [default = 0] time-based random seed
1919

2020
NSIGEVENTS=${NSIGEVENTS:-20}
21+
NTIMEFRAMES=${NTIMEFRAMES:-5}
2122
NWORKERS=${NWORKERS:-8}
2223
MODULES="--skipModules ZDC" #"PIPE ITS TPC EMCAL"
23-
CONFIG_ENERGY=${CONFIG_ENERGY:-5020.0}
24-
CONFIG_NUCLEUSA=${CONFIG_NUCLEUSA:-2212}
25-
CONFIG_NUCLEUSB=${CONFIG_NUCLEUSB:-2212}
24+
CONFIG_ENERGY=${CONFIG_ENERGY:-13000.0}
25+
SIMENGINE=${SIMENGINE:-TGeant4}
2626

2727
# Define the pt hat bin arrays
2828
pthatbin_loweredges=(5 11 21 36 57 84)
@@ -56,21 +56,14 @@ export CONFIG_OUTPARTON_PDG=${CONFIG_OUTPARTON_PDG:-0}
5656

5757
echo 'Parton PDG option ' $CONFIG_OUTPARTON_PDG
5858

59-
# Generate PYTHIA8 gamma-jet configuration
60-
${O2DPG_ROOT}/MC/config/common/pythia8/utils/mkpy8cfg.py \
61-
--output=pythia8_dirgamma.cfg \
62-
--seed=${RNDSEED} \
63-
--idA=${CONFIG_NUCLEUSA} \
64-
--idB=${CONFIG_NUCLEUSB} \
65-
--eCM=${CONFIG_ENERGY} \
66-
--process=dirgamma \
67-
--ptHatMin=${PTHATMIN} \
68-
--ptHatMax=${PTHATMAX}
69-
70-
# Generate signal
71-
taskwrapper sgnsim.log o2-sim -j ${NWORKERS} -n ${NSIGEVENTS} \
72-
-m ${MODULES} -o sgn -g pythia8 \
73-
--configFile $O2DPG_ROOT/MC/config/PWGGAJE/ini/hook_prompt_gamma.ini
74-
75-
# We need to exit for the ALIEN JOB HANDLER!
59+
# create workflow
60+
${O2DPG_ROOT}/MC/bin/o2dpg_sim_workflow.py -eCM ${CONFIG_ENERGY} -col pp -gen pythia8 -proc "dirgamma" \
61+
-ptHatMin ${PTHATMIN} -ptHatMax ${PTHATMAX} \
62+
-tf ${NTIMEFRAMES} -ns ${NSIGEVENTS} -e ${SIMENGINE} \
63+
-j ${NWORKERS} -mod "--skipModules ZDC" \
64+
-ini "\$O2DPG_ROOT/MC/config/PWGGAJE/ini/hook_prompt_gamma.ini"
65+
66+
# run workflow
67+
${O2DPG_ROOT}/MC/bin/o2_dpg_workflow_runner.py -f workflow.json
68+
7669
exit 0

MC/run/PWGGAJE/run_jets.sh

Lines changed: 12 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,11 @@
1414
RNDSEED=${RNDSEED:-0} # [default = 0] time-based random seed
1515

1616
NSIGEVENTS=${NSIGEVENTS:-20}
17+
NTIMEFRAMES=${NTIMEFRAMES:-5}
1718
NWORKERS=${NWORKERS:-8}
1819
MODULES="--skipModules ZDC" #"PIPE ITS TPC EMCAL"
19-
CONFIG_ENERGY=${CONFIG_ENERGY:-5020.0}
20-
CONFIG_NUCLEUSA=${CONFIG_NUCLEUSA:-2212}
21-
CONFIG_NUCLEUSB=${CONFIG_NUCLEUSB:-2212}
20+
CONFIG_ENERGY=${CONFIG_ENERGY:-13000.0}
21+
SIMENGINE=${SIMENGINE:-TGeant4}
2222

2323
# Define the pt hat bin arrays
2424
pthatbin_loweredges=(0 5 7 9 12 16 21 28 36 45 57 70 85 99 115 132 150 169 190 212 235)
@@ -35,22 +35,13 @@ fi
3535
PTHATMIN=${pthatbin_loweredges[$PTHATBIN]}
3636
PTHATMAX=${pthatbin_higheredges[$PTHATBIN]}
3737

38-
# Generate Pythia8 jet-jet configuration
39-
${O2DPG_ROOT}/MC/config/common/pythia8/utils/mkpy8cfg.py \
40-
--output=pythia8_jets.cfg \
41-
--seed=${RNDSEED} \
42-
--idA=${CONFIG_NUCLEUSA} \
43-
--idB=${CONFIG_NUCLEUSB} \
44-
--eCM=${CONFIG_ENERGY} \
45-
--process=jets \
46-
--ptHatMin=${PTHATMIN} \
47-
--ptHatMax=${PTHATMAX}
48-
49-
# Generate signal
50-
taskwrapper sgnsim.log o2-sim -j ${NWORKERS} -n ${NSIGEVENTS} \
51-
-g pythia8 -m ${MODULES} \
52-
--configKeyValues "GeneratorPythia8.config=pythia8_jets.cfg" \
53-
-o sgn
54-
55-
# We need to exit for the ALIEN JOB HANDLER!
38+
# create workflow
39+
${O2DPG_ROOT}/MC/bin/o2dpg_sim_workflow.py -eCM ${CONFIG_ENERGY} -col pp -gen pythia8 -proc "jets" \
40+
-ptHatMin ${PTHATMIN} -ptHatMax ${PTHATMAX} \
41+
-tf ${NTIMEFRAMES} -ns ${NSIGEVENTS} -e ${SIMENGINE} \
42+
-j ${NWORKERS} -mod "--skipModules ZDC"
43+
44+
# run workflow
45+
${O2DPG_ROOT}/MC/bin/o2_dpg_workflow_runner.py -f workflow.json
46+
5647
exit 0

MC/run/PWGGAJE/run_jets_embedding.sh

Lines changed: 14 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,12 @@
1212
# ----------- START ACTUAL JOB -----------------------------
1313

1414
RNDSEED=${RNDSEED:-0} # [default = 0] time-based random seed
15-
NSIGEVENTS=${NSIGEVENTS:-20}
16-
NBKGEVENTS=${NBKGEVENTS:-20}
15+
NSIGEVENTS=${NSIGEVENTS:-2}
16+
NBKGEVENTS=${NBKGEVENTS:-1}
17+
NTIMEFRAMES=${NTIMEFRAMES:-5}
1718
NWORKERS=${NWORKERS:-8}
18-
MODULES="--skipModules ZDC" #"PIPE ITS TPC EMCAL"
1919
CONFIG_ENERGY=${CONFIG_ENERGY:-5020.0}
20-
CONFIG_NUCLEUSA=${CONFIG_NUCLEUSA:-2212}
21-
CONFIG_NUCLEUSB=${CONFIG_NUCLEUSB:-2212}
20+
SIMENGINE=${SIMENGINE:-TGeant4}
2221

2322
# Define the pt hat bin arrays
2423
pthatbin_loweredges=(0 5 7 9 12 16 21 28 36 45 57 70 85 99 115 132 150 169 190 212 235)
@@ -35,28 +34,14 @@ fi
3534
PTHATMIN=${pthatbin_loweredges[$PTHATBIN]}
3635
PTHATMAX=${pthatbin_higheredges[$PTHATBIN]}
3736

38-
# Generate background
39-
taskwrapper bkgsim.log o2-sim -j ${NWORKERS} -n ${NBKGEVENTS} \
40-
-g pythia8hi -m ${MODULES} -o bkg \
41-
--configFile ${O2DPG_ROOT}/MC/config/common/ini/basic.ini
42-
43-
# Generate Pythia8 jet-jet configuration
44-
${O2DPG_ROOT}/MC/config/common/pythia8/utils/mkpy8cfg.py \
45-
--output=pythia8_jets.cfg \
46-
--seed=${RNDSEED} \
47-
--idA=${CONFIG_NUCLEUSA} \
48-
--idB=${CONFIG_NUCLEUSB} \
49-
--eCM=${CONFIG_ENERGY} \
50-
--process=jets \
51-
--ptHatMin=${PTHATMIN} \
52-
--ptHatMax=${PTHATMAX}
53-
54-
# Generate and embed signal into background
55-
taskwrapper sgnsim.log o2-sim -j ${NWORKERS} -n ${NSIGEVENTS} \
56-
-g pythia8 -m ${MODULES} \
57-
--configKeyValues "GeneratorPythia8.config=pythia8_jets.cfg" \
58-
--embedIntoFile bkg_Kine.root \
59-
-o sgn
60-
61-
# We need to exit for the ALIEN JOB HANDLER!
37+
# create workflow
38+
${O2DPG_ROOT}/MC/bin/o2dpg_sim_workflow.py -eCM ${CONFIG_ENERGY} -col pp -gen pythia8 -proc "jets" \
39+
-ptHatMin ${PTHATMIN} -ptHatMax ${PTHATMAX} \
40+
-tf ${NTIMEFRAMES} -ns ${NSIGEVENTS} -e ${SIMENGINE} \
41+
-nb ${NBKGEVENTS} --embedding \
42+
-j ${NWORKERS} -mod "--skipModules ZDC"
43+
44+
# run workflow
45+
${O2DPG_ROOT}/MC/bin/o2_dpg_workflow_runner.py -f workflow.json
46+
6247
exit 0

0 commit comments

Comments
 (0)