23 <noexecute>Definition of helper class</noexecute>
27 from ROOT
import Belle2
33 Module to determine the multiplicities of a particle of a certain pdg code
39 :param pdgcode: pdg code to be studied
48 """ Event function """
59 for mcparticle
in mcParticles:
60 if (mcparticle.isPrimaryParticle())
and (mcparticle.getPDG() == self.
pdgcodepdgcode):
62 mcMother = mcparticle.getMother()
64 pdg = mcMother.getPDG()
78 mcMother = mcMother.getMother()
81 extraInfoName =
'nGen_{}'.format(self.
pdgcodepdgcode)
82 extraInfoName_Bp =
'nGen_{}_Bp'.format(self.
pdgcodepdgcode)
83 extraInfoName_Bm =
'nGen_{}_Bm'.format(self.
pdgcodepdgcode)
84 extraInfoName_B0 =
'nGen_{}_B0'.format(self.
pdgcodepdgcode)
85 extraInfoName_antiB0 =
'nGen_{}_antiB0'.format(self.
pdgcodepdgcode)
88 self.
eventExtraInfoeventExtraInfo.setExtraInfo(extraInfoName, gen_counter)
89 self.
eventExtraInfoeventExtraInfo.setExtraInfo(extraInfoName_Bp, Bp_counter)
90 self.
eventExtraInfoeventExtraInfo.setExtraInfo(extraInfoName_Bm, Bm_counter)
91 self.
eventExtraInfoeventExtraInfo.setExtraInfo(extraInfoName_B0, B0_counter)
92 self.
eventExtraInfoeventExtraInfo.setExtraInfo(extraInfoName_antiB0, antiB0_counter)
A (simplified) python wrapper for StoreArray.
a (simplified) python wrapper for StoreObjPtr.
pdgcode
pdg code to be studied
eventExtraInfo
event extra info object
def __init__(self, pdgcode)