Example #1
0
def DecayTracer(particle, e, mu, visible, rank):
    
    '''Check the tau decay'''

    rank += 1

    for i in range( particle.numberOfDaughters() ):
        dau = GenParticle(particle.daughter(i))
#        print "   "*rank, dau.pdgId(), dau.status(), dau.p4().pt()
        if(abs(dau.pdgId()) == 11 and abs(particle.pdgId())==15):
#            print 'electron !', particle.pdgId()
            e.append(dau)
        elif(abs(dau.pdgId()) == 13 and abs(particle.pdgId())==15):
#            print 'muon !', particle.pdgId()
            mu.append(dau)

        if(dau.status()==1):
            if(abs(dau.pdgId()) in [12,14,16]):
                pass
            else:
                visible.append(dau)

        DecayTracer(dau, e, mu, visible, rank)