Example #1
0
 def set(decay_channels):
     list_decay = []
     buildWeights = Decay.buildWeights(decay_channels)
     if decay_channels != []:
         choice = Decay.weightedChoice(buildWeights[0], buildWeights[1])
         channel = decay_channels[choice][1]
         for pdgid in channel:
             list_decay.append(ParticleDataSource.getName(pdgid))
     return list_decay
Example #2
0
def test_particle():
    # for part in ['u', "ubar", "d", "dbar","c","cbar","s","sbar","b","bbar"]:
    #     this = QuantumUniverseParticle(part)
    #     print (this.transformtime)
    particle = QuantumUniverseParticle('Omega*_c0')
    print(particle.decay_channels)
    print(particle.mass)
    for item in particle.decay_channels[0][1]:
        print(ParticleDataSource.getName(item))
    particle2 = QuantumUniverseParticle('Omega_c0')
    print(particle2.type)
    print(particle2.mass)
    print(particle.name in ParticleDataSource.getExcludedParticles())
    print(TransformationChannels.from_decaylist(particle.decay_channels).all)