Belle II Software development
baseline.py
1#!/usr/bin/env python3
2
3
10
11import basf2_mva
12
13if __name__ == "__main__":
14 variables = ['p', 'pt', 'pz', 'phi',
15 'daughter(0, p)', 'daughter(0, pz)', 'daughter(0, pt)', 'daughter(0, phi)',
16 'daughter(1, p)', 'daughter(1, pz)', 'daughter(1, pt)', 'daughter(1, phi)',
17 'daughter(2, p)', 'daughter(2, pz)', 'daughter(2, pt)', 'daughter(2, phi)',
18 'chiProb', 'dr', 'dz', 'dphi',
19 'daughter(0, dr)', 'daughter(1, dr)', 'daughter(0, dz)', 'daughter(1, dz)',
20 'daughter(0, dphi)', 'daughter(1, dphi)',
21 'daughter(0, chiProb)', 'daughter(1, chiProb)', 'daughter(2, chiProb)', 'daughter(2, M)',
22 'daughter(0, atcPIDBelle(3,2))', 'daughter(1, atcPIDBelle(3,2))',
23 'daughterAngle(0, 1)', 'daughterAngle(0, 2)', 'daughterAngle(1, 2)',
24 'daughter(2, daughter(0, E))', 'daughter(2, daughter(1, E))',
25 'daughter(2, daughter(0, clusterLAT))', 'daughter(2, daughter(1, clusterLAT))',
26 'daughter(2, daughter(0, clusterHighestE))', 'daughter(2, daughter(1, clusterHighestE))',
27 'daughter(2, daughter(0, clusterNHits))', 'daughter(2, daughter(1, clusterNHits))',
28 'daughter(2, daughter(0, clusterE9E25))', 'daughter(2, daughter(1, clusterE9E25))',
29 'daughter(2, daughter(0, minC2TDist))', 'daughter(2, daughter(1, minC2TDist))',
30 'daughterInvM(1, 2)', 'daughterInvM(0, 1)', 'daughterInvM(0, 2)'
31 ]
32
33 general_options = basf2_mva.GeneralOptions()
34 general_options.m_datafiles = basf2_mva.vector("train_mc.root")
35 general_options.m_identifier = "MVABaseline"
36 general_options.m_treename = "tree"
37 general_options.m_variables = basf2_mva.vector(*variables)
38 general_options.m_target_variable = "isSignal"
39
40 fastbdt_options = basf2_mva.FastBDTOptions()
41 basf2_mva.teacher(general_options, fastbdt_options)