11from b2test_utils
import skip_test_if_light
16import modularAnalysis
as ma
17from generators
import add_evtgen_generator
22from ROOT
import Belle2
24if __name__ ==
"__main__":
26 path = b2.create_path()
27 ma.setupEventInfo(100, path)
28 add_evtgen_generator(path,
'signal',
Belle2.FileSystem.findFile(
'analysis/examples/simulations/B2A101-Y4SEventGeneration.dec'))
29 path.add_module(
'MVAPrototype', identifier=
'fake.xml')
31 with tempfile.TemporaryDirectory()
as tempdir:
36 <?xml version="1.0" encoding=
"utf-8"?>
37 <method>Trivial</method>
38 <weightfile>fake.xml</weightfile>
39 <treename>tree</treename>
40 <target_variable>isSignal</target_variable>
41 <weight_variable>__weight__</weight_variable>
42 <signal_class>1</signal_class>
43 <max_events>0</max_events>
44 <number_feature_variables>1</number_feature_variables>
45 <variable0>M</variable0>
46 <number_spectator_variables>0</number_spectator_variables>
47 <number_data_files>1</number_data_files>
48 <datafile0>train.root</datafile0>
49 <Trivial_version>1</Trivial_version>
50 <Trivial_output>0</Trivial_output>
51 <signal_fraction>0.066082567</signal_fraction>
53 with open(
"fake.xml",
"w")
as f:
static std::string findFile(const std::string &path, bool silent=false)
Search for given file or directory in local or central release directory, and return absolute path if...