8 from modularAnalysis
import inputMdst
9 from modularAnalysis
import fillParticleList
10 from modularAnalysis
import variablesToNtuple
16 my_path = basf2.create_path()
19 inputMdst(
'default', basf2.find_file(
'JPsi2ee_e2egamma.root',
'examples',
False), path=my_path)
22 fillParticleList(
'e+',
'nTracks>=2 and abs(d0)<2 and abs(z0)<4 and clusterE>2', path=my_path)
25 var_e = [
'M',
'px',
'py',
'pz',
'E']
26 add_collection(var_e,
'var_e')
28 add_collection(var_evt,
'var_evt')
32 add_collection(mc_gen_topo(),
'mc_gen_topo')
33 add_collection(mc_gen_topo(120),
'mc_gen_topo_120')
38 variablesToNtuple(
'e+', var_e,
'var_e_1',
'MCGenTopoVariables.root', path=my_path)
40 variablesToNtuple(
'e+', [
'var_e'],
'var_e_2',
'MCGenTopoVariables.root', path=my_path)
42 variablesToNtuple(
'e+', mc_gen_topo(),
'mc_gen_topo_e_1',
'MCGenTopoVariables.root', path=my_path)
44 variablesToNtuple(
'e+', [
'mc_gen_topo'],
'mc_gen_topo_e_2',
'MCGenTopoVariables.root', path=my_path)
46 variablesToNtuple(
'e+', mc_gen_topo(120),
'mc_gen_topo_e_120_1',
'MCGenTopoVariables.root', path=my_path)
48 variablesToNtuple(
'e+', [
'mc_gen_topo_120'],
'mc_gen_topo_e_120_2',
'MCGenTopoVariables.root', path=my_path)
50 variablesToNtuple(
'e+', var_e + mc_gen_topo(),
'e_1',
'MCGenTopoVariables.root', path=my_path)
52 variablesToNtuple(
'e+', [
'var_e',
'mc_gen_topo'],
'e_2',
'MCGenTopoVariables.root', path=my_path)
54 variablesToNtuple(
'e+', var_e + mc_gen_topo(120),
'e_120_1',
'MCGenTopoVariables.root', path=my_path)
56 variablesToNtuple(
'e+', [
'var_e',
'mc_gen_topo_120'],
'e_120_2',
'MCGenTopoVariables.root', path=my_path)
59 variablesToNtuple(
'', var_evt,
'var_evt_1',
'MCGenTopoVariables.root', path=my_path)
61 variablesToNtuple(
'', [
'var_evt'],
'var_evt_2',
'MCGenTopoVariables.root', path=my_path)
63 variablesToNtuple(
'', mc_gen_topo(),
'mc_gen_topo_evt_1',
'MCGenTopoVariables.root', path=my_path)
65 variablesToNtuple(
'', [
'mc_gen_topo'],
'mc_gen_topo_evt_2',
'MCGenTopoVariables.root', path=my_path)
67 variablesToNtuple(
'', mc_gen_topo(120),
'mc_gen_topo_evt_120_1',
'MCGenTopoVariables.root', path=my_path)
69 variablesToNtuple(
'', [
'mc_gen_topo_120'],
'mc_gen_topo_evt_120_2',
'MCGenTopoVariables.root', path=my_path)
71 variablesToNtuple(
'', var_evt + mc_gen_topo(),
'evt_1',
'MCGenTopoVariables.root', path=my_path)
73 variablesToNtuple(
'', [
'var_evt',
'mc_gen_topo'],
'evt_2',
'MCGenTopoVariables.root', path=my_path)
75 variablesToNtuple(
'', var_evt + mc_gen_topo(120),
'evt_120_1',
'MCGenTopoVariables.root', path=my_path)
77 variablesToNtuple(
'', [
'var_evt',
'mc_gen_topo_120'],
'evt_120_2',
'MCGenTopoVariables.root', path=my_path)
83 print(basf2.statistics)