Guest User

Untitled

a guest
Sep 21st, 2018
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.40 KB | None | 0 0
  1. def get_nbosons(event):
  2. nbosons = 0
  3. for genpart in event.GenPart:
  4. if abs(genpart.pdgId) in [11,12,13,14,15,16,23,24] and genpart.genPartIdxMother==0:
  5. if abs(genpart.pdgId)<20:
  6. nbosons += 1
  7. else:
  8. nbosons += 2
  9. return nbosons
  10.  
  11. def selection(event):
  12. return True if event.dataset.parent not in "EWKV2Jets" else (event.nGenBosons==1)
Add Comment
Please, Sign In to add comment