Skip to content

Commit 00dd543

Browse files
author
Luigi Dello Stritto
committed
LcJets db
1 parent ddcae99 commit 00dd543

File tree

1 file changed

+50
-59
lines changed

1 file changed

+50
-59
lines changed

machine_learning_hep/data/data_run3/database_ml_parameters_LcJet_pp.yml

Lines changed: 50 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,10 @@ LcJet_pp:
1919
sel_cen_unp: null
2020
sel_good_evt_unp: null # "fIsEventReject == 0"
2121
# sel_reco_skim: ["mlPromptScore > 0.96", "mlPromptScore > 0.97", "mlPromptScore > 0.9", "mlPromptScore > 0.85", "mlPromptScore > 0.8", "mlPromptScore > 0.6", null] # (sel_skim_binmin bins)
22-
sel_reco_skim: [null, null, null, null, null, null, null] # (sel_skim_binmin bins)
23-
sel_gen_skim: [null, null, null, null, null, null, null] # (sel_skim_binmin bins)
24-
sel_skim_binmin: [1, 2, 4, 6, 8, 12, 24] # skimming pt bins (sel_skim_binmin bins)
25-
sel_skim_binmax: [2, 4, 6, 8, 12, 24, 48] # skimming pt bins (sel_skim_binmin bins)
22+
sel_reco_skim: [null, null, null, null, null, null, null, null, null, null, null] # (sel_skim_binmin bins)
23+
sel_gen_skim: [null, null, null, null, null, null, null, null, null, null, null] # (sel_skim_binmin bins)
24+
sel_skim_binmin: [1, 2, 3, 4, 5, 6, 7, 8, 10, 12,] # skimming pt bins (sel_skim_binmin bins)
25+
sel_skim_binmax: [2, 3, 4, 5, 6, 7, 8, 10, 12, 24] # skimming pt bins (sel_skim_binmin bins)
2626
var_binning: fPt
2727
dofullevtmerge: false
2828
var_cand: fCandidateSelFlag
@@ -193,7 +193,8 @@ LcJet_pp:
193193
ismcprompt: { var: fOriginMcRec, req: [[0], []] }
194194
ismcfd: { var: fOriginMcRec, req: [[1], []] }
195195
extract_component:
196-
- { var: fMlScores, newvar: mlPromptScore, component: 1 }
196+
- { var: fMlScores, newvar: mlBkgScore, component: 0 }
197+
#- { var: fMlScores, newvar: mlPromptScore, component: 1 }
197198
filter: "fPt >= 1. and abs(fY) <= 0.8 and abs(fJetEta) < (.9 - (fJetR / 100.))" # TODO: check jet eta cut
198199
# swap: {cand: fCandidateSelFlag, var_swap: fIsCandidateSwapped, vars: [ismcsignal, ismcprompt, icmcfd]}
199200

@@ -257,7 +258,8 @@ LcJet_pp:
257258
fNSub2,
258259
]
259260
extract_component:
260-
- { var: fMlScores, newvar: mlPromptScore, component: 1 }
261+
- { var: fMlScores, newvar: mlBkgScore, component: 0 }
262+
#- { var: fMlScores, newvar: mlPromptScore, component: 1 }
261263
filter: "fPt >= 1. and abs(fY) <= 0.8 and abs(fJetEta) < (.9 - (fJetR / 100.))" # TODO: check jet eta cut
262264

263265
merge:
@@ -480,7 +482,7 @@ LcJet_pp:
480482
chunksizeskim: [100] #list of periods
481483
fracmerge: [1.] #list of periods
482484
seedmerge: [12] #list of periods
483-
period: [LHC22o] #list of periods
485+
period: [LHC23] #list of periods
484486
select_period: [1]
485487
prefix_dir: /data2/MLhep/real/train_318625/
486488
unmerged_tree_dir: [alice] #list of periods
@@ -497,7 +499,7 @@ LcJet_pp:
497499
chunksizeskim: [1000] #list of periods
498500
fracmerge: [1.] #list of periods
499501
seedmerge: [12] #list of periods
500-
period: [LHC24d3b] #list of periods
502+
period: [LHC24h1] #list of periods
501503
select_period: [1]
502504
prefix_dir: /data2/MLhep/sim/train_316964/
503505
unmerged_tree_dir: [alice]
@@ -514,29 +516,27 @@ LcJet_pp:
514516
data: null
515517
mc: null
516518

517-
nbkg: 500000
518-
nsig: 500000
519+
nclasses: [200000, 200000, 200000]
519520
mult_bkg: [1, 1, 1, 1, 1, 1, 1]
520521
nclasses: [20000, 20000]
521-
sampletags: [0, 1]
522+
sampletags: [0, 1, 1]
522523
equalise_sig_bkg: True
523524
# sampletagforsignal: 1
524525
# sampletagforbkg: 0
525-
sel_ml: [fM < 2.22 or fM > 2.35, ismcsignal == 1 and ismcprompt == 1]
526-
sel_bkg: fM < 2.22 or fM > 2.35
527-
class_labels: [bkg, sig]
526+
sel_ml: [fM < 2.22 or fM > 2.35, ismcsignal == 1 and ismcprompt == 1, ismcsignal == 1 and ismcfd == 1]
527+
class_labels: [bkg, prompt, non-prompt]
528528
nkfolds: 5
529529
rnd_shuffle: 12
530530
rnd_splt: 12
531531
rnd_all: 12
532532
test_frac: 0.2
533-
binmin: [1, 2, 4, 6, 8, 12, 24] # must be equal to sel_skim_binmin (sel_skim_binmin bins)
534-
binmax: [2, 4, 6, 8, 12, 24, 36] # must be equal to sel_skim_binmax (sel_skim_binmin bins)
535-
mltype: BinaryClassification
533+
binmin: [1, 2, 3, 4, 5, 6, 7, 8, 10, 12, 24] # must be equal to sel_skim_binmin (sel_skim_binmin bins)
534+
binmax: [2, 3, 4, 5, 6, 7, 8, 10, 12, 24, 36] # must be equal to sel_skim_binmax (sel_skim_binmin bins)
535+
mltype: MultiClassification
536536
ncorescrossval: 10
537537
prefix_dir_ml: "/data2/${USER}/MLhep/"
538-
mlplot: mlplot
539-
mlout: mlout
538+
mlplot: mlplot # to be removed
539+
mlout: mlout # to be removed
540540

541541
opt:
542542
isFONLLfromROOT: true
@@ -552,36 +552,39 @@ LcJet_pp:
552552
num_steps: 111 # number of steps used in efficiency and signif. estimation
553553
bkg_function: pol2 # fit function for bkg (among TH1 predefined fit functions, e.g. expo, pol1, pol2, ...)
554554
save_fit: True # save bkg fits with the various cuts on ML output
555-
raahp: [1, 1, 1, 1, 1, 1, 1] # sel_skim_binmin bins
555+
raahp: [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1] # sel_skim_binmin bins
556556
presel_gen_eff: "fPt > 0. and abs(fY) < 0.8"
557557

558558
mlapplication:
559559
data:
560560
prefix_dir_app: "/data2/${USER}/"
561-
pkl_skimmed_dec: [LHC22pp/MLapplication/prod_LHC22o/skpkldecdata] #list of periods
561+
pkl_skimmed_dec: [LHC23pp/MLapplication/prod_LHC23/skpkldecdata] #list of periods
562562
pkl_skimmed_decmerged: [
563-
LHC22pp/MLapplication/prod_LHC22o/skpkldecdatamerged,
563+
LHC23pp/MLapplication/prod_LHC23/skpkldecdatamerged,
564564
] #list of periods
565565
mc:
566566
prefix_dir_app: "/data2/${USER}/"
567-
pkl_skimmed_dec: [LHC22pp_mc/MLapplication/prod_LHC24d3b/skpkldecmc] #list of periods
567+
pkl_skimmed_dec: [LHC23pp_mc/MLapplication/prod_LHC24h1/skpkldecmc] #list of periods
568568
pkl_skimmed_decmerged: [
569-
LHC22pp_mc/MLapplication/prod_LHC24d3b/skpkldecmcmerged,
569+
LHC23pp_mc/MLapplication/prod_LHC24h1/skpkldecmcmerged,
570570
] #list of periods
571571
modelname: xgboost
572572
modelsperptbin: [
573573
xgboost_classifierLcpKpi_dfselection_fPt_1.0_2.0.sav,
574-
xgboost_classifierLcpKpi_dfselection_fPt_2.0_4.0.sav,
575-
xgboost_classifierLcpKpi_dfselection_fPt_4.0_6.0.sav,
576-
xgboost_classifierLcpKpi_dfselection_fPt_6.0_8.0.sav,
577-
xgboost_classifierLcpKpi_dfselection_fPt_8.0_12.0.sav,
578-
xgboost_classifierLcpKpi_dfselection_fPt_12.0_24.0.sav,
579-
xgboost_classifierLcpKpi_dfselection_fPt_12.0_24.0.sav,
574+
xgboost_classifierLcpKpi_dfselection_fPt_2.0_3.0.sav,
575+
xgboost_classifierLcpKpi_dfselection_fPt_3.0_4.0.sav,
576+
xgboost_classifierLcpKpi_dfselection_fPt_4.0_5.0.sav,
577+
xgboost_classifierLcpKpi_dfselection_fPt_5.0_6.0.sav,
578+
xgboost_classifierLcpKpi_dfselection_fPt_6.0_7.0.sav,
579+
xgboost_classifierLcpKpi_dfselection_fPt_7.0_8.0.sav,
580+
xgboost_classifierLcpKpi_dfselection_fPt_8.0_10.0.sav,
581+
xgboost_classifierLcpKpi_dfselection_fPt_10.0_12.0.sav,
582+
xgboost_classifierLcpKpi_dfselection_fPt_12.0_24.0.sav
580583
] # sel_skim_binmin bins
581584
probcutpresel:
582-
data: [0.70, 0.70, 0.60, 0.60, 0.40, 0.40, 0.] # sel_skim_binmin bins
583-
mc: [0.70, 0.70, 0.60, 0.60, 0.40, 0.40, 0.] # sel_skim_binmin bins
584-
probcutoptimal: [0.96, 0.97, 0.90, 0.85, 0.80, 0.60, 0.] # sel_skim_binmin bins
585+
data: [[0.05, 0.0, 0.0], [0.05, 0.0, 0.0], [0.08, 0.0, 0.0], [0.1, 0.0, 0.0], [0.2, 0.0, 0.0], [0.2, 0.0, 0.0], [0.2, 0.0, 0.0], [0.25, 0.0, 0.0], [0.35, 0.0, 0.0], [0.4, 0.0, 0.0]] #list of nbins
586+
mc: [[0.05, 0.0, 0.0], [0.05, 0.0, 0.0], [0.08, 0.0, 0.0], [0.1, 0.0, 0.0], [0.2, 0.0, 0.0], [0.2, 0.0, 0.0], [0.2, 0.0, 0.0], [0.25, 0.0, 0.0], [0.35, 0.0, 0.0], [0.4, 0.0, 0.0]] #list of nbins
587+
probcutoptimal: [[0.02, 0.0, 0.0], [0.03, 0.0, 0.0], [0.04, 0.0, 0.0], [0.07, 0.0, 0.0], [0.09, 0.0, 0.0], [0.11, 0.0, 0.0], [0.15, 0.0, 0.0], [0.18, 0.0, 0.0], [0.25, 0.0, 0.0], [0.35, 0.0, 0.0]] #list of nbins
585588

586589
#region analysis
587590
analysis:
@@ -595,7 +598,7 @@ LcJet_pp:
595598
jet_obs: &jet_default
596599
sel_an_binmin: [2, 3, 4, 5, 6, 7, 8, 10, 12, 16] # hadron pt bins (sel_an_binmin bins)
597600
sel_an_binmax: [3, 4, 5, 6, 7, 8, 10, 12, 16, 24] # hadron pt bins (sel_an_binmin bins)
598-
bins_ptjet: [5, 7, 15, 30] # systematics, TODO: split rec and gen binning
601+
bins_ptjet: [2, 5, 7, 10, 15, 30] # systematics, TODO: split rec and gen binning
599602
bins_ptjet_eff: [2, 5, 7, 15, 30, 50] # systematics, TODO: split rec and gen binning
600603
cand_collidx: fIndexHfLcCollBases
601604
counter_read_data: fReadCountsWithTVXAndZVertexAndSel8
@@ -718,7 +721,8 @@ LcJet_pp:
718721
n_rebin: 3 # number of mass bins to merge
719722
efficiency:
720723
index_match: fIndexArrayLCCMCPJETOS_hf
721-
extra_cols: ["mlPromptScore"]
724+
#extra_cols: ["mlPromptScore"]
725+
extra_cols: ["mlBkgScore"]
722726
correction_method: run3
723727

724728
unfolding_iterations: 8 # used, maximum iteration
@@ -935,30 +939,17 @@ LcJet_pp:
935939
# Additional cuts applied before mass histogram is filled
936940
use_cuts: True
937941
cuts: [
938-
"mlPromptScore > 0.97 and fCentFT0M >= 70 and fCentFT0M <= 100",
939-
"mlPromptScore > 0.97 and fCentFT0M >= 70 and fCentFT0M <= 100",
940-
"mlPromptScore > 0.9 and fCentFT0M >= 70 and fCentFT0M <= 100",
941-
"mlPromptScore > 0.9 and fCentFT0M >= 70 and fCentFT0M <= 100",
942-
"mlPromptScore > 0.85 and fCentFT0M >= 70 and fCentFT0M <= 100",
943-
"mlPromptScore > 0.85 and fCentFT0M >= 70 and fCentFT0M <= 100",
944-
"mlPromptScore > 0.8 and fCentFT0M >= 70 and fCentFT0M <= 100",
945-
"mlPromptScore > 0.8 and fCentFT0M >= 70 and fCentFT0M <= 100",
946-
"mlPromptScore > 0.6 and fCentFT0M >= 70 and fCentFT0M <= 100",
947-
"mlPromptScore > 0.6 and fCentFT0M >= 70 and fCentFT0M <= 100",
948-
] # (sel_an_binmin bins) systematics FIXME: Update for new model.
949-
950-
#cuts: [
951-
# "mlPromptScore > 0.97",
952-
# "mlPromptScore > 0.97",
953-
# "mlPromptScore > 0.9",
954-
# "mlPromptScore > 0.9",
955-
# "mlPromptScore > 0.85",
956-
# "mlPromptScore > 0.85",
957-
# "mlPromptScore > 0.8",
958-
# "mlPromptScore > 0.8",
959-
# "mlPromptScore > 0.6",
960-
# "mlPromptScore > 0.6",
961-
# ] # (sel_an_binmin bins) systematics FIXME: Update for new model.
942+
"mlBkgScore < 0.03",
943+
"mlBkgScore < 0.04",
944+
"mlBkgScore < 0.07",
945+
"mlBkgScore < 0.09",
946+
"mlBkgScore < 0.11",
947+
"mlBkgScore < 0.15",
948+
"mlBkgScore < 0.18",
949+
"mlBkgScore < 0.25",
950+
"mlBkgScore < 0.35",
951+
"mlBkgScore < 0.35"
952+
] # (sel_an_binmin bins) systematics FIXME: Update for new model.
962953

963954
systematics: # used in machine_learning_hep/analysis/systematics.py
964955
probvariation:

0 commit comments

Comments
 (0)