8 from modularAnalysis
import *
11 if __name__ ==
"__main__":
12 variables = [
'p',
'pt',
'pz',
'phi',
13 'chiProb',
'dr',
'dz',
'dphi',
14 'daughter(0, dr)',
'daughter(1, dr)',
'daughter(0, dz)',
'daughter(1, dz)',
15 'daughter(0, dphi)',
'daughter(1, dphi)',
16 'daughter(0, chiProb)',
'daughter(1, chiProb)',
'daughter(2, chiProb)',
'daughter(2, M)',
17 'daughter(0, atcPIDBelle(3,2))',
'daughter(1, atcPIDBelle(3,2))',
18 'daughter(2, daughter(0, E))',
'daughter(2, daughter(1, E))',
19 'daughter(2, daughter(0, clusterLAT))',
'daughter(2, daughter(1, clusterLAT))',
20 'daughter(2, daughter(0, clusterHighestE))',
'daughter(2, daughter(1, clusterHighestE))',
21 'daughter(2, daughter(0, clusterNHits))',
'daughter(2, daughter(1, clusterNHits))',
22 'daughter(2, daughter(0, clusterE9E25))',
'daughter(2, daughter(1, clusterE9E25))',
23 'daughter(2, daughter(0, minC2HDist))',
'daughter(2, daughter(1, minC2HDist))',
34 general_options = basf2_mva.GeneralOptions()
35 general_options.m_datafiles = basf2_mva.vector(
"train_mc.root")
36 general_options.m_identifier =
"MVAFull"
37 general_options.m_treename =
"tree"
38 general_options.m_variables = basf2_mva.vector(*variables)
39 general_options.m_target_variable =
"isSignal"
41 fastbdt_options = basf2_mva.FastBDTOptions()
45 fastbdt_options.m_randRatio = 1.0
46 basf2_mva.teacher(general_options, fastbdt_options)
48 general_options.m_identifier =
"MVAOrdinary"
49 general_options.m_variables = basf2_mva.vector(*variables[:-1])
50 basf2_mva.teacher(general_options, fastbdt_options)
52 meta_options = basf2_mva.MetaOptions()
53 meta_options.m_use_splot =
True
54 meta_options.m_splot_variable =
"M"
59 general_options.m_datafiles = basf2_mva.vector(
"train_data.root")
60 meta_options.m_splot_mc_files = basf2_mva.vector(
"train_mc.root")
63 general_options.m_identifier =
"MVASPlot"
64 meta_options.m_splot_combined =
False
65 meta_options.m_splot_boosted =
False
66 basf2_mva.teacher(general_options, fastbdt_options, meta_options)
69 general_options.m_identifier =
"MVASPlotCombined"
70 meta_options.m_splot_combined =
True
71 meta_options.m_splot_boosted =
False
72 basf2_mva.teacher(general_options, fastbdt_options, meta_options)
75 general_options.m_identifier =
"MVASPlotBoosted"
76 meta_options.m_splot_combined =
False
77 meta_options.m_splot_boosted =
True
78 basf2_mva.teacher(general_options, fastbdt_options, meta_options)
81 general_options.m_identifier =
"MVASPlotCombinedBoosted"
82 meta_options.m_splot_combined =
True
83 meta_options.m_splot_boosted =
True
84 basf2_mva.teacher(general_options, fastbdt_options, meta_options)
87 pdf_options = basf2_mva.PDFOptions()
88 general_options.m_method =
'PDF'
89 general_options.m_identifier =
"MVAPdf"
90 general_options.m_variables = basf2_mva.vector(
'M')
91 basf2_mva.teacher(general_options, pdf_options)