22 <noexecute>Definition of helper class</noexecute>
26from ROOT import Belle2
30class SplitMultiplicities(basf2.Module):
32 Module to determine the multiplicities of a particle of a certain pdg code
38 :param pdgcode: pdg code to be studied
47 """ Event function """
58 for mcparticle
in mcParticles:
59 if (mcparticle.isPrimaryParticle())
and (mcparticle.getPDG() == self.
pdgcode):
61 mcMother = mcparticle.getMother()
63 pdg = mcMother.getPDG()
77 mcMother = mcMother.getMother()
80 extraInfoName = f
'nGen_{self.pdgcode}'
81 extraInfoName_Bp = f
'nGen_{self.pdgcode}_Bp'
82 extraInfoName_Bm = f
'nGen_{self.pdgcode}_Bm'
83 extraInfoName_B0 = f
'nGen_{self.pdgcode}_B0'
84 extraInfoName_antiB0 = f
'nGen_{self.pdgcode}_antiB0'
91 self.
eventExtraInfo.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)