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