llij_mInv[0]=calculateInvariantMass(leptons[i],leptons[j])/1000#convert to GeV
hist1.Fill(llij_mInv[0])
Z_pT[0]=calculatePT(leptons[i],leptons[j])
Z_eta[0]=calculateEta(leptons[i],leptons[j])
break
# found a same-parentId, same-flavor, opposite-sign pair
# recorded for event n
#print("number of leptons: % d" %len(leptons))
#print("index i: % d, index j: % d" %(i, j))
#import pdb; pdb.set_trace() # import the debugger and instruct it to stop here
forparticleintruthParticles:
ifparticle.pdgId()!=32:continue
# we found the Zd only if particle.pdgId() == 32
higgs=particle.parent()
ifhiggs==None:break# sometimes the truth associations between the truthHiggs and its vector children seem to be broken. Just skip the event in this case.