31if __name__ ==
"__main__":
32 variables = [
'p',
'pt',
'pz',
'phi',
33 'chiProb',
'dr',
'dz',
'dphi',
34 'daughter(0, dr)',
'daughter(1, dr)',
'daughter(0, dz)',
'daughter(1, dz)',
35 'daughter(0, dphi)',
'daughter(1, dphi)',
36 'daughter(0, chiProb)',
'daughter(1, chiProb)',
'daughter(2, chiProb)',
'daughter(2, M)',
37 'daughter(0, atcPIDBelle(3,2))',
'daughter(1, atcPIDBelle(3,2))',
38 'daughter(2, daughter(0, E))',
'daughter(2, daughter(1, E))',
39 'daughter(2, daughter(0, clusterLAT))',
'daughter(2, daughter(1, clusterLAT))',
40 'daughter(2, daughter(0, clusterHighestE))',
'daughter(2, daughter(1, clusterHighestE))',
41 'daughter(2, daughter(0, clusterNHits))',
'daughter(2, daughter(1, clusterNHits))',
42 'daughter(2, daughter(0, clusterE9E25))',
'daughter(2, daughter(1, clusterE9E25))',
43 'daughter(2, daughter(0, minC2TDist))',
'daughter(2, daughter(1, minC2TDist))',
44 'daughterInvM(1, 2)',
'daughterInvM(0, 1)',
'daughterInvM(0, 2)'
45 'daughterAngle(0, 1)',
'daughterAngle(0, 2)',
'daughterAngle(1, 2)',
46 'daughter(0, p)',
'daughter(0, pz)',
'daughter(0, pt)',
'daughter(0, phi)',
47 'daughter(1, p)',
'daughter(1, pz)',
'daughter(1, pt)',
'daughter(1, phi)',
48 'daughter(2, p)',
'daughter(2, pz)',
'daughter(2, pt)',
'daughter(2, phi)',
51 general_options = basf2_mva.GeneralOptions()
52 general_options.m_datafiles = basf2_mva.vector(
"train_mc.root")
53 general_options.m_identifier =
"MVAReweighted"
54 general_options.m_treename =
"tree"
55 general_options.m_variables = basf2_mva.vector(*variables)
56 general_options.m_target_variable =
"isSignal"
58 fastbdt_options = basf2_mva.FastBDTOptions()
60 meta_options = basf2_mva.MetaOptions()
61 meta_options.m_use_reweighting =
True
62 meta_options.m_reweighting_variable =
'isContinuumEvent'
63 meta_options.m_reweighting_identifier =
"Reweighter"
64 meta_options.m_reweighting_mc_files = basf2_mva.vector(
"train_mc_continuum.root")
65 meta_options.m_reweighting_data_files = basf2_mva.vector(
"train_data_continuum.root")
67 basf2_mva.teacher(general_options, fastbdt_options, meta_options)