Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions MC/config/common/pythia8/utils/mkpy8cfg.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

import argparse

parser = argparse.ArgumentParser(description='Make Pythia8 cofiguration',
parser = argparse.ArgumentParser(description='Make Pythia8 configuration',
formatter_class=argparse.ArgumentDefaultsHelpFormatter)

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

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

parser.add_argument('--ptHatMin', type=float,
Expand Down Expand Up @@ -84,6 +84,10 @@
fout.write('HardQCD:hardccbar = on \n')
if args.process == 'bbbar' or args.process == 'heavy':
fout.write('HardQCD:hardbbbar = on \n')
if args.process == 'jets':
fout.write('HardQCD:all = on \n')
if args.process == 'dirgamma':
fout.write('PromptPhoton:all = on \n')
fout.write('\n')

### phase space cuts
Expand Down
39 changes: 39 additions & 0 deletions MC/run/PWGGAJE/run_dirgamma.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
#!/usr/bin/env bash

# Generate gamma-jet events, Pythia8 in a given pt hard bin.
# run_dirgamma.sh n_pthatbin

set -x

SIGEVENTS=10
NWORKERS=2
MODULES=
RNDSEED=0 # [default = 0] time-based random seed

# generate Pythia8 gamma-jet configuration

# Define the pt hat bin arrays
pthatbin_loweredges=(5 11 21 36 57 84)
pthatbin_higheredges=(11 21 36 57 84 -1)

# Define environmental vars for pt binning
PTHATBIN=$1 #set it here or externally? Add protection out of array?

PTHATMIN=${pthatbin_loweredges[$PTHATBIN]}
PTHATMAX=${pthatbin_higheredges[$PTHATBIN]}

${O2DPG_ROOT}/MC/config/common/pythia8/utils/mkpy8cfg.py \
--output=pythia8_dirgamma.cfg \
--seed=${RNDSEED} \
--idA=2212 \
--idB=2212 \
--eCM=13000. \
--process=dirgamma \
--ptHatMin=${PTHATMIN} \
--ptHatMax=${PTHATMAX}

# embed signal into background

o2-sim -j ${NWORKERS} -n ${SIGEVENTS} -g pythia8 -m ${MODULES} \
--configKeyValues "GeneratorPythia8.config=pythia8_dirgamma.cfg" \
> log 2>&1
48 changes: 48 additions & 0 deletions MC/run/PWGGAJE/run_dirgamma_embedding.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
#!/usr/bin/env bash

# Embed gamma-jet events in a pre-defined pT hard bin into HI events, both Pythia8
# run_dirgamma_embedding.sh n_pthatbin

set -x

MODULES="PIPE ITS TPC EMCAL"
BKGEVENTS=5
SIGEVENTS=20
NWORKERS=8

# generate background

o2-sim -j ${NWORKERS} -n ${BKGEVENTS} -g pythia8hi -m ${MODULES} -o bkg \
--configFile ${O2DPG_ROOT}/MC/config/common/ini/basic.ini \
> logbkg 2>&1

# generate Pythia8 configuration

RNDSEED=0 # [default = 0] time-based random seed

# Define the pt hat bin arrays
pthatbin_loweredges=(5 11 21 36 57 84)
pthatbin_higheredges=(11 21 36 57 84 -1)

# Define environmental vars for pt binning
PTHATBIN=$1 #set it here or externally? Add protection out of array?

PTHATMIN=${pthatbin_loweredges[$PTHATBIN]}
PTHATMAX=${pthatbin_higheredges[$PTHATBIN]}

${O2DPG_ROOT}/MC/config/common/pythia8/utils/mkpy8cfg.py \
--output=pythia8_dirgamma.cfg \
--seed=${RNDSEED} \
--idA=2212 \
--idB=2212 \
--eCM=13000. \
--process=dirgamma \
--ptHatMin=${PTHATMIN} \
--ptHatMax=${PTHATMAX}

# embed signal into background

o2-sim -j ${NWORKERS} -n ${SIGEVENTS} -g pythia8 -m ${MODULES} -o sgn \
--configKeyValues "GeneratorPythia8.config=pythia8_dirgamma.cfg" \
--embedIntoFile bkg_Kine.root \
> logsgn 2>&1
39 changes: 39 additions & 0 deletions MC/run/PWGGAJE/run_jets.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
#!/usr/bin/env bash

# Generate jet-jet events, Pythia8 in a pre-defined pt hard bin.
# run_jets.sh n_pthatbin

set -x

SIGEVENTS=10
NWORKERS=2
MODULES=
RNDSEED=0 # [default = 0] time-based random seed

# generate Pythia8 jet-jet configuration

# 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)

# Define environmental vars for pt binning
PTHATBIN=$1 #set it here or externally? Add protection out of array?

PTHATMIN=${pthatbin_loweredges[$PTHATBIN]}
PTHATMAX=${pthatbin_higheredges[$PTHATBIN]}

${O2DPG_ROOT}/MC/config/common/pythia8/utils/mkpy8cfg.py \
--output=pythia8_jets.cfg \
--seed=${RNDSEED} \
--idA=2212 \
--idB=2212 \
--eCM=5020. \
--process=jets \
--ptHatMin=${PTHATMIN} \
--ptHatMax=${PTHATMAX}

# embed signal into background

o2-sim -j ${NWORKERS} -n ${SIGEVENTS} -g pythia8 -m ${MODULES} \
--configKeyValues "GeneratorPythia8.config=pythia8_jets.cfg" \
> log 2>&1
48 changes: 48 additions & 0 deletions MC/run/PWGGAJE/run_jets_embedding.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
#!/usr/bin/env bash

# Embed jet-jet events in a pre-defined pT hard bin into HI events, both Pythia8
# run_jets_embedding.sh n_pthatbin

set -x

MODULES="PIPE ITS TPC EMCAL"
BKGEVENTS=5
SIGEVENTS=20
NWORKERS=8

# generate background

o2-sim -j ${NWORKERS} -n ${BKGEVENTS} -g pythia8hi -m ${MODULES} -o bkg \
--configFile ${O2DPG_ROOT}/MC/config/common/ini/basic.ini \
> logbkg 2>&1

# generate Pythia8 configuration

RNDSEED=0 # [default = 0] time-based random seed

# 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)

# Define environmental vars for pt binning
PTHATBIN=$1 #set it here or externally? Add protection out of array?

PTHATMIN=${pthatbin_loweredges[$PTHATBIN]}
PTHATMAX=${pthatbin_higheredges[$PTHATBIN]}

${O2DPG_ROOT}/MC/config/common/pythia8/utils/mkpy8cfg.py \
--output=pythia8_jets.cfg \
--seed=${RNDSEED} \
--idA=2212 \
--idB=2212 \
--eCM=5020. \
--process=jets \
--ptHatMin=${PTHATMIN} \
--ptHatMax=${PTHATMAX}

# embed signal into background

o2-sim -j ${NWORKERS} -n ${SIGEVENTS} -g pythia8 -m ${MODULES} -o sgn \
--configKeyValues "GeneratorPythia8.config=pythia8_jets.cfg" \
--embedIntoFile bkg_Kine.root \
> logsgn 2>&1