CMS 3D CMS Logo

/afs/cern.ch/work/a/aaltunda/public/www/CMSSW_5_3_14/src/HLTriggerOffline/Egamma/python/EgammaValidationAutoConf_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 
00008 ##########################################################
00009 # Define which preselections to run                      #
00010 ##########################################################
00011 
00012 samples.names = ['Wenu',
00013                  'Zee',
00014                  #'TripleEle',
00015                  'GammaJet',
00016                  'DiGamma']
00017 samples.pdgid = [ 11,
00018                   11,
00019                   #11,
00020                   22,
00021                   22]
00022 samples.num   = [1,
00023                  2,
00024                  #3,
00025                  1,
00026                  2]
00027 
00028 ##########################################################
00029 # produce generated paricles in acceptance               #
00030 ##########################################################
00031 
00032 genp = cms.EDFilter("PdgIdAndStatusCandViewSelector",
00033     status = cms.vint32(3),
00034     src = cms.InputTag("genParticles"),
00035     pdgId = cms.vint32(11)  # replaced in loop
00036 )
00037 
00038 fiducial = cms.EDFilter("EtaPtMinCandViewSelector",
00039     src = cms.InputTag("genp"),
00040     etaMin = cms.double(-2.5),  # to be replaced in loop ?
00041     etaMax = cms.double(2.5),   # to be replaced in loop ?
00042     ptMin = cms.double(2.0)     # to be replaced in loop ?
00043 )
00044 
00045 ##########################################################
00046 # loop over samples to create modules and sequence       #
00047 ##########################################################
00048 
00049 tmp = cms.SequencePlaceholder("tmp")
00050 egammaSelectors = cms.Sequence(tmp) # no empty sequences allowed, start with dummy
00051 
00052 #loop over samples
00053 for samplenum in range(len(samples.names)):
00054 
00055     # clone genParticles and select correct type
00056     genpartname = "genpart"+samples.names[samplenum]
00057     globals()[genpartname] = genp.clone()
00058     setattr(globals()[genpartname],"pdgId",cms.vint32(samples.pdgid[samplenum]) ) # set pdgId
00059     egammaSelectors *= globals()[genpartname]                            # add to sequence
00060 
00061     # clone generator fiducial region
00062     fiducialname = "fiducial"+samples.names[samplenum]
00063     globals()[fiducialname] = fiducial.clone()
00064     setattr(globals()[fiducialname],"src",cms.InputTag(genpartname) ) # set input collection
00065     egammaSelectors *= globals()[fiducialname]               # add to sequence
00066 
00067 egammaSelectors.remove(tmp)  # remove the initial dummy
00068 
00069 dqmFeeder = cms.EDAnalyzer('EmDQMFeeder',
00070                            #processname = cms.string("HLT"), # can be obtained from triggerobject
00071                            triggerobject = cms.InputTag("hltTriggerSummaryRAW","","HLT"),
00072                            genEtaAcc = cms.double(2.5),
00073                            genEtAcc = cms.double(2.0),
00074                            PtMax = cms.untracked.double(100.0),
00075                            isData = cms.bool(False),
00076                            verbosity = cms.untracked.uint32(0),
00077                            mcMatchedOnly = cms.untracked.bool(True),
00078                            noPhiPlots = cms.untracked.bool(True),
00079                            noIsolationPlots = cms.untracked.bool(True)
00080                           )
00081 
00082 # selectors go into separate "prevalidation" sequence
00083 egammaValidationSequence   = cms.Sequence(dqmFeeder)
00084 egammaValidationSequenceFS = cms.Sequence(dqmFeeder)