5 from TauAnalysis.MCEmbeddingTools.rerunParticleFlow
import rerunParticleFlow
12 from TauAnalysis.MCEmbeddingTools.setDefaults
import setDefaults
15 inputProcess = process.customization_options.inputProcessRECO.value()
16 print "Input process set to '%s'" % inputProcess
18 process._Process__name =
"EmbeddedRECO"
21 process.DQMStore = cms.Service(
"DQMStore")
23 if process.customization_options.isMC.value():
27 process.genMuonsFromZs = cms.EDProducer(
"GenParticlesFromZsSelectorForMCEmbedding",
28 src = cms.InputTag(
"genParticles",
"", process.customization_options.inputProcessSIM.value()),
29 pdgIdsMothers = cms.vint32(23, 22),
30 pdgIdsDaughters = cms.vint32(13),
31 maxDaughters = cms.int32(2),
32 minDaughters = cms.int32(2),
33 before_or_afterFSR = cms.string(
"afterFSR"),
34 verbosity = cms.int32(0)
36 process.ProductionFilterSequence.replace(process.cleanedGeneralTracks, process.genMuonsFromZs*process.cleanedGeneralTracks)
37 process.ProductionFilterSequence.replace(process.cleanedParticleFlow, process.genMuonsFromZs*process.cleanedParticleFlow)
41 process.genMetCalo = cms.EDProducer(
"MixedGenMEtProducer",
42 srcGenParticles1 = cms.InputTag(
"genParticles",
"", process.customization_options.inputProcessSIM.value()),
43 srcGenParticles2 = cms.InputTag(
"genParticles"),
44 srcRemovedMuons = cms.InputTag(process.customization_options.ZmumuCollection.getModuleLabel()),
45 type = cms.string(
"calo"),
48 process.genMetTrue = process.genMetCalo.clone(
49 type = cms.string(
"pf")
56 process.genMetCalo = cms.EDProducer(
"MixedGenMEtProducer",
57 srcGenParticles1 = cms.InputTag(
""),
58 srcGenParticles2 = cms.InputTag(
"genParticles"),
59 srcRemovedMuons = cms.InputTag(process.customization_options.ZmumuCollection.getModuleLabel()),
60 type = cms.string(
"calo"),
61 isMC = cms.bool(
False)
63 process.genMetTrue = process.genMetCalo.clone(
64 type = cms.string(
"pf")
66 for p
in process.paths:
67 pth = getattr(process, p)
68 if "genParticles" in pth.moduleNames():
69 pth.replace(process.genParticles, process.genParticles*process.genMetCalo*process.genMetTrue)
72 print "Setting collection of Z->mumu candidates to '%s'" % process.customization_options.ZmumuCollection.getModuleLabel()
73 if not (hasattr(process,
"cleanedGeneralTracks")
and hasattr(process,
"cleanedParticleFlow")):
74 process.load(
"TauAnalysis.MCEmbeddingTools.PFEmbeddingSource_cff")
75 if process.customization_options.replaceGenOrRecMuonMomenta.value() ==
'gen':
76 print "Taking momenta of generated tau leptons from generator level muons"
77 process.generator.src = cms.InputTag(
'genMuonsFromZs')
78 elif process.customization_options.replaceGenOrRecMuonMomenta.value() ==
'rec':
79 print "Taking momenta of generated tau leptons from reconstructed muons"
80 process.generator.src = process.customization_options.ZmumuCollection
82 raise ValueError(
"Invalid Configuration parameter 'replaceGenOrRecMuonMomenta' = %s !!" % process.customization_options.replaceGenOrRecMuonMomenta.value())
84 process.cleanedGeneralTracks.selectedMuons = process.customization_options.ZmumuCollection
85 process.cleanedParticleFlow.selectedMuons = process.customization_options.ZmumuCollection
86 if process.customization_options.muonTrackCleaningMode.value() == 1:
87 process.cleanedGeneralTracks.removeDuplicates = cms.bool(
False)
88 process.cleanedParticleFlow.removeDuplicates = cms.bool(
False)
89 elif process.customization_options.muonTrackCleaningMode.value() == 2:
90 process.cleanedGeneralTracks.removeDuplicates = cms.bool(
True)
91 process.cleanedParticleFlow.removeDuplicates = cms.bool(
True)
93 raise ValueError(
"Invalid Configuration parameter 'muonTrackCleaningMode' = %i !!" % process.customization_options.muonTrackCleaningMode.value())
96 outputModule = process.output
100 outputModule = getattr(process, str(getattr(process,
list(process.endpaths)[-1])))
104 print "Changing event-content to AODSIM + Z->mumu candidates"
105 outputModule.outputCommands = cms.untracked.vstring(
"drop *")
106 outputModule.outputCommands.extend(process.AODSIMEventContent.outputCommands)
110 for item
in outputModule.outputCommands[:]:
111 if item ==
"drop *" and index != 0:
112 del outputModule.outputCommands[index]
117 outputModule.outputCommands.extend([
118 'keep *_genMuonsFromZs_*_*'
122 outputModule.outputCommands.extend([
123 'keep *_goodMuons_*_*',
124 'keep *_goodMuonsPFIso_*_*',
125 'keep *_highestPtMuPlus_*_*',
126 'keep *_highestPtMuMinus_*_*',
127 'keep *_highestPtMuPlusPFIso_*_*',
128 'keep *_highestPtMuMinusPFIso_*_*'
133 outputModule.outputCommands.extend([
134 'keep *_goldenZmumuCandidatesGe0IsoMuons_*_*',
135 'keep *_goldenZmumuCandidatesGe1IsoMuons_*_*',
136 'keep *_goldenZmumuCandidatesGe2IsoMuons_*_*',
137 'keep TH2DMEtoEDM_MEtoEDMConverter_*_*'
143 outputModule.outputCommands.extend([
144 'keep *_goldenZmumuFilterResult_*_*',
145 'keep *_genMuonRadiationFilter_*_*',
146 'keep *_muonRadiationFilter_*_*'
152 outputModule.outputCommands.extend([
153 'keep *HepMCProduct_generator_*_*'
158 outputModule.outputCommands.extend([
159 'keep *_muonCaloEnergyDepositsByDistance_totalDistanceMuPlus_*',
160 'keep *_muonCaloEnergyDepositsByDistance_totalEnergyDepositMuPlus_*',
161 'keep *_muonCaloEnergyDepositsByDistance_totalDistanceMuMinus_*',
162 'keep *_muonCaloEnergyDepositsByDistance_totalEnergyDepositMuMinus_*',
163 'keep *_castorreco_removedEnergyMuMinus*_*',
164 'keep *_castorreco_removedEnergyMuPlus*_*',
165 'keep *_hfreco_removedEnergyMuMinus*_*',
166 'keep *_hfreco_removedEnergyMuPlus*_*',
167 'keep *_ecalPreshowerRecHit_removedEnergyMuMinus*_*',
168 'keep *_ecalPreshowerRecHit_removedEnergyMuPlus*_*',
169 'keep *_ecalRecHit_removedEnergyMuMinus*_*',
170 'keep *_ecalRecHit_removedEnergyMuPlus*_*',
171 'keep *_hbhereco_removedEnergyMuMinus*_*',
172 'keep *_hbhereco_removedEnergyMuPlus*_*',
173 'keep *_horeco_removedEnergyMuMinus*_*',
174 'keep *_horeco_removedEnergyMuPlus*_*',
179 hltProcessName =
"HLT"
181 hltProcessName = __HLT__
185 process.dimuonsHLTFilter.TriggerResultsTag.processName = hltProcessName
186 process.goodZToMuMuAtLeast1HLT.TrigTag.processName = hltProcessName
187 process.goodZToMuMuAtLeast1HLT.triggerEvent.processName = hltProcessName
188 process.hltTrigReport,HLTriggerResults.processName = hltProcessName
194 if hasattr(process,
'HLTAnalyzerEndpath'):
195 process.HLTAnalyzerEndpath.remove(process.hltL1GtTrigReport)
198 print "Setting mdtau to %i" % process.customization_options.mdtau.value()
199 process.generator.Ztautau.TauolaOptions.InputCards.mdtau = process.customization_options.mdtau
200 if hasattr(process.generator,
"ParticleGun"):
201 process.generator.ParticleGun.ExternalDecays.Tauola.InputCards.mdtau = process.customization_options.mdtau
202 if process.customization_options.useTauolaPolarization.value():
203 print "Enabling tau polarization effects in TAUOLA"
207 process.generator.Ztautau.TauolaOptions.UseTauolaPolarization = cms.bool(
True)
209 print "Disabling tau polarization effects in TAUOLA"
212 process.generator.Ztautau.TauolaOptions.UseTauolaPolarization = cms.bool(
False)
214 print "Setting minVisibleTransverseMomentum to '%s'" % process.customization_options.minVisibleTransverseMomentum.value()
215 process.generator.Ztautau.minVisibleTransverseMomentum = process.customization_options.minVisibleTransverseMomentum
217 print "Setting transformationMode to %i" % process.customization_options.transformationMode.value()
218 process.generator.Ztautau.transformationMode = process.customization_options.transformationMode
220 print "Setting rfRotationAngle to %1.0f" % process.customization_options.rfRotationAngle.value()
221 process.generator.Ztautau.rfRotationAngle = process.customization_options.rfRotationAngle
223 if process.customization_options.overrideBeamSpot.value():
224 bs = cms.string(
"BeamSpotObjects_2009_LumiBased_SigmaZ_v28_offline")
225 process.GlobalTag.toGet = cms.VPSet(
227 record = cms.string(
"BeamSpotObjectsRcd"),
229 connect = cms.untracked.string(
"frontier://FrontierProd/CMS_COND_31X_BEAMSPOT")
232 print "BeamSpot in globaltag set to '%s'" % bs
234 print "BeamSpot in globaltag not changed"
238 print "Disabling gen. vertex smearing"
239 process.VtxSmeared = cms.EDProducer(
"FlatEvtVtxGenerator",
240 MaxZ = cms.double(0.0),
241 MaxX = cms.double(0.0),
242 MaxY = cms.double(0.0),
243 MinX = cms.double(0.0),
244 MinY = cms.double(0.0),
245 MinZ = cms.double(0.0),
246 TimeOffset = cms.double(0.0),
247 src = cms.InputTag(
"generator")
250 if process.customization_options.useJson.value():
251 print "Enabling event selection by JSON file"
252 import PhysicsTools.PythonAnalysis.LumiList
as LumiList
253 import FWCore.ParameterSet.Types
as CfgTypes
255 process.source.lumisToProcess = CfgTypes.untracked(CfgTypes.VLuminosityBlockRange())
256 process.source.lumisToProcess.extend(myLumis)
262 if process.customization_options.embeddingMode.value() ==
"RH" and process.customization_options.cleaningMode ==
'PF':
264 process.ProductionFilterSequence += process.rerunParticleFlowSequenceForPFMuonCleaning
268 process.generalTracksORG = process.generalTracks.clone()
269 process.generalTracks = cms.EDProducer(
"TrackMixer",
272 collection1 = cms.InputTag(
"generalTracksORG",
"",
"EmbeddedRECO"),
273 collection2 = cms.InputTag(
"cleanedGeneralTracks")
276 verbosity = cms.int32(0)
279 for p
in process.paths:
280 pth = getattr(process,p)
281 if "generalTracks" in pth.moduleNames():
282 pth.replace(process.generalTracks, process.generalTracksORG*process.generalTracks)
287 process.trackerDrivenElectronSeedsORG = process.trackerDrivenElectronSeeds.clone()
288 process.trackerDrivenElectronSeedsORG.TkColList = cms.VInputTag(
289 cms.InputTag(
"generalTracksORG")
292 process.trackerDrivenElectronSeeds = cms.EDProducer(
"ElectronSeedTrackRefUpdater",
293 PreIdLabel = process.trackerDrivenElectronSeedsORG.PreIdLabel,
294 PreGsfLabel = process.trackerDrivenElectronSeedsORG.PreGsfLabel,
295 targetTracks = cms.InputTag(
"generalTracks"),
296 inSeeds = cms.InputTag(
"trackerDrivenElectronSeedsORG", process.trackerDrivenElectronSeedsORG.PreGsfLabel.value()),
297 inPreId = cms.InputTag(
"trackerDrivenElectronSeedsORG", process.trackerDrivenElectronSeedsORG.PreIdLabel.value()),
300 for p
in process.paths:
301 pth = getattr(process,p)
302 if "trackerDrivenElectronSeeds" in pth.moduleNames():
303 pth.replace(process.trackerDrivenElectronSeeds, process.trackerDrivenElectronSeedsORG*process.trackerDrivenElectronSeeds)
308 outputModule.outputCommands.extend([
'keep recoTracks_generalTracksORG_*_*'])
313 process.electronGsfTracksORG = process.electronGsfTracks.clone()
314 process.electronGsfTracks = cms.EDProducer(
"GsfTrackMixer",
315 collection1 = cms.InputTag(
"electronGsfTracksORG",
"",
"EmbeddedRECO"),
316 collection2 = cms.InputTag(
"electronGsfTracks",
"", inputProcess)
319 process.gsfConversionTrackProducer.TrackProducer = cms.string(
'electronGsfTracksORG')
321 for p
in process.paths:
322 pth = getattr(process,p)
323 if "electronGsfTracks" in pth.moduleNames():
324 pth.replace(process.electronGsfTracks, process.electronGsfTracksORG*process.electronGsfTracks)
326 process.generalConversionTrackProducer.TrackProducer = cms.string(
'generalTracksORG')
327 process.uncleanedOnlyGeneralConversionTrackProducer.TrackProducer = cms.string(
'generalTracksORG')
329 process.gsfElectronsORG = process.gsfElectrons.clone()
330 process.gsfElectrons = cms.EDProducer(
"GSFElectronsMixer",
331 col1 = cms.InputTag(
"gsfElectronsORG"),
332 col2 = cms.InputTag(
"gsfElectrons",
"", inputProcess)
334 for p
in process.paths:
335 pth = getattr(process,p)
336 if "gsfElectrons" in pth.moduleNames():
337 pth.replace(process.gsfElectrons, process.gsfElectronsORG*process.gsfElectrons)
342 for p
in process.paths:
343 pth = getattr(process,p)
344 for mod
in pth.moduleNames():
345 if mod.find(
"dedx") != -1
and mod.find(
"Zmumu") == -1:
346 if mod.find(
"ForPFMuonCleaning") == -1:
347 print "Removing %s" % mod
348 module = getattr(process, mod)
356 process.muonCaloDistances = cms.EDProducer(
'MuonCaloDistanceProducer',
357 trackAssociator = TrackAssociatorParameterBlock.TrackAssociatorParameters,
358 selectedMuons = process.customization_options.ZmumuCollection)
359 process.ProductionFilterSequence += process.muonCaloDistances
362 l1ExtraCollections = [
363 [
"L1EmParticle",
"Isolated" ],
364 [
"L1EmParticle",
"NonIsolated" ],
365 [
"L1EtMissParticle",
"MET" ],
366 [
"L1EtMissParticle",
"MHT" ],
367 [
"L1JetParticle",
"Central" ],
368 [
"L1JetParticle",
"Forward" ],
369 [
"L1JetParticle",
"Tau" ],
370 [
"L1MuonParticle",
"" ]
372 l1extraParticleCollections = []
373 for l1ExtraCollection
in l1ExtraCollections:
374 inputType = l1ExtraCollection[0]
376 srcVeto = cms.InputTag(
'')
378 if inputType ==
"L1EmParticle":
379 pluginType =
"L1ExtraEmParticleMixerPlugin"
380 srcSelectedMuons = process.customization_options.ZmumuCollection
382 elif inputType ==
"L1EtMissParticle":
383 pluginType =
"L1ExtraMEtMixerPlugin"
384 elif inputType ==
"L1JetParticle":
385 pluginType =
"L1ExtraJetParticleMixerPlugin"
386 srcSelectedMuons = process.customization_options.ZmumuCollection
388 elif inputType ==
"L1MuonParticle":
389 pluginType =
"L1ExtraMuonParticleMixerPlugin"
390 srcSelectedMuons = process.customization_options.ZmumuCollection
393 raise ValueError(
"Invalid L1Extra type = %s !!" % inputType)
394 instanceLabel = l1ExtraCollection[1]
395 l1extraParticleCollections.append(cms.PSet(
396 pluginType = cms.string(pluginType),
397 instanceLabel = cms.string(instanceLabel),
398 srcSelectedMuons2 = srcSelectedMuons,
399 dRveto2 = cms.double(dRveto)))
400 if inputType ==
'L1EtMissParticle':
401 l1extraParticleCollections[-1].srcMuons = cms.InputTag(
"muonCaloDistances",
"muons")
402 l1extraParticleCollections[-1].distanceMapMuPlus = cms.InputTag(
"muonCaloDistances",
"distancesMuPlus")
403 l1extraParticleCollections[-1].distanceMapMuMinus = cms.InputTag(
"muonCaloDistances",
"distancesMuPlus")
404 l1extraParticleCollections[-1].H_Calo_AbsEtaLt12 = cms.double(process.customization_options.muonCaloCleaningSF.value()*0.75)
405 l1extraParticleCollections[-1].H_Calo_AbsEta12to17 = cms.double(process.customization_options.muonCaloCleaningSF.value()*0.6)
406 l1extraParticleCollections[-1].H_Calo_AbsEtaGt17 = cms.double(process.customization_options.muonCaloCleaningSF.value()*0.3)
408 process.l1extraParticlesORG = process.l1extraParticles.clone()
409 process.l1extraParticles = cms.EDProducer(
'L1ExtraMixer',
410 src1 = cms.InputTag(
"l1extraParticlesORG"),
411 src2 = cms.InputTag(
"l1extraParticles",
"", inputProcess),
412 collections = cms.VPSet(l1extraParticleCollections)
414 for p
in process.paths:
415 pth = getattr(process,p)
416 if "l1extraParticles" in pth.moduleNames():
417 pth.replace(process.l1extraParticles, process.l1extraParticlesORG*process.l1extraParticles)
419 if process.customization_options.embeddingMode.value() ==
"PF":
420 print "Using PF-embedding"
421 from TauAnalysis.MCEmbeddingTools.embeddingCustomizePF
import customise
as customisePF
422 customisePF(process, inputProcess)
423 elif process.customization_options.embeddingMode.value() ==
"RH":
424 print "Using RH-embedding"
425 from TauAnalysis.MCEmbeddingTools.embeddingCustomizeRH
import customise
as customiseRH
426 customiseRH(process, inputProcess)
428 raise ValueError(
"Invalid Configuration parameter 'embeddingMode' = %s !!" % process.customization_options.embeddingMode.value())
433 for s
in process.sequences:
434 seq = getattr(process,s)
435 seq.remove(process.offlineBeamSpot)
438 process.metreco.remove(process.BeamHaloId)
443 outputModule = process.output
447 outputModule = getattr(process, str(getattr(process,
list(process.endpaths)[-1])))
451 process.filterEmptyEv.src = cms.untracked.InputTag(
"generator",
"",
"EmbeddedRECO")
454 process.schedule.remove(process.DQM_FEDIntegrity_v3)
458 process.load(
"TauAnalysis/MCEmbeddingTools/ZmumuStandaloneSelection_cff")
459 process.goldenZmumuFilter.src = process.customization_options.ZmumuCollection
460 if process.customization_options.applyZmumuSkim.value():
461 print "Enabling Zmumu skim"
462 process.load(
"TrackingTools/TransientTrack/TransientTrackBuilder_cfi")
463 for path
in process.paths:
464 if process.customization_options.isMC.value():
465 getattr(process,path)._seq = process.goldenZmumuFilterSequence * getattr(process,path)._seq
467 getattr(process,path)._seq = process.goldenZmumuFilterSequenceData * getattr(process,path)._seq
468 process.options = cms.untracked.PSet(
469 wantSummary = cms.untracked.bool(
True)
472 process.goldenZmumuFilterResult = cms.EDProducer(
"CandViewCountEventSelFlagProducer",
473 src = process.customization_options.ZmumuCollection,
474 minNumber = cms.uint32(1)
476 process.goldenZmumuFilterEfficiencyPath = cms.Path(process.goldenZmumuSelectionSequence + process.goldenZmumuFilterResult + process.MEtoEDMConverter)
477 process.schedule.append(process.goldenZmumuFilterEfficiencyPath)
479 print "Zmumu skim disabled"
483 if process.customization_options.isMC.value():
484 process.load(
"TauAnalysis/MCEmbeddingTools/genMuonRadiationFilter_cfi")
485 process.genMuonRadiationFilter.srcGenParticles = cms.InputTag(
'genParticles::%s' % process.customization_options.inputProcessSIM.value())
486 process.genMuonRadiationFilter.invert = cms.bool(
False)
487 process.genMuonRadiationFilter.filter = cms.bool(
False)
488 process.reconstruction_step += process.genMuonRadiationFilter
491 process.load(
"TauAnalysis/MCEmbeddingTools/muonRadiationFilter_cfi")
492 process.particleFlowPtrsForMuonRadiationFilter.src = cms.InputTag(
'particleFlow',
'', inputProcess)
493 process.muonRadiationFilter.srcSelectedMuons = process.customization_options.ZmumuCollection
494 process.muonRadiationFilter.invert = cms.bool(
False)
495 process.muonRadiationFilter.filter = cms.bool(
False)
496 process.reconstruction_step += process.muonRadiationFilterSequence
499 if process.customization_options.disableCaloNoise.value():
500 print "Disabling ECAL/HCAL noise simulation"
501 process.simEcalUnsuppressedDigis.doNoise = cms.bool(
False)
502 process.simEcalUnsuppressedDigis.doESNoise = cms.bool(
False)
503 process.simHcalUnsuppressedDigis.doNoise = cms.bool(
False)
504 process.simHcalUnsuppressedDigis.doThermalNoise = cms.bool(
False)
506 print "Keeping ECAL/HCAL noise simulation enabled"
513 # CV: apply/do not apply muon momentum corrections determined by Rochester group
514 if process.customization_options.replaceGenOrRecMuonMomenta.value() == "rec" and hasattr(process, "goldenZmumuSelectionSequence"):
515 if process.customization_options.applyRochesterMuonCorr.value():
516 print "Enabling Rochester muon momentum corrections"
517 process.patMuonsForZmumuSelectionRochesterMomentumCorr = cms.EDProducer("RochesterCorrPATMuonProducer",
518 src = cms.InputTag('patMuonsForZmumuSelection'),
519 isMC = cms.bool(process.customization_options.isMC.value())
521 process.goldenZmumuSelectionSequence.replace(process.patMuonsForZmumuSelection, process.patMuonsForZmumuSelection*process.patMuonsForZmumuSelectionRochesterMomentumCorr)
522 process.goodMuons.src = cms.InputTag('patMuonsForZmumuSelectionRochesterMomentumCorr')
524 print "Rochester muon momentum corrections disabled"
526 if process.customization_options.applyMuonRadiationCorrection.value() != "":
527 print "Muon -> muon + photon radiation correction enabled"
528 process.load("TauAnalysis/MCEmbeddingTools/muonRadiationCorrWeightProducer_cfi")
529 if process.customization_options.applyMuonRadiationCorrection.value() == "photos":
530 process.muonRadiationCorrWeightProducer.lutDirectoryRef = cms.string('genMuonRadCorrAnalyzerPHOTOS')
531 process.muonRadiationCorrWeightProducer.lutDirectoryOthers = cms.PSet(
532 Summer12mcMadgraph = cms.string('genMuonRadCorrAnalyzer')
534 elif process.customization_options.applyMuonRadiationCorrection.value() == "pythia":
535 process.muonRadiationCorrWeightProducer.lutDirectoryRef = cms.string('genMuonRadCorrAnalyzerPYTHIA')
536 process.muonRadiationCorrWeightProducer.lutDirectoryOthers = cms.PSet(
537 Summer12mcMadgraph = cms.string('genMuonRadCorrAnalyzer')
540 raise ValueError("Invalid Configuration parameter 'applyMuonRadiationCorrection' = %s !!" % process.customization_options.applyMuonRadiationCorrection.value())
541 process.reconstruction_step += process.muonRadiationCorrWeightProducer
542 outputModule.outputCommands.extend([
543 'keep *_muonRadiationCorrWeightProducer_*_*',
544 'keep *_generator_muonsBeforeRad_*',
545 'keep *_generator_muonsAfterRad_*'
548 print "Muon -> muon + photon radiation correction disabled"
550 # CV: compute reweighting factors to compensate for smearing of di-muon Pt and mass distributions caused by:
551 # o (mis)reconstruction of muon momenta
552 # o muon -> muon + photon radiation corrections
554 # mdtau values are defined in http:marpix1.in2p3.fr/Physics/biblio_top/mc_toprex_405.ps.gz
556 embeddingKineReweightTable = {
557 (115, 'elec1_9to30had1_15'): ('TauAnalysis/MCEmbeddingTools/data/embeddingKineReweight_ePt9to30tauPtGt18_genEmbedded.root', 'TauAnalysis/MCEmbeddingTools/data/embeddingKineReweight_ePt9to30tauPtGt18_recEmbedded.root'),
558 (115, 'elec1_20had1_18'): ('TauAnalysis/MCEmbeddingTools/data/embeddingKineReweight_ePtGt20tauPtGt18_genEmbedded.root', 'TauAnalysis/MCEmbeddingTools/data/embeddingKineReweight_ePtGt20tauPtGt18_recEmbedded.root'),
559 (116, 'mu1_7to25had1_15'): ('TauAnalysis/MCEmbeddingTools/data/embeddingKineReweight_muPt7to25tauPtGt18_genEmbedded.root', 'TauAnalysis/MCEmbeddingTools/data/embeddingKineReweight_muPt7to25tauPtGt18_recEmbedded.root'),
560 (116, 'mu1_16had1_18'): ('TauAnalysis/MCEmbeddingTools/data/embeddingKineReweight_muPtGt16tauPtGt18_genEmbedded.root', 'TauAnalysis/MCEmbeddingTools/data/embeddingKineReweight_muPtGt16tauPtGt18_recEmbedded.root'),
561 (121, 'elec1_17elec2_8'): ('TauAnalysis/MCEmbeddingTools/data/embeddingKineReweight_emu_genEmbedding.root', 'TauAnalysis/MCEmbeddingTools/data/embeddingKineReweight_emu_recEmbedding.root'),
562 (122, 'mu1_18mu2_8'): ('TauAnalysis/MCEmbeddingTools/data/embeddingKineReweight_emu_genEmbedding.root', 'TauAnalysis/MCEmbeddingTools/data/embeddingKineReweight_emu_recEmbedding.root'),
563 (123, 'tau1_18tau2_8'): ('TauAnalysis/MCEmbeddingTools/data/embeddingKineReweight_emu_genEmbedding.root', 'TauAnalysis/MCEmbeddingTools/data/embeddingKineReweight_emu_recEmbedding.root'),
564 (132, 'had1_30had2_30'): ('TauAnalysis/MCEmbeddingTools/data/embeddingKineReweight_tautau_genEmbedding.root', 'TauAnalysis/MCEmbeddingTools/data/embeddingKineReweight_tautau_recEmbedding.root')
567 key = (process.customization_options.mdtau.value(), process.customization_options.minVisibleTransverseMomentum.value())
568 if key in embeddingKineReweightTable:
569 process.load("TauAnalysis/MCEmbeddingTools/embeddingKineReweight_cff")
571 genEmbeddingReweightFile, recEmbeddingReweightFile = embeddingKineReweightTable[key]
572 process.embeddingKineReweightGENembedding.inputFileName = cms.FileInPath(genEmbeddingReweightFile)
573 process.embeddingKineReweightRECembedding.inputFileName = cms.FileInPath(recEmbeddingReweightFile)
575 process.reconstruction_step += process.embeddingKineReweightSequence
576 outputModule.outputCommands.extend([
577 'keep *_embeddingKineReweight*_*_*'
580 print 'Do not produce embeddingKineWeights for mdtau=%d, minVisibleTransverseMomuntem=%s !!' % (key[0], key[1])
582 # CV: compute weights for correcting Embedded samples
583 # for efficiency with which Zmumu events used as input for Embedding production were selected
584 process.load("TauAnalysis/MCEmbeddingTools/ZmumuEvtSelEffCorrWeightProducer_cfi")
585 process.ZmumuEvtSelEffCorrWeightProducer.selectedMuons = process.customization_options.ZmumuCollection
586 process.ZmumuEvtSelEffCorrWeightProducer.verbosity = cms.int32(0)
587 process.reconstruction_step += process.ZmumuEvtSelEffCorrWeightProducer
588 outputModule.outputCommands.extend([
589 'keep *_ZmumuEvtSelEffCorrWeightProducer_*_*'
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