CMS 3D CMS Logo

/afs/cern.ch/work/a/aaltunda/public/www/CMSSW_6_2_5/src/HLTriggerOffline/Egamma/python/EgammaValidationReco_cff.py

Go to the documentation of this file.
00001 import FWCore.ParameterSet.Config as cms
00002 
00003 class dummy:
00004     pass
00005 
00006 samples=dummy()
00007 paths=dummy()
00008 
00009 ##########################################################
00010 # Define which preselections to run                      #
00011 ##########################################################
00012 
00013 samples.names = ['Wenu',
00014                  'Zee',
00015                  'GammaJet',
00016                  'DiGamma']
00017 samples.pdgid = [ 11,
00018                   11,
00019                   22,
00020                   22]
00021 samples.num   = [1,
00022                  2,
00023                  1,
00024                  2]
00025 
00026 #which triggers for which sample
00027 
00028 paths.Wenu = [
00029               'HLT_Ele17_SW_TighterEleIdIsol_L1RDQM',
00030 
00031               'HLT_Ele10_LW_L1RDQM',
00032               'HLT_Ele15_SW_L1RDQM',
00033               'HLT_Ele10_LW_EleId_L1RDQM'
00034               ]
00035 
00036 paths.Zee = paths.Wenu + ['HLT_DoubleEle5_SW_L1RDQM']
00037 
00038 paths.GammaJet = ['HLT_Photon15_TrackIso_L1R_DQM',
00039                   'HLT_Photon10_L1R_DQM']
00040 
00041 paths.DiGamma  = paths.GammaJet 
00042 
00043 
00044 ##########################################################
00045 # loop over samples to create modules and sequence       #
00046 ##########################################################
00047 
00048 tmp = cms.SequencePlaceholder("tmp")
00049 egammaValidationSequenceReco = cms.Sequence(tmp)  # no empty sequences allowed, start with dummy
00050 
00051 #loop over samples
00052 for samplenum in range(len(samples.names)):
00053 
00054     # loop over triggers for each sample
00055     for trig in getattr(paths,samples.names[samplenum]):
00056         trigname = trig + samples.names[samplenum]
00057         #import appropriate config snippet
00058         filename = "HLTriggerOffline.Egamma."+trig+"_cfi"
00059         trigdef =__import__( filename )
00060         import sys
00061         globals()[trigname] = getattr(sys.modules[filename],trig).clone()    # clone imported config
00062         setattr(globals()[trigname],"_TypedParameterizable__type","EmDQMReco")
00063         # setattr(globals()[trigname],"cutcollection",cms.InputTag(fiducialname))       # set preselacted generator collection
00064         setattr(globals()[trigname],"cutnum",cms.int32( samples.num[samplenum]  )) # cut value for preselection
00065         setattr(globals()[trigname],"pdgGen",cms.int32( samples.pdgid[samplenum])) #correct pdgId for MC matching
00066         egammaValidationSequenceReco *= globals()[trigname]                      # add to sequence
00067 
00068 
00069 egammaValidationSequenceReco.remove(tmp)  # remove the initial dummy