CMS 3D CMS Logo

CMSSW_4_4_3_patch1/src/Validation/RecoParticleFlow/Benchmarks/ElectronBenchmarkGeneric/elec_selection.py

Go to the documentation of this file.
00001 #!/usr/bin/env python
00002 
00003 import os
00004 
00005 def selection():
00006 
00007     if os.environ['E_SELECTION'] == 'efromW':
00008         result = ["drop *", "keep+ pdgId = 24", "keep+ pdgId = -24", "drop pdgId !=11 && pdgId !=-11"]
00009     elif os.environ['E_SELECTION'] == 'efromZ':
00010         result = ["drop *", "keep+ pdgId = 23", "drop pdgId !=11 && pdgId !=-11"]
00011     elif os.environ['E_SELECTION'] == 'efromb':
00012         result = ["drop *", "keep+ abs(pdgId)>=500 & abs(pdgId)<600", "drop pdgId !=11 && pdgId !=-11"]
00013     elif os.environ['E_SELECTION'] == 'pions':
00014         result = ["drop *", "keep pdgId = 211", "keep pdgId = -211"]
00015     else:
00016         result = ["drop *"," keep pdgId = {e-}", "keep pdgId = {e+}"]
00017     return result
00018 
00019 def deltaR():
00020     if os.environ['E_SELECTION'] == 'pions':
00021         result = 0.05
00022     else:
00023         result = 0.2
00024     return result
00025         
00026 if __name__ == "__main__":
00027     for statement in selection():
00028         print statement