Skip to content

Commit b67c0cf

Browse files
authored
First implementation of jet-jet and gamma-jet configuration and scripts (#4)
* first implementation of jet-jet and gamma-jet configuration and scripts * set bin externally
1 parent 390aa1a commit b67c0cf

File tree

5 files changed

+180
-2
lines changed

5 files changed

+180
-2
lines changed

MC/config/common/pythia8/utils/mkpy8cfg.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
import argparse
77

8-
parser = argparse.ArgumentParser(description='Make Pythia8 cofiguration',
8+
parser = argparse.ArgumentParser(description='Make Pythia8 configuration',
99
formatter_class=argparse.ArgumentDefaultsHelpFormatter)
1010

1111
parser.add_argument('--seed', type=int, default=None,
@@ -20,7 +20,7 @@
2020
parser.add_argument('--eCM', type=float, default='13000.',
2121
help='Centre-of-mass energy')
2222

23-
parser.add_argument('--process', default='inel', choices=['none', 'inel', 'ccbar', 'bbbar', 'heavy'],
23+
parser.add_argument('--process', default='inel', choices=['none', 'inel', 'ccbar', 'bbbar', 'heavy', 'jets', 'dirgamma'],
2424
help='Process to switch on')
2525

2626
parser.add_argument('--ptHatMin', type=float,
@@ -84,6 +84,10 @@
8484
fout.write('HardQCD:hardccbar = on \n')
8585
if args.process == 'bbbar' or args.process == 'heavy':
8686
fout.write('HardQCD:hardbbbar = on \n')
87+
if args.process == 'jets':
88+
fout.write('HardQCD:all = on \n')
89+
if args.process == 'dirgamma':
90+
fout.write('PromptPhoton:all = on \n')
8791
fout.write('\n')
8892

8993
### phase space cuts

MC/run/PWGGAJE/run_dirgamma.sh

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
#!/usr/bin/env bash
2+
3+
# Generate gamma-jet events, Pythia8 in a given pt hard bin.
4+
# run_dirgamma.sh n_pthatbin
5+
6+
set -x
7+
8+
SIGEVENTS=10
9+
NWORKERS=2
10+
MODULES=
11+
RNDSEED=0 # [default = 0] time-based random seed
12+
13+
# generate Pythia8 gamma-jet configuration
14+
15+
# Define the pt hat bin arrays
16+
pthatbin_loweredges=(5 11 21 36 57 84)
17+
pthatbin_higheredges=(11 21 36 57 84 -1)
18+
19+
# Define environmental vars for pt binning
20+
PTHATBIN=$1 #set it here or externally? Add protection out of array?
21+
22+
PTHATMIN=${pthatbin_loweredges[$PTHATBIN]}
23+
PTHATMAX=${pthatbin_higheredges[$PTHATBIN]}
24+
25+
${O2DPG_ROOT}/MC/config/common/pythia8/utils/mkpy8cfg.py \
26+
--output=pythia8_dirgamma.cfg \
27+
--seed=${RNDSEED} \
28+
--idA=2212 \
29+
--idB=2212 \
30+
--eCM=13000. \
31+
--process=dirgamma \
32+
--ptHatMin=${PTHATMIN} \
33+
--ptHatMax=${PTHATMAX}
34+
35+
# embed signal into background
36+
37+
o2-sim -j ${NWORKERS} -n ${SIGEVENTS} -g pythia8 -m ${MODULES} \
38+
--configKeyValues "GeneratorPythia8.config=pythia8_dirgamma.cfg" \
39+
> log 2>&1
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
#!/usr/bin/env bash
2+
3+
# Embed gamma-jet events in a pre-defined pT hard bin into HI events, both Pythia8
4+
# run_dirgamma_embedding.sh n_pthatbin
5+
6+
set -x
7+
8+
MODULES="PIPE ITS TPC EMCAL"
9+
BKGEVENTS=5
10+
SIGEVENTS=20
11+
NWORKERS=8
12+
13+
# generate background
14+
15+
o2-sim -j ${NWORKERS} -n ${BKGEVENTS} -g pythia8hi -m ${MODULES} -o bkg \
16+
--configFile ${O2DPG_ROOT}/MC/config/common/ini/basic.ini \
17+
> logbkg 2>&1
18+
19+
# generate Pythia8 configuration
20+
21+
RNDSEED=0 # [default = 0] time-based random seed
22+
23+
# Define the pt hat bin arrays
24+
pthatbin_loweredges=(5 11 21 36 57 84)
25+
pthatbin_higheredges=(11 21 36 57 84 -1)
26+
27+
# Define environmental vars for pt binning
28+
PTHATBIN=$1 #set it here or externally? Add protection out of array?
29+
30+
PTHATMIN=${pthatbin_loweredges[$PTHATBIN]}
31+
PTHATMAX=${pthatbin_higheredges[$PTHATBIN]}
32+
33+
${O2DPG_ROOT}/MC/config/common/pythia8/utils/mkpy8cfg.py \
34+
--output=pythia8_dirgamma.cfg \
35+
--seed=${RNDSEED} \
36+
--idA=2212 \
37+
--idB=2212 \
38+
--eCM=13000. \
39+
--process=dirgamma \
40+
--ptHatMin=${PTHATMIN} \
41+
--ptHatMax=${PTHATMAX}
42+
43+
# embed signal into background
44+
45+
o2-sim -j ${NWORKERS} -n ${SIGEVENTS} -g pythia8 -m ${MODULES} -o sgn \
46+
--configKeyValues "GeneratorPythia8.config=pythia8_dirgamma.cfg" \
47+
--embedIntoFile bkg_Kine.root \
48+
> logsgn 2>&1

MC/run/PWGGAJE/run_jets.sh

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
#!/usr/bin/env bash
2+
3+
# Generate jet-jet events, Pythia8 in a pre-defined pt hard bin.
4+
# run_jets.sh n_pthatbin
5+
6+
set -x
7+
8+
SIGEVENTS=10
9+
NWORKERS=2
10+
MODULES=
11+
RNDSEED=0 # [default = 0] time-based random seed
12+
13+
# generate Pythia8 jet-jet configuration
14+
15+
# Define the pt hat bin arrays
16+
pthatbin_loweredges=(0 5 7 9 12 16 21 28 36 45 57 70 85 99 115 132 150 169 190 212 235)
17+
pthatbin_higheredges=( 5 7 9 12 16 21 28 36 45 57 70 85 99 115 132 150 169 190 212 235 -1)
18+
19+
# Define environmental vars for pt binning
20+
PTHATBIN=$1 #set it here or externally? Add protection out of array?
21+
22+
PTHATMIN=${pthatbin_loweredges[$PTHATBIN]}
23+
PTHATMAX=${pthatbin_higheredges[$PTHATBIN]}
24+
25+
${O2DPG_ROOT}/MC/config/common/pythia8/utils/mkpy8cfg.py \
26+
--output=pythia8_jets.cfg \
27+
--seed=${RNDSEED} \
28+
--idA=2212 \
29+
--idB=2212 \
30+
--eCM=5020. \
31+
--process=jets \
32+
--ptHatMin=${PTHATMIN} \
33+
--ptHatMax=${PTHATMAX}
34+
35+
# embed signal into background
36+
37+
o2-sim -j ${NWORKERS} -n ${SIGEVENTS} -g pythia8 -m ${MODULES} \
38+
--configKeyValues "GeneratorPythia8.config=pythia8_jets.cfg" \
39+
> log 2>&1
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
#!/usr/bin/env bash
2+
3+
# Embed jet-jet events in a pre-defined pT hard bin into HI events, both Pythia8
4+
# run_jets_embedding.sh n_pthatbin
5+
6+
set -x
7+
8+
MODULES="PIPE ITS TPC EMCAL"
9+
BKGEVENTS=5
10+
SIGEVENTS=20
11+
NWORKERS=8
12+
13+
# generate background
14+
15+
o2-sim -j ${NWORKERS} -n ${BKGEVENTS} -g pythia8hi -m ${MODULES} -o bkg \
16+
--configFile ${O2DPG_ROOT}/MC/config/common/ini/basic.ini \
17+
> logbkg 2>&1
18+
19+
# generate Pythia8 configuration
20+
21+
RNDSEED=0 # [default = 0] time-based random seed
22+
23+
# Define the pt hat bin arrays
24+
pthatbin_loweredges=(0 5 7 9 12 16 21 28 36 45 57 70 85 99 115 132 150 169 190 212 235)
25+
pthatbin_higheredges=( 5 7 9 12 16 21 28 36 45 57 70 85 99 115 132 150 169 190 212 235 -1)
26+
27+
# Define environmental vars for pt binning
28+
PTHATBIN=$1 #set it here or externally? Add protection out of array?
29+
30+
PTHATMIN=${pthatbin_loweredges[$PTHATBIN]}
31+
PTHATMAX=${pthatbin_higheredges[$PTHATBIN]}
32+
33+
${O2DPG_ROOT}/MC/config/common/pythia8/utils/mkpy8cfg.py \
34+
--output=pythia8_jets.cfg \
35+
--seed=${RNDSEED} \
36+
--idA=2212 \
37+
--idB=2212 \
38+
--eCM=5020. \
39+
--process=jets \
40+
--ptHatMin=${PTHATMIN} \
41+
--ptHatMax=${PTHATMAX}
42+
43+
# embed signal into background
44+
45+
o2-sim -j ${NWORKERS} -n ${SIGEVENTS} -g pythia8 -m ${MODULES} -o sgn \
46+
--configKeyValues "GeneratorPythia8.config=pythia8_jets.cfg" \
47+
--embedIntoFile bkg_Kine.root \
48+
> logsgn 2>&1

0 commit comments

Comments
 (0)