Skip to content

Commit eada5c2

Browse files
committed
remove setting of particle trigger pt min,max and acceptance since passing via env variables seems not possible and those can be set in the configuration files to be passed via -ini, add comment on the pT hard bin part that could be removed
1 parent 45dbf17 commit eada5c2

File tree

1 file changed

+13
-17
lines changed

1 file changed

+13
-17
lines changed

MC/bin/o2dpg_sim_workflow.py

Lines changed: 13 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@
77
# ${O2DPG_ROOT}/MC/bin/o2_dpg_workflow_runner.py -f workflow.json
88
#
99
# Execution examples:
10-
# - pp PYTHIA jets, 2 events, triggered on high pT decay photons on EMCal acceptance, eCMS 13 TeV
10+
# - pp PYTHIA jets, 2 events, triggered on high pT decay photons on all barrel calorimeters acceptance, eCMS 13 TeV
1111
# ./o2dpg_sim_workflow.py -e TGeant3 -ns 2 -j 8 -tf 1 -mod "--skipModules ZDC" -col pp -eCM 13000 \
12-
# -proc "jets" -ptTrigMin 3.5 -acceptance 4 -ptHatBin 3 \
13-
# -trigger "external" -ini "\$O2DPG_ROOT/MC/config/PWGGAJE/ini/trigger_decay_gamma.ini"
12+
# -proc "jets" -ptHatBin 3 \
13+
# -trigger "external" -ini "\$O2DPG_ROOT/MC/config/PWGGAJE/ini/trigger_decay_gamma_allcalo_TrigPt3_5.ini"
1414
#
1515
# - pp PYTHIA ccbar events embedded into heavy-ion environment, 2 PYTHIA events into 1 bkg event, beams energy 2.510
1616
# ./o2dpg_sim_workflow.py -e TGeant3 -nb 1 -ns 2 -j 8 -tf 1 -mod "--skipModules ZDC" \
@@ -41,10 +41,6 @@
4141
parser.add_argument('-ptHatMax',help='pT hard maximum when no bin requested', default=-1)
4242
parser.add_argument('-weightPow',help='Flatten pT hard spectrum with power', default=-1)
4343

44-
parser.add_argument('-ptTrigMin',help='generated pT trigger minimum', default=0)
45-
parser.add_argument('-ptTrigMax',help='generated pT trigger maximum', default=-1)
46-
parser.add_argument('-acceptance',help='select particles within predefined acceptance in ${O2DPG_ROOT}/MC/run/common/detector_acceptance.C', default=0)
47-
4844
parser.add_argument('--embedding',action='store_true', help='With embedding into background')
4945
parser.add_argument('-nb',help='number of background events / timeframe', default=20)
5046
parser.add_argument('-genBkg',help='embedding background generator', default='pythia8hi')
@@ -193,19 +189,19 @@ def getDPL_global_options(bigshm=False,nosmallrate=False):
193189
TRIGGER=''
194190
if args.trigger != '':
195191
TRIGGER=' -t ' + args.trigger
196-
197-
PTTRIGMIN=float(args.ptTrigMin)
198-
PTTRIGMAX=float(args.ptTrigMax)
199-
PARTICLE_ACCEPTANCE=int(args.acceptance)
200192

201193
## Pt Hat productions
202194
WEIGHTPOW=int(args.weightPow)
203-
204-
# Recover PTHATMIN and PTHATMAX from pre-defined array depending bin number PTHATBIN
205-
# or just the ones passed
206-
PTHATBIN=int(args.ptHatBin)
207195
PTHATMIN=int(args.ptHatMin)
208196
PTHATMAX=int(args.ptHatMax)
197+
198+
# Recover PTHATMIN and PTHATMAX from pre-defined array depending bin number PTHATBIN
199+
# I think these arrays can be removed and rely on scripts where the arrays are hardcoded
200+
# it depends how this will be handled on grid execution
201+
# like in run/PWGGAJE/run_decaygammajets.sh run/PWGGAJE/run_jets.sh, run/PWGGAJE/run_dirgamma.sh
202+
# Also, if flat pT hard weigthing become standard this will become obsolete. Let's keep it for the moment.
203+
PTHATBIN=int(args.ptHatBin)
204+
209205
# I would move next lines to a external script, not sure how to do it (GCB)
210206
if PTHATBIN > -1:
211207
# gamma-jet
@@ -218,12 +214,12 @@ def getDPL_global_options(bigshm=False,nosmallrate=False):
218214
elif PROCESS == 'jets':
219215
# Biased jet-jet
220216
# Define the pt hat bin arrays and set bin depending threshold
221-
if PTTRIGMIN == 3.5:
217+
if "TrigPt3_5" in INIFILE:
222218
low_edge = arr.array('l', [5, 7, 9, 12, 16, 21])
223219
hig_edge = arr.array('l', [7, 9, 12, 16, 21, -1])
224220
PTHATMIN=low_edge[PTHATBIN]
225221
PTHATMAX=hig_edge[PTHATBIN]
226-
elif PTTRIGMIN == 7:
222+
elif "TrigPt7" in INIFILE:
227223
low_edge = arr.array('l', [ 8, 10, 14, 19, 26, 35, 48, 66])
228224
hig_edge = arr.array('l', [10, 14, 19, 26, 35, 48, 66, -1])
229225
PTHATMIN=low_edge[PTHATBIN]

0 commit comments

Comments
 (0)