15 from modularAnalysis
import inputMdst
16 from modularAnalysis
import fillParticleList
17 from modularAnalysis
import variablesToNtuple
23 my_path = basf2.create_path()
26 inputMdst(basf2.find_file(
'JPsi2ee_e2egamma.root',
'examples',
False), path=my_path)
29 fillParticleList(
'e+',
'nTracks>=2 and abs(d0)<2 and abs(z0)<4 and clusterE>2', path=my_path)
32 var_e = [
'M',
'px',
'py',
'pz',
'E']
33 add_collection(var_e,
'var_e')
35 add_collection(var_evt,
'var_evt')
39 add_collection(mc_gen_topo(),
'mc_gen_topo')
40 add_collection(mc_gen_topo(120),
'mc_gen_topo_120')
45 variablesToNtuple(
'e+', var_e,
'var_e_1',
'MCGenTopoVariables.root', path=my_path)
47 variablesToNtuple(
'e+', [
'var_e'],
'var_e_2',
'MCGenTopoVariables.root', path=my_path)
49 variablesToNtuple(
'e+', mc_gen_topo(),
'mc_gen_topo_e_1',
'MCGenTopoVariables.root', path=my_path)
51 variablesToNtuple(
'e+', [
'mc_gen_topo'],
'mc_gen_topo_e_2',
'MCGenTopoVariables.root', path=my_path)
53 variablesToNtuple(
'e+', mc_gen_topo(120),
'mc_gen_topo_e_120_1',
'MCGenTopoVariables.root', path=my_path)
55 variablesToNtuple(
'e+', [
'mc_gen_topo_120'],
'mc_gen_topo_e_120_2',
'MCGenTopoVariables.root', path=my_path)
57 variablesToNtuple(
'e+', var_e + mc_gen_topo(),
'e_1',
'MCGenTopoVariables.root', path=my_path)
59 variablesToNtuple(
'e+', [
'var_e',
'mc_gen_topo'],
'e_2',
'MCGenTopoVariables.root', path=my_path)
61 variablesToNtuple(
'e+', var_e + mc_gen_topo(120),
'e_120_1',
'MCGenTopoVariables.root', path=my_path)
63 variablesToNtuple(
'e+', [
'var_e',
'mc_gen_topo_120'],
'e_120_2',
'MCGenTopoVariables.root', path=my_path)
66 variablesToNtuple(
'', var_evt,
'var_evt_1',
'MCGenTopoVariables.root', path=my_path)
68 variablesToNtuple(
'', [
'var_evt'],
'var_evt_2',
'MCGenTopoVariables.root', path=my_path)
70 variablesToNtuple(
'', mc_gen_topo(),
'mc_gen_topo_evt_1',
'MCGenTopoVariables.root', path=my_path)
72 variablesToNtuple(
'', [
'mc_gen_topo'],
'mc_gen_topo_evt_2',
'MCGenTopoVariables.root', path=my_path)
74 variablesToNtuple(
'', mc_gen_topo(120),
'mc_gen_topo_evt_120_1',
'MCGenTopoVariables.root', path=my_path)
76 variablesToNtuple(
'', [
'mc_gen_topo_120'],
'mc_gen_topo_evt_120_2',
'MCGenTopoVariables.root', path=my_path)
78 variablesToNtuple(
'', var_evt + mc_gen_topo(),
'evt_1',
'MCGenTopoVariables.root', path=my_path)
80 variablesToNtuple(
'', [
'var_evt',
'mc_gen_topo'],
'evt_2',
'MCGenTopoVariables.root', path=my_path)
82 variablesToNtuple(
'', var_evt + mc_gen_topo(120),
'evt_120_1',
'MCGenTopoVariables.root', path=my_path)
84 variablesToNtuple(
'', [
'var_evt',
'mc_gen_topo_120'],
'evt_120_2',
'MCGenTopoVariables.root', path=my_path)
87 basf2.process(my_path)
90 print(basf2.statistics)