5 <input>PhokharaEvtgenData.root</input>
6 <output>PhokharaEvtgenAnalysis.root</output>
7 <contact>Kirill Chilikin (K.A.Chilikin@inp.nsk.su)</contact>
8 <description>Analysis of e+ e- -> J/psi eta_c events.</description>
15from ROOT import Belle2
18class PhokharaEvtgenAnalysisModule(b2.Module):
19 """ Analysis module for PhokharaEvtgen. """
25 self.
output_file = ROOT.TFile(
'PhokharaEvtgenAnalysis.root',
'recreate')
27 self.
tree = ROOT.TTree(
'tree',
'')
29 self.
ecms = numpy.zeros(1, dtype=numpy.float32)
31 self.
gamma_e = numpy.zeros(1, dtype=numpy.float32)
33 self.
gamma_px = numpy.zeros(1, dtype=numpy.float32)
35 self.
gamma_py = numpy.zeros(1, dtype=numpy.float32)
37 self.
gamma_pz = numpy.zeros(1, dtype=numpy.float32)
39 self.
jpsi_e = numpy.zeros(1, dtype=numpy.float32)
41 self.
jpsi_px = numpy.zeros(1, dtype=numpy.float32)
43 self.
jpsi_py = numpy.zeros(1, dtype=numpy.float32)
45 self.
jpsi_pz = numpy.zeros(1, dtype=numpy.float32)
47 self.
lepton_e = numpy.zeros(1, dtype=numpy.float32)
49 self.
lepton_px = numpy.zeros(1, dtype=numpy.float32)
51 self.
lepton_py = numpy.zeros(1, dtype=numpy.float32)
53 self.
lepton_pz = numpy.zeros(1, dtype=numpy.float32)
54 self.
tree.Branch(
'ecms', self.
ecms,
'ecms/F')
55 self.
tree.Branch(
'gamma_e', self.
gamma_e,
'gamma_e/F')
56 self.
tree.Branch(
'gamma_px', self.
gamma_px,
'gamma_px/F')
57 self.
tree.Branch(
'gamma_py', self.
gamma_py,
'gamma_py/F')
58 self.
tree.Branch(
'gamma_pz', self.
gamma_pz,
'gamma_pz/F')
59 self.
tree.Branch(
'jpsi_e', self.
jpsi_e,
'jpsi_e/F')
60 self.
tree.Branch(
'jpsi_px', self.
jpsi_px,
'jpsi_px/F')
61 self.
tree.Branch(
'jpsi_py', self.
jpsi_py,
'jpsi_py/F')
62 self.
tree.Branch(
'jpsi_pz', self.
jpsi_pz,
'jpsi_pz/F')
63 self.
tree.Branch(
'lepton_e', self.
lepton_e,
'lepton_e/F')
69 """ Event function. """
71 self.
ecms[0] = mc_initial_particles.getMass()
73 for mc_particle
in mc_particles:
75 if (mc_particle.getPDG() != 10022):
77 p = mc_particle.getMomentum()
78 self.
gamma_e[0] = mc_particle.getEnergy()
82 jpsi = mc_particle.getDaughters()[0]
83 p = jpsi.getMomentum()
84 self.
jpsi_e[0] = jpsi.getEnergy()
88 lepton = jpsi.getDaughters()[0]
89 p = lepton.getMomentum()
90 self.
lepton_e[0] = lepton.getEnergy()
97 """ Termination function. """
106root_input = b2.register_module(
'RootInput')
107root_input.param(
'inputFileName',
'PhokharaEvtgenData.root')
113main = b2.create_path()
118main.add_module(root_input)
119main.add_module(phokhara_evtgen)
121main.add_module(
'Progress')
A (simplified) python wrapper for StoreArray.
a (simplified) python wrapper for StoreObjPtr.
lepton_py
Lepton momentum (y component).
lepton_px
Lepton momentum (x component).
jpsi_pz
J/psi momentum (z component).
gamma_py
Virtual photon momentum (y component).
gamma_px
Virtual photon momentum (x component).
gamma_pz
Virtual photon momentum (z component).
gamma_e
Virtual photon energy.
lepton_pz
Lepton momentum (z component).
jpsi_px
J/psi momentum (x component).
jpsi_py
J/psi momentum (y component).