CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_4_1_8_patch9/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 = ['HLT_Ele10_LW_L1RDQM',
00029               'HLT_Ele15_SW_L1RDQM',
00030               'HLT_Ele10_LW_EleId_L1RDQM'
00031               ]
00032 
00033 paths.Zee = paths.Wenu + ['HLT_DoubleEle5_SW_L1RDQM']
00034 
00035 paths.GammaJet = ['HLT_Photon15_TrackIso_L1R_DQM',
00036                   'HLT_Photon10_L1R_DQM']
00037 
00038 paths.DiGamma  = paths.GammaJet 
00039 
00040 
00041 ##########################################################
00042 # loop over samples to create modules and sequence       #
00043 ##########################################################
00044 
00045 tmp = cms.SequencePlaceholder("tmp")
00046 egammaValidationSequenceReco = cms.Sequence(tmp)  # no empty sequences allowed, start with dummy
00047 
00048 #loop over samples
00049 for samplenum in range(len(samples.names)):
00050 
00051     # loop over triggers for each sample
00052     for trig in getattr(paths,samples.names[samplenum]):
00053         trigname = trig + samples.names[samplenum]
00054         #import appropriate config snippet
00055         filename = "HLTriggerOffline.Egamma."+trig+"_cfi"
00056         trigdef =__import__( filename )
00057         import sys
00058         globals()[trigname] = getattr(sys.modules[filename],trig).clone()    # clone imported config
00059         setattr(globals()[trigname],"_TypedParameterizable__type","EmDQMReco")
00060         # setattr(globals()[trigname],"cutcollection",cms.InputTag(fiducialname))       # set preselacted generator collection
00061         setattr(globals()[trigname],"cutnum",cms.int32( samples.num[samplenum]  )) # cut value for preselection
00062         setattr(globals()[trigname],"pdgGen",cms.int32( samples.pdgid[samplenum])) #correct pdgId for MC matching
00063         egammaValidationSequenceReco *= globals()[trigname]                      # add to sequence
00064 
00065 
00066 egammaValidationSequenceReco.remove(tmp)  # remove the initial dummy