Belle II Software development
B2A912-TrainKsSelector.py
1#!/usr/bin/env python3
2
3
10
11
18
19import basf2 as b2
20import basf2_mva
21import ksSelector as ksSelector
22
23# Train weight file for V0 Selection.
24# name of output file is specified by the argument 'mva_identifier'.
26 train_data=b2.find_file('KsSelector_train_V0Selector.root', 'examples', False),
27 tree_name="tree",
28 mva_identifier="MVAFastBDT_V0Selector.root",
29 target_variable="isSignal"
30)
31
32# Train weight file for V0 Selection.
33# name of output file is specified by the argument 'mva_identifier'.
35 train_data=b2.find_file('KsSelector_train_LambdaVeto.root', 'examples', False),
36 tree_name="tree",
37 mva_identifier="MVAFastBDT_LambdaVeto.root",
38 target_variable="isSignal"
39)
40
41# apply mva to the training data
42basf2_mva.expert(basf2_mva.vector('MVAFastBDT_V0Selector.root'),
43 basf2_mva.vector(b2.find_file('KsSelector_train_V0Selector.root', 'examples', False)),
44 'tree', 'MVAExpert_V0Selector.root')
45basf2_mva.expert(basf2_mva.vector('MVAFastBDT_LambdaVeto.root'),
46 basf2_mva.vector(b2.find_file('KsSelector_train_LambdaVeto.root', 'examples', False)),
47 'tree', 'MVAExpert_LambdaVeto.root')
def LambdaVeto_Training(train_data, tree_name="tree", mva_identifier="MVAFastBDT_LambdaVeto.root", target_variable="isSignal")
Definition: ksSelector.py:113
def V0Selector_Training(train_data, tree_name="tree", mva_identifier="MVAFastBDT_V0Selector.root", target_variable="isSignal")
Definition: ksSelector.py:73