Skip to content

Commit c8bcdce

Browse files
committed
Make processor run for incl. jets
1 parent 1a763c7 commit c8bcdce

File tree

2 files changed

+57
-50
lines changed

2 files changed

+57
-50
lines changed

machine_learning_hep/data/data_run3/database_ml_parameters_Jet_pp.yml

Lines changed: 50 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -576,55 +576,55 @@ Jet_pp:
576576
[-.1, .0, .05, .1, .15, .2, .25, .3, .35, .4, .45, .5]
577577
label: "#it{R}_{g}"
578578
label_y: "(1/#it{N}_{jet ch}) d#it{N}/d#it{R}_{g}"
579-
zpar:
580-
# bins_gen_fix: [10, 0., 1.]
581-
# bins_det_fix: [10, 0., 1.]
582-
bins_gen_var:
583-
[
584-
0.2,
585-
0.25,
586-
0.3,
587-
0.35,
588-
0.4,
589-
0.45,
590-
0.5,
591-
0.55,
592-
0.6,
593-
0.65,
594-
0.7,
595-
0.75,
596-
0.8,
597-
0.85,
598-
0.9,
599-
0.95,
600-
1.,
601-
]
602-
bins_det_var:
603-
[
604-
0.2,
605-
0.25,
606-
0.3,
607-
0.35,
608-
0.4,
609-
0.45,
610-
0.5,
611-
0.55,
612-
0.6,
613-
0.65,
614-
0.7,
615-
0.75,
616-
0.8,
617-
0.85,
618-
0.9,
619-
0.95,
620-
1.,
621-
]
622-
label: "#it{z}_{#parallel}"
623-
label_y: "(1/#it{N}_{jet ch}) d#it{N}/d#it{z}_{#parallel}"
624-
dr:
625-
bins_gen_fix: [10, 0., 1.]
626-
bins_det_fix: [10, 0., 1.]
627-
label: "#Delta#it{r}"
579+
# zpar:
580+
# # bins_gen_fix: [10, 0., 1.]
581+
# # bins_det_fix: [10, 0., 1.]
582+
# bins_gen_var:
583+
# [
584+
# 0.2,
585+
# 0.25,
586+
# 0.3,
587+
# 0.35,
588+
# 0.4,
589+
# 0.45,
590+
# 0.5,
591+
# 0.55,
592+
# 0.6,
593+
# 0.65,
594+
# 0.7,
595+
# 0.75,
596+
# 0.8,
597+
# 0.85,
598+
# 0.9,
599+
# 0.95,
600+
# 1.,
601+
# ]
602+
# bins_det_var:
603+
# [
604+
# 0.2,
605+
# 0.25,
606+
# 0.3,
607+
# 0.35,
608+
# 0.4,
609+
# 0.45,
610+
# 0.5,
611+
# 0.55,
612+
# 0.6,
613+
# 0.65,
614+
# 0.7,
615+
# 0.75,
616+
# 0.8,
617+
# 0.85,
618+
# 0.9,
619+
# 0.95,
620+
# 1.,
621+
# ]
622+
# label: "#it{z}_{#parallel}"
623+
# label_y: "(1/#it{N}_{jet ch}) d#it{N}/d#it{z}_{#parallel}"
624+
# dr:
625+
# bins_gen_fix: [10, 0., 1.]
626+
# bins_det_fix: [10, 0., 1.]
627+
# label: "#Delta#it{r}"
628628
lntheta:
629629
bins_gen_fix: [10, 0., 5.]
630630
bins_det_fix: [10, 0., 5.]
@@ -963,7 +963,7 @@ Jet_pp:
963963
efficiency:
964964
# extra_cols: ["isd0", "isd0bar", "seld0", "seld0bar"]
965965
# filter_det: "(isd0 & seld0) or (isd0bar & seld0bar)"
966-
index_match: fIndexArrayD0CMCPJETOS_geo
966+
index_match: fIndexArrayCMCPJETOS_geo
967967
correction_method: run3
968968

969969
unfolding_iterations: 8 # used, maximum iteration

machine_learning_hep/processer_jet.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,12 @@ def _verify_variables(self, dfi):
123123
def _calculate_variables(self, df, verify=False): # pylint: disable=invalid-name
124124
self.logger.info('calculating variables')
125125
if len(df) == 0:
126+
df['nsub21'] = None
127+
df['zg'] = None
128+
df['rg'] = None
129+
df['nsd'] = None
130+
df['lnkt'] = None
131+
df['lntheta'] = None
126132
return df
127133
df['nsub21'] = df.fNSub2 / df.fNSub1
128134
self.logger.debug('zg')
@@ -386,6 +392,7 @@ def process_efficiency_single(self, index):
386392
if f := self.cfg('closure.exclude_feeddown_gen'):
387393
self.logger.debug('excluding feeddown gen')
388394
dfquery(df_mcana, f, inplace=True)
395+
self.logger.info("Filling histo from %s", df_mcana)
389396
fill_hist(h_mctruth[(cat, var)], df_mcana[['fJetPt_gen', 'fPt_gen', f'{var}_gen']])
390397

391398
if cat in dfmatch and dfmatch[cat] is not None:

0 commit comments

Comments
 (0)