6 <input>PhokharaEvtgenData.root</input>
7 <output>PhokharaEvtgenAnalysis.root</output>
8 <contact>Kirill Chilikin (chilikin@lebedev.ru)</contact>
9 <description>Analysis of e+ e- -> J/psi eta_c events.</description>
16 from ROOT
import Belle2
20 """ Analysis module for PhokharaEvtgen. """
24 super(PhokharaEvtgenAnalysisModule, self).
__init__()
26 self.
output_file = ROOT.TFile(
'PhokharaEvtgenAnalysis.root',
'recreate')
28 self.
tree = ROOT.TTree(
'tree',
'')
30 self.
ecms = numpy.zeros(1, dtype=numpy.float32)
32 self.
gamma_e = numpy.zeros(1, dtype=numpy.float32)
34 self.
gamma_px = numpy.zeros(1, dtype=numpy.float32)
36 self.
gamma_py = numpy.zeros(1, dtype=numpy.float32)
38 self.
gamma_pz = numpy.zeros(1, dtype=numpy.float32)
40 self.
jpsi_e = numpy.zeros(1, dtype=numpy.float32)
42 self.
jpsi_px = numpy.zeros(1, dtype=numpy.float32)
44 self.
jpsi_py = numpy.zeros(1, dtype=numpy.float32)
46 self.
jpsi_pz = numpy.zeros(1, dtype=numpy.float32)
48 self.
lepton_e = numpy.zeros(1, dtype=numpy.float32)
50 self.
lepton_px = numpy.zeros(1, dtype=numpy.float32)
52 self.
lepton_py = numpy.zeros(1, dtype=numpy.float32)
54 self.
lepton_pz = numpy.zeros(1, dtype=numpy.float32)
55 self.
tree.Branch(
'ecms', self.
ecms,
'ecms/F')
56 self.
tree.Branch(
'gamma_e', self.
gamma_e,
'gamma_e/F')
57 self.
tree.Branch(
'gamma_px', self.
gamma_px,
'gamma_px/F')
58 self.
tree.Branch(
'gamma_py', self.
gamma_py,
'gamma_py/F')
59 self.
tree.Branch(
'gamma_pz', self.
gamma_pz,
'gamma_pz/F')
60 self.
tree.Branch(
'jpsi_e', self.
jpsi_e,
'jpsi_e/F')
61 self.
tree.Branch(
'jpsi_px', self.
jpsi_px,
'jpsi_px/F')
62 self.
tree.Branch(
'jpsi_py', self.
jpsi_py,
'jpsi_py/F')
63 self.
tree.Branch(
'jpsi_pz', self.
jpsi_pz,
'jpsi_pz/F')
64 self.
tree.Branch(
'lepton_e', self.
lepton_e,
'lepton_e/F')
70 """ Event function. """
72 self.
ecms[0] = mc_initial_particles.getMass()
74 for mc_particle
in mc_particles:
76 if (mc_particle.getPDG() != 10022):
78 p = mc_particle.getMomentum()
79 self.
gamma_e[0] = mc_particle.getEnergy()
83 jpsi = mc_particle.getDaughters()[0]
84 p = jpsi.getMomentum()
85 self.
jpsi_e[0] = jpsi.getEnergy()
89 lepton = jpsi.getDaughters()[0]
90 p = lepton.getMomentum()
91 self.
lepton_e[0] = lepton.getEnergy()
98 """ Termination function. """
105 root_input = register_module(
'RootInput')
106 root_input.param(
'inputFileName',
'PhokharaEvtgenData.root')
115 main.add_module(root_input)
116 main.add_module(phokhara_evtgen)