13if __name__ ==
"__main__":
14 variables = [
'p',
'pt',
'pz',
'phi',
15 'chiProb',
'dr',
'dz',
'dphi',
16 'daughter(0, dr)',
'daughter(1, dr)',
'daughter(0, dz)',
'daughter(1, dz)',
17 'daughter(0, dphi)',
'daughter(1, dphi)',
18 'daughter(0, chiProb)',
'daughter(1, chiProb)',
'daughter(2, chiProb)',
'daughter(2, M)',
19 'daughter(0, atcPIDBelle(3,2))',
'daughter(1, atcPIDBelle(3,2))',
20 'daughter(2, daughter(0, E))',
'daughter(2, daughter(1, E))',
21 'daughter(2, daughter(0, clusterLAT))',
'daughter(2, daughter(1, clusterLAT))',
22 'daughter(2, daughter(0, clusterHighestE))',
'daughter(2, daughter(1, clusterHighestE))',
23 'daughter(2, daughter(0, clusterNHits))',
'daughter(2, daughter(1, clusterNHits))',
24 'daughter(2, daughter(0, clusterE9E25))',
'daughter(2, daughter(1, clusterE9E25))',
25 'daughter(2, daughter(0, minC2TDist))',
'daughter(2, daughter(1, minC2TDist))',
36 general_options = basf2_mva.GeneralOptions()
37 general_options.m_datafiles = basf2_mva.vector(
"train_mc.root")
38 general_options.m_identifier =
"MVAFull"
39 general_options.m_treename =
"tree"
40 general_options.m_variables = basf2_mva.vector(*variables)
41 general_options.m_target_variable =
"isSignal"
43 fastbdt_options = basf2_mva.FastBDTOptions()
47 fastbdt_options.m_randRatio = 1.0
48 basf2_mva.teacher(general_options, fastbdt_options)
50 general_options.m_identifier =
"MVAOrdinary"
51 general_options.m_variables = basf2_mva.vector(*variables[:-1])
52 basf2_mva.teacher(general_options, fastbdt_options)
54 meta_options = basf2_mva.MetaOptions()
55 meta_options.m_use_splot =
True
56 meta_options.m_splot_variable =
"M"
61 general_options.m_datafiles = basf2_mva.vector(
"train_data.root")
62 meta_options.m_splot_mc_files = basf2_mva.vector(
"train_mc.root")
65 general_options.m_identifier =
"MVASPlot"
66 meta_options.m_splot_combined =
False
67 meta_options.m_splot_boosted =
False
68 basf2_mva.teacher(general_options, fastbdt_options, meta_options)
71 general_options.m_identifier =
"MVASPlotCombined"
72 meta_options.m_splot_combined =
True
73 meta_options.m_splot_boosted =
False
74 basf2_mva.teacher(general_options, fastbdt_options, meta_options)
77 general_options.m_identifier =
"MVASPlotBoosted"
78 meta_options.m_splot_combined =
False
79 meta_options.m_splot_boosted =
True
80 basf2_mva.teacher(general_options, fastbdt_options, meta_options)
83 general_options.m_identifier =
"MVASPlotCombinedBoosted"
84 meta_options.m_splot_combined =
True
85 meta_options.m_splot_boosted =
True
86 basf2_mva.teacher(general_options, fastbdt_options, meta_options)
89 pdf_options = basf2_mva.PDFOptions()
90 general_options.m_method =
'PDF'
91 general_options.m_identifier =
"MVAPdf"
92 general_options.m_variables = basf2_mva.vector(
'M')
93 basf2_mva.teacher(general_options, pdf_options)