1 import FWCore.ParameterSet.Config
as cms
2 from functools
import reduce
10 if not use_new_method:
25 samples.names = [
'Wenu',
59 paths.Zee = paths.Wenu + [
87 pathlumi = {
'HLT_Ele17_SW_TighterEleIdIsol_L1RDQM':
'8e29',
88 'HLT_Ele10_LW_L1RDQM':
'8e29',
89 'HLT_Ele15_SW_L1RDQM':
'1e31',
90 'HLT_Ele10_LW_EleId_L1RDQM':
'8e29',
91 'HLT_Ele15_SiStrip_L1RDQM':
'8e29',
92 'HLT_DoubleEle5_SW_L1RDQM':
'8e29',
93 'HLT_Photon10_L1R_DQM':
'8e29',
94 'HLT_Photon15_TrackIso_L1R_DQM':
'8e29',
95 'HLT_Photon15_LooseEcalIso_L1R_DQM':
'8e29',
96 'HLT_Photon20_Cleaned_L1R_DQM':
'8e29',
97 'HLT_DoublePhoton10_L1R_DQM':
'8e29',
98 'HLT_Photon25_L1R_DQM':
'1e31',
99 'HLT_Photon25_LooseEcalIso_TrackIso_L1R_DQM':
'1e31'}
102 for path
in paths.Wenu + paths.Zee + paths.GammaJet + paths.DiGamma:
103 pathlumi[path] =
'8e29'
105 lumiprocess = {
'8e29':
'HLT',
114 genp = cms.EDFilter(
"PdgIdAndStatusCandViewSelector",
115 status = cms.vint32(3),
116 src = cms.InputTag(
"genParticles"),
117 pdgId = cms.vint32(11)
120 fiducial = cms.EDFilter(
"EtaPtMinCandViewSelector",
121 src = cms.InputTag(
"genp"),
122 etaMin = cms.double(-2.5),
123 etaMax = cms.double(2.5),
124 ptMin = cms.double(2.0)
131 tmp = cms.SequencePlaceholder(
"tmp")
132 egammaSelectors = cms.Sequence(tmp)
133 egammaValidators= cms.Sequence(tmp)
136 for samplenum
in range(len(samples.names)):
139 genpartname =
"genpart"+samples.names[samplenum]
140 globals()[genpartname] = genp.clone()
141 setattr(globals()[genpartname],
"pdgId",cms.vint32(samples.pdgid[samplenum]) )
142 egammaSelectors *= globals()[genpartname]
145 fiducialname =
"fiducial"+samples.names[samplenum]
146 globals()[fiducialname] = fiducial.clone()
147 setattr(globals()[fiducialname],
"src",cms.InputTag(genpartname) )
148 egammaSelectors *= globals()[fiducialname]
151 for trig
in getattr(paths,samples.names[samplenum]):
152 trigname = trig + samples.names[samplenum]
154 filename =
"HLTriggerOffline.Egamma."+trig+
"_cfi"
155 trigdef =__import__( filename )
157 globals()[trigname] = getattr(sys.modules[filename],trig).
clone()
158 setattr(globals()[trigname],
"cutcollection",cms.InputTag(fiducialname))
159 setattr(globals()[trigname],
"cutnum",cms.int32( samples.num[samplenum] ))
160 setattr(globals()[trigname],
"pdgGen",cms.int32( samples.pdgid[samplenum]))
161 getattr(globals()[trigname],
'triggerobject').setProcessName( lumiprocess[pathlumi[trig]] )
162 for filterpset
in getattr(globals()[trigname],
'filters'):
163 getattr(filterpset,
'HLTCollectionLabels').setProcessName( lumiprocess[pathlumi[trig]] )
164 for isocollections
in getattr(filterpset,
'IsoCollections'):
165 isocollections.setProcessName( lumiprocess[pathlumi[trig]])
167 egammaValidators *= globals()[trigname]
170 egammaSelectors.remove(tmp)
171 egammaValidators.remove(tmp)
174 egammaValidationSequence = cms.Sequence( egammaValidators )
184 msgPrefix =
"[" + os.path.basename(__file__) +
"]"
186 import HLTriggerOffline.Egamma.EgammaHLTValidationUtils
as EgammaHLTValidationUtils
192 "singleElectron": {
"genPid" : 11,
"numGenerated" : 1,},
193 "doubleElectron": {
"genPid" : 11,
"numGenerated" : 2 },
194 "singlePhoton": {
"genPid" : 22,
"numGenerated" : 1 },
195 "doublePhoton": {
"genPid" : 22,
"numGenerated" : 2 },
206 for hltPathCategory, thisCategoryData
in configData.iteritems():
213 thisCategoryData[
'genPid'],
214 thisCategoryData[
'numGenerated'])
220 globals()[module.label_()] = module
227 egammaSelectors.append(generatorRequirementSequence)
233 egammaValidators = []
234 egammaValidatorsFS = []
236 for isFastSim, validators
in (
237 (
False, egammaValidators),
238 (
True, egammaValidatorsFS),
244 refProcess = cms.Process(
"REF")
247 refProcess.load(
"FastSimulation.Configuration.HLT_GRun_cff")
249 refProcess.load(
"HLTrigger.Configuration.HLT_GRun_cff")
255 for hltPathCategory, thisCategoryData
in configData.iteritems():
258 paths = pathsByCategory[hltPathCategory]
269 pathName = path.label_()
280 hasProblematicType =
False
282 for problematicType
in [
284 'HLTEgammaTriggerFilterObjectWrapper',
285 'EgammaHLTPhotonTrackIsolationProducersRegional',
288 if problematicType
in moduleCXXtypes:
290 hasProblematicType =
True
293 if hasProblematicType:
298 dqmModuleName = pathName
300 dqmModuleName = dqmModuleName +
"FastSim"
302 dqmModuleName = dqmModuleName +
"_DQM"
305 thisCategoryData[
'genPid'],
306 thisCategoryData[
'numGenerated']
310 globals()[dqmModuleName] = dqmModule
313 validators.append(dqmModule)
335 egammaSelectors = cms.Sequence(reduce(operator.mul, egammaSelectors))
338 egammaValidationSequence = cms.Sequence(reduce(operator.mul, egammaValidators))
339 egammaValidationSequenceFS = cms.Sequence(reduce(operator.mul, egammaValidatorsFS))
def makeGeneratedParticleAndFiducialVolumeFilter
TEveGeoShape * clone(const TEveElement *element, TEveElement *parent)