9 process._Process__name=
"EmbeddedRECO"
10 process.TFileService = cms.Service(
"TFileService", fileName = cms.string(
"histo_embedded.root") )
13 outputModule = process.output
17 outputModule = getattr(process,str(getattr(process,
list(process.endpaths)[-1])))
21 print "Changing eventcontent to RAW+AODSIM + misc. "
22 outputModule.outputCommands = cms.untracked.vstring(
"drop *")
23 outputModule.outputCommands.extend(process.RAWEventContent.outputCommands )
24 outputModule.outputCommands.extend(process.AODSIMEventContent.outputCommands )
26 keepMC = cms.untracked.vstring(
"keep *_*_zMusExtracted_*",
27 "keep *_*_zmmCands_*",
28 "keep *_removedInputMuons_*_*",
29 "keep *_generator_*_*",
30 "keep *_PhotonIDProd_*_*",
32 "keep *_photonCore_*_*",
33 "keep *_genParticles_*_*",
34 "keep *_particleFlow_*_*",
35 "keep *_generator_*_*",
36 "keep *_tmfTracks_*_EmbeddedRECO",
37 "keep *_offlinePrimaryVertices_*_EmbeddedRECO",
38 "keep *_offlinePrimaryVerticesWithBS_*_EmbeddedRECO",
39 "keep *_PhotonIDProd_*_*",
41 "keep *_photonCore_*_*",
42 "keep *_genParticles_*_*",
43 "keep *_particleFlow_*_*",
45 outputModule.outputCommands.extend(keepMC)
49 for item
in outputModule.outputCommands[:]:
50 if item ==
"drop *" and index != 0:
52 del outputModule.outputCommands[index]
57 hltProcessName =
"HLT"
60 hltProcessName = __HLT__
65 process.dimuonsHLTFilter.TriggerResultsTag.processName = hltProcessName
66 process.goodZToMuMuAtLeast1HLT.TrigTag.processName = hltProcessName
67 process.goodZToMuMuAtLeast1HLT.triggerEvent.processName = hltProcessName
68 process.hltTrigReport,HLTriggerResults.processName = hltProcessName
72 process.VtxSmeared = cms.EDProducer(
"FlatEvtVtxGenerator",
73 MaxZ = cms.double(0.0),
74 MaxX = cms.double(0.0),
75 MaxY = cms.double(0.0),
76 MinX = cms.double(0.0),
77 MinY = cms.double(0.0),
78 MinZ = cms.double(0.0),
79 TimeOffset = cms.double(0.0),
80 src = cms.InputTag(
"generator")
83 import FWCore.ParameterSet.VarParsing
as VarParsing
85 options.register (
'mdtau',
87 VarParsing.VarParsing.multiplicity.singleton,
88 VarParsing.VarParsing.varType.int,
89 "mdtau value for tauola")
91 options.register (
'transformationMode',
93 VarParsing.VarParsing.multiplicity.singleton,
94 VarParsing.VarParsing.varType.int,
95 "transformation mode. 0=mumu->mumu, 1=mumu->tautau")
97 options.register (
'minVisibleTransverseMomentum',
99 VarParsing.VarParsing.multiplicity.singleton,
100 VarParsing.VarParsing.varType.string,
101 "generator level cut on visible transverse momentum (typeN:pT,[...];[...])")
103 options.register (
'useJson',
105 VarParsing.VarParsing.multiplicity.singleton,
106 VarParsing.VarParsing.varType.int,
107 "should I enable json usage?")
109 options.register (
'overrideBeamSpot',
111 VarParsing.VarParsing.multiplicity.singleton,
112 VarParsing.VarParsing.varType.int,
113 "should I override beamspot in globaltag?")
124 if not hasattr(process,
"doNotParse"):
126 if hasattr(sys,
"argv") ==
True:
127 if not sys.argv[0].endswith(
'cmsDriver.py'):
128 options.parseArguments()
131 print "CL parsing disabled!"
135 print "Setting mdtau to ", options.mdtau
136 process.generator.ZTauTau.TauolaOptions.InputCards.mdtau = options.mdtau
137 process.newSource.ZTauTau.TauolaOptions.InputCards.mdtau = options.mdtau
138 process.generator.ParticleGun.ExternalDecays.Tauola.InputCards.mdtau = options.mdtau
139 process.newSource.ParticleGun.ExternalDecays.Tauola.InputCards.mdtau = options.mdtau
141 print "Setting minVisibleTransverseMomentum to ", options.minVisibleTransverseMomentum
142 process.newSource.ZTauTau.minVisibleTransverseMomentum = cms.untracked.string(options.minVisibleTransverseMomentum)
143 process.generator.ZTauTau.minVisibleTransverseMomentum = cms.untracked.string(options.minVisibleTransverseMomentum)
145 print "Setting transformationMode to ", options.transformationMode
146 process.generator.ZTauTau.transformationMode = cms.untracked.int32(options.transformationMode)
147 process.newSource.ZTauTau.transformationMode = cms.untracked.int32(options.transformationMode)
149 if setFromCL
and options.overrideBeamSpot != 0 :
150 print "options.overrideBeamSpot", options.overrideBeamSpot
152 bs = cms.string(
"BeamSpotObjects_2009_LumiBased_SigmaZ_v21_offline")
158 process.GlobalTag.toGet = cms.VPSet(
159 cms.PSet(record = cms.string(
"BeamSpotObjectsRcd"),
161 connect = cms.untracked.string(
"frontier://FrontierProd/CMS_COND_31X_BEAMSPOT")
164 print "BeamSpot in globaltag set to ", bs
166 print "BeamSpot in globaltag not changed"
168 if setFromCL
and options.useJson != 0:
169 print "Enabling json usage"
170 import PhysicsTools.PythonAnalysis.LumiList
as LumiList
171 import FWCore.ParameterSet.Types
as CfgTypes
173 process.source.lumisToProcess = CfgTypes.untracked(CfgTypes.VLuminosityBlockRange())
174 process.source.lumisToProcess.extend(myLumis)
179 process.generalTracksORG = process.generalTracks.clone()
181 process.generalTracks = cms.EDProducer(
"RecoTracksMixer",
182 trackCol1 = cms.InputTag(
"generalTracksORG",
"",
"EmbeddedRECO"),
183 trackCol2 = cms.InputTag(
"removedInputMuons",
"tracks")
186 for p
in process.paths:
187 pth = getattr(process,p)
188 if "generalTracks" in pth.moduleNames():
189 pth.replace(process.generalTracks, process.generalTracksORG*process.generalTracks)
194 process.trackerDrivenElectronSeedsORG = process.trackerDrivenElectronSeeds.clone()
195 process.trackerDrivenElectronSeedsORG.TkColList = cms.VInputTag(cms.InputTag(
"generalTracksORG"))
197 process.trackerDrivenElectronSeeds = cms.EDProducer(
"ElectronSeedTrackRefUpdater",
198 PreIdLabel = process.trackerDrivenElectronSeedsORG.PreIdLabel,
199 PreGsfLabel = process.trackerDrivenElectronSeedsORG.PreGsfLabel,
200 targetTracks = cms.InputTag(
"generalTracks"),
201 inSeeds = cms.InputTag(
"trackerDrivenElectronSeedsORG", process.trackerDrivenElectronSeedsORG.PreGsfLabel.value()),
202 inPreId = cms.InputTag(
"trackerDrivenElectronSeedsORG", process.trackerDrivenElectronSeedsORG.PreIdLabel.value()),
205 for p
in process.paths:
206 pth = getattr(process,p)
207 if "trackerDrivenElectronSeeds" in pth.moduleNames():
208 pth.replace(process.trackerDrivenElectronSeeds, process.trackerDrivenElectronSeedsORG*process.trackerDrivenElectronSeeds)
212 process.trackerDrivenElectronSeedsMerged = cms.EDProducer(
"ElectronSeedTrackRefUpdaterAndMerger",
213 PreIdLabel = process.trackerDrivenElectronSeedsORG.PreIdLabel,
214 PreGsfLabel = process.trackerDrivenElectronSeedsORG.PreGsfLabel,
215 targetTracks = cms.InputTag(
"generalTracks"),
216 inSeeds1 = cms.InputTag(
"trackerDrivenElectronSeedsORG", process.trackerDrivenElectronSeeds.PreGsfLabel.value()),
217 inPreId1 = cms.InputTag(
"trackerDrivenElectronSeedsORG", process.trackerDrivenElectronSeeds.PreIdLabel.value()),
218 inSeeds2 = cms.InputTag(
"trackerDrivenElectronSeeds", process.trackerDrivenElectronSeeds.PreGsfLabel.value()),
219 inPreId2 = cms.InputTag(
"trackerDrivenElectronSeeds", process.trackerDrivenElectronSeeds.PreIdLabel.value())
222 process.electronMergedSeedsPhotonCoreHack = cms.EDProducer(
"ElectronSeedMerger",
223 EcalBasedSeeds = cms.InputTag(
"ecalDrivenElectronSeeds"),
224 TkBasedSeeds = cms.InputTag(
"trackerDrivenElectronSeedsMerged",
"SeedsForGsf")
227 process.photonCore.pixelSeedProducer = cms.string(
'electronMergedSeedsPhotonCoreHack')
230 for p
in process.paths:
231 pth = getattr(process,p)
232 if "photonCore" in pth.moduleNames():
233 pth.replace(process.photonCore,
234 process.trackerDrivenElectronSeedsMerged * process.electronMergedSeedsPhotonCoreHack *process.photonCore)
240 process.electronGsfTracksORG = process.electronGsfTracks.clone()
241 process.electronGsfTracks = cms.EDProducer(
"GsfTrackMixer",
242 col1 = cms.InputTag(
"electronGsfTracksORG",
"",
"EmbeddedRECO"),
243 col2= cms.InputTag(
"electronGsfTracks",
"", inputProcess),
248 process.gsfConversionTrackProducer.TrackProducer = cms.string(
'electronGsfTracksORG')
250 for p
in process.paths:
251 pth = getattr(process,p)
252 if "electronGsfTracks" in pth.moduleNames():
253 pth.replace(process.electronGsfTracks, process.electronGsfTracksORG*process.electronGsfTracks)
260 process.electronMergedSeedsORG = process.electronMergedSeeds.clone()
261 process.electronMergedSeeds = cms.EDProducer("ElectronSeedsMixer",
262 col1 = cms.InputTag("electronMergedSeeds","", inputProcess),
263 col2 = cms.InputTag("electronMergedSeedsORG","","EmbeddedRECO")
265 for p in process.paths:
266 pth = getattr(process,p)
267 if "electronMergedSeeds" in pth.moduleNames():
268 pth.replace(process.electronMergedSeeds, process.electronMergedSeedsORG*process.electronMergedSeeds)
271 process.generalConversionTrackProducer.TrackProducer = cms.string(
'generalTracksORG')
274 process.gsfElectronsORG = process.gsfElectrons.clone()
275 process.gsfElectrons = cms.EDProducer(
"GSFElectronsMixer",
276 col1 = cms.InputTag(
"gsfElectronsORG"),
277 col2 = cms.InputTag(
"gsfElectrons",
"",inputProcess),
279 for p
in process.paths:
280 pth = getattr(process,p)
281 if "gsfElectrons" in pth.moduleNames():
282 pth.replace(process.gsfElectrons, process.gsfElectronsORG*process.gsfElectrons)
287 for p
in process.paths:
288 pth = getattr(process,p)
291 for mod
in pth.moduleNames():
292 if mod.find(
"dedx") != -1:
293 print "Removing", mod
294 module=getattr(process,mod)
299 clConfig = cms.PSet (
300 depsPlus = cms.InputTag(
"anaDeposits",
"plus" ),
301 depsMinus = cms.InputTag(
"anaDeposits",
"minus" )
306 process.castorrecoORG = process.castorreco.clone()
307 process.castorreco = cms.EDProducer(
"CastorRHMixer",
308 cleaningAlgo = cms.string(
"CaloCleanerAllCrossed"),
309 cleaningConfig = clConfig,
310 todo = cms.VPSet(cms.PSet ( colZmumu = cms.InputTag(
"castorreco",
"", inputProcess ), colTauTau = cms.InputTag(
"castorrecoORG" ) ))
313 for p
in process.paths:
314 pth = getattr(process,p)
315 if "castorreco" in pth.moduleNames():
316 pth.replace(process.castorreco, process.castorrecoORG*process.castorreco)
318 process.ecalRecHitORG = process.ecalRecHit.clone()
319 process.ecalRecHit = cms.EDProducer(
"EcalRHMixer",
320 cleaningAlgo = cms.string(
"CaloCleanerAllCrossed"),
322 cleaningConfig = clConfig,
324 cms.PSet ( colZmumu = cms.InputTag(
"ecalRecHit",
"EcalRecHitsEB", inputProcess ),
325 colTauTau = cms.InputTag(
"ecalRecHitORG",
"EcalRecHitsEB" ) ),
327 cms.PSet ( colZmumu = cms.InputTag(
"ecalRecHit",
"EcalRecHitsEE", inputProcess ),
328 colTauTau = cms.InputTag(
"ecalRecHitORG",
"EcalRecHitsEE" ) )
331 for p
in process.paths:
332 pth = getattr(process,p)
333 if "ecalRecHit" in pth.moduleNames():
334 pth.replace(process.ecalRecHit, process.ecalRecHitORG*process.ecalRecHit)
338 process.hbherecoORG = process.hbhereco.clone()
339 process.hbhereco = cms.EDProducer(
"HBHERHMixer",
340 cleaningAlgo = cms.string(
"CaloCleanerAllCrossed"),
341 cleaningConfig = clConfig,
343 cms.VPSet(cms.PSet ( colZmumu = cms.InputTag(
"hbhereco",
"", inputProcess ), colTauTau = cms.InputTag(
"hbherecoORG",
"" )))
345 for p
in process.paths:
346 pth = getattr(process,p)
347 if "hbhereco" in pth.moduleNames():
348 pth.replace(process.hbhereco, process.hbherecoORG*process.hbhereco)
351 process.hfrecoORG = process.hfreco.clone()
352 process.hfreco = cms.EDProducer(
"HFRHMixer",
353 cleaningAlgo = cms.string(
"CaloCleanerAllCrossed"),
354 cleaningConfig = clConfig,
356 cms.VPSet(cms.PSet ( colZmumu = cms.InputTag(
"hfreco",
"", inputProcess ), colTauTau = cms.InputTag(
"hfrecoORG",
"" )))
358 for p
in process.paths:
359 pth = getattr(process,p)
360 if "hfreco" in pth.moduleNames():
361 pth.replace(process.hfreco, process.hfrecoORG*process.hfreco)
365 process.horecoORG = process.horeco.clone()
366 process.horeco = cms.EDProducer(
"HORHMixer",
367 cleaningAlgo = cms.string(
"CaloCleanerAllCrossed"),
368 cleaningConfig = clConfig,
370 cms.VPSet(cms.PSet ( colZmumu = cms.InputTag(
"horeco",
"", inputProcess ), colTauTau = cms.InputTag(
"horecoORG",
"" )))
372 for p
in process.paths:
373 pth = getattr(process,p)
374 if "horeco" in pth.moduleNames():
375 pth.replace(process.horeco, process.horecoORG*process.horeco)
385 for s
in process.sequences:
386 seq = getattr(process,s)
387 seq.remove(process.offlineBeamSpot)
391 process.metreco.remove(process.BeamHaloId)
396 outputModule = process.output
400 outputModule = getattr(process,str(getattr(process,
list(process.endpaths)[-1])))
404 process.filterEmptyEv.src = cms.untracked.InputTag(
"generator",
"",
"EmbeddedRECO")
408 process.schedule.remove(process.DQM_FEDIntegrity_v3)
413 process.RECOSIMoutput.outputCommands.extend([
'keep *_*_*_skimGoldenZmumu2'])
416 process.RECOSIMoutput.outputCommands.extend([
'keep *_*ORG_*_*'])
427 if hasattr(process,
"doZmumuSkim"):
428 print "Enabling Zmumu skim"
433 cmssw_ver = os.environ[
"CMSSW_VERSION"]
434 if cmssw_ver.find(
"CMSSW_4_2") != -1:
436 print "Using legacy version of Zmumu skim. Note, that muon isolation is disabled"
438 process.load(
"TauAnalysis/MCEmbeddingTools/ZmumuStandalonSelectionLegacy_cff")
440 process.load(
"TauAnalysis/MCEmbeddingTools/ZmumuStandalonSelection_cff")
441 process.load(
"TrackingTools/TransientTrack/TransientTrackBuilder_cfi")
444 for path
in process.paths:
445 getattr(process,path)._seq = process.goldenZmumuSelectionSequence * getattr(process,path)._seq
455 print "Zmumu skim not enabled"
458 print "# ######################################################################################"
459 print " Following parameters can be added before customize function "
460 print " call in order to controll process customization: "
461 print " process.doNotParse = cms.PSet() # disables CL parsing for crab compat"
462 print " process.doZmumuSkim = cms.PSet() # adds Zmumu skimming before embedding is run"
463 print "# ######################################################################################"
How EventSelector::AcceptEvent() decides whether to accept an event for output otherwise it is excluding the probing of A single or multiple positive and the trigger will pass if any such matching triggers are PASS or EXCEPTION[A criterion thatmatches no triggers at all is detected and causes a throw.] A single negative with an expectation of appropriate bit checking in the decision and the trigger will pass if any such matching triggers are FAIL or EXCEPTION A wildcarded negative criterion that matches more than one trigger in the trigger list("!*","!HLTx*"if it matches 2 triggers or more) will accept the event if all the matching triggers are FAIL.It will reject the event if any of the triggers are PASS or EXCEPTION(this matches the behavior of"!*"before the partial wildcard feature was incorporated).Triggers which are in the READY state are completely ignored.(READY should never be returned since the trigger paths have been run