test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
elec_selection.py
Go to the documentation of this file.
1 #!/usr/bin/env python
2 
3 import os
4 
5 def selection():
6 
7  if os.environ['E_SELECTION'] == 'efromW':
8  result = ["drop *", "keep+ pdgId = 24", "keep+ pdgId = -24", "drop pdgId !=11 && pdgId !=-11"]
9  elif os.environ['E_SELECTION'] == 'efromZ':
10  result = ["drop *", "keep+ pdgId = 23", "drop pdgId !=11 && pdgId !=-11"]
11  elif os.environ['E_SELECTION'] == 'efromb':
12  result = ["drop *", "keep+ abs(pdgId)>=500 & abs(pdgId)<600", "drop pdgId !=11 && pdgId !=-11"]
13  elif os.environ['E_SELECTION'] == 'pions':
14  result = ["drop *", "keep pdgId = 211", "keep pdgId = -211"]
15  else:
16  result = ["drop *"," keep pdgId = {e-}", "keep pdgId = {e+}"]
17  return result
18 
19 def deltaR():
20  if os.environ['E_SELECTION'] == 'pions':
21  result = 0.05
22  else:
23  result = 0.2
24  return result
25 
26 if __name__ == "__main__":
27  for statement in selection():
28  print statement