def from_decaylist(cls, decaylist, energy=0): ''' We only accept 2body and 3body channels If we find a 1 body channel we use the decay channels of that particle ''' tclist = [] for channel in decaylist: TC = TransformationChannel(channel[0], channel[1]) if all([ TC.length in [2, 3, 4], TC.BR > 0.0, TC.nameSet.intersection( TransformationChannels.EXCLUDEDSET) == set([]), #TC.totalMass <= energy ]): tclist.append(TC) elif TC.length == 1: oldBR = TC.BR newDCS = ParticleDataSource.getDecayChannels(TC.names[0]) for newTC in TransformationChannels.from_decaylist(newDCS).all: thisBR = newTC.BR newTC = newTC._replace(BR=oldBR * thisBR) tclist.append(newTC) return cls(tclist)
def _set_decayChannels(self): self._decay_channels = ParticleDataSource.getDecayChannels(self._name)