6 <input>PhokharaEvtgenData.root</input>
7 <output>PhokharaEvtgenAnalysis.root</output>
8 <contact>Kirill Chilikin (K.A.Chilikin@inp.nsk.su)</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_fileoutput_file = ROOT.TFile(
'PhokharaEvtgenAnalysis.root',
'recreate')
28 self.
treetree = ROOT.TTree(
'tree',
'')
30 self.
ecmsecms = numpy.zeros(1, dtype=numpy.float32)
32 self.
gamma_egamma_e = numpy.zeros(1, dtype=numpy.float32)
34 self.
gamma_pxgamma_px = numpy.zeros(1, dtype=numpy.float32)
36 self.
gamma_pygamma_py = numpy.zeros(1, dtype=numpy.float32)
38 self.
gamma_pzgamma_pz = numpy.zeros(1, dtype=numpy.float32)
40 self.
jpsi_ejpsi_e = numpy.zeros(1, dtype=numpy.float32)
42 self.
jpsi_pxjpsi_px = numpy.zeros(1, dtype=numpy.float32)
44 self.
jpsi_pyjpsi_py = numpy.zeros(1, dtype=numpy.float32)
46 self.
jpsi_pzjpsi_pz = numpy.zeros(1, dtype=numpy.float32)
48 self.
lepton_elepton_e = numpy.zeros(1, dtype=numpy.float32)
50 self.
lepton_pxlepton_px = numpy.zeros(1, dtype=numpy.float32)
52 self.
lepton_pylepton_py = numpy.zeros(1, dtype=numpy.float32)
54 self.
lepton_pzlepton_pz = numpy.zeros(1, dtype=numpy.float32)
55 self.
treetree.Branch(
'ecms', self.
ecmsecms,
'ecms/F')
56 self.
treetree.Branch(
'gamma_e', self.
gamma_egamma_e,
'gamma_e/F')
57 self.
treetree.Branch(
'gamma_px', self.
gamma_pxgamma_px,
'gamma_px/F')
58 self.
treetree.Branch(
'gamma_py', self.
gamma_pygamma_py,
'gamma_py/F')
59 self.
treetree.Branch(
'gamma_pz', self.
gamma_pzgamma_pz,
'gamma_pz/F')
60 self.
treetree.Branch(
'jpsi_e', self.
jpsi_ejpsi_e,
'jpsi_e/F')
61 self.
treetree.Branch(
'jpsi_px', self.
jpsi_pxjpsi_px,
'jpsi_px/F')
62 self.
treetree.Branch(
'jpsi_py', self.
jpsi_pyjpsi_py,
'jpsi_py/F')
63 self.
treetree.Branch(
'jpsi_pz', self.
jpsi_pzjpsi_pz,
'jpsi_pz/F')
64 self.
treetree.Branch(
'lepton_e', self.
lepton_elepton_e,
'lepton_e/F')
65 self.
treetree.Branch(
'lepton_px', self.
lepton_pxlepton_px,
'lepton_px/F')
66 self.
treetree.Branch(
'lepton_py', self.
lepton_pylepton_py,
'lepton_py/F')
67 self.
treetree.Branch(
'lepton_pz', self.
lepton_pzlepton_pz,
'lepton_pz/F')
70 """ Event function. """
72 self.
ecmsecms[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_egamma_e[0] = mc_particle.getEnergy()
83 jpsi = mc_particle.getDaughters()[0]
84 p = jpsi.getMomentum()
85 self.
jpsi_ejpsi_e[0] = jpsi.getEnergy()
89 lepton = jpsi.getDaughters()[0]
90 p = lepton.getMomentum()
91 self.
lepton_elepton_e[0] = lepton.getEnergy()
98 """ Termination function. """
100 self.
treetree.Write()
105 root_input = b2.register_module(
'RootInput')
106 root_input.param(
'inputFileName',
'PhokharaEvtgenData.root')
112 main = b2.create_path()
115 main.add_module(root_input)
116 main.add_module(phokhara_evtgen)
118 main.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).