13 from TauAnalysis.MCEmbeddingTools.setDefaults
import setDefaults
16 inputProcess = process.customization_options.inputProcessRECO.value()
17 print "Input process set to '%s'" % inputProcess
19 process._Process__name =
"EmbeddedRECO"
22 process.DQMStore = cms.Service(
"DQMStore")
24 if process.customization_options.isMC.value():
28 process.genMuonsFromZs = cms.EDProducer(
"GenParticlesFromZsSelectorForMCEmbedding",
29 src = cms.InputTag(
"genParticles",
"", process.customization_options.inputProcessSIM.value()),
30 pdgIdsMothers = cms.vint32(23, 22),
31 pdgIdsDaughters = cms.vint32(13),
32 maxDaughters = cms.int32(2),
33 minDaughters = cms.int32(2),
34 before_or_afterFSR = cms.string(
"afterFSR"),
35 verbosity = cms.int32(0)
37 process.ProductionFilterSequence.replace(process.cleanedGeneralTracks, process.genMuonsFromZs*process.cleanedGeneralTracks)
38 process.ProductionFilterSequence.replace(process.cleanedParticleFlow, process.genMuonsFromZs*process.cleanedParticleFlow)
42 process.genMetCalo = cms.EDProducer(
"MixedGenMEtProducer",
43 srcGenParticles1 = cms.InputTag(
"genParticles",
"", process.customization_options.inputProcessSIM.value()),
44 srcGenParticles2 = cms.InputTag(
"genParticles"),
45 srcRemovedMuons = cms.InputTag(process.customization_options.ZmumuCollection.getModuleLabel()),
46 type = cms.string(
"calo"),
49 process.genMetTrue = process.genMetCalo.clone(
50 type = cms.string(
"pf")
57 process.genMetCalo = cms.EDProducer(
"MixedGenMEtProducer",
58 srcGenParticles1 = cms.InputTag(
""),
59 srcGenParticles2 = cms.InputTag(
"genParticles"),
60 srcRemovedMuons = cms.InputTag(process.customization_options.ZmumuCollection.getModuleLabel()),
61 type = cms.string(
"calo"),
62 isMC = cms.bool(
False)
64 process.genMetTrue = process.genMetCalo.clone(
65 type = cms.string(
"pf")
67 for p
in process.paths:
68 pth = getattr(process, p)
69 if "genParticles" in pth.moduleNames():
70 pth.replace(process.genParticles, process.genParticles*process.genMetCalo*process.genMetTrue)
73 print "Setting collection of Z->mumu candidates to '%s'" % process.customization_options.ZmumuCollection.getModuleLabel()
74 if not (hasattr(process,
"cleanedGeneralTracks")
and hasattr(process,
"cleanedParticleFlow")):
75 process.load(
"TauAnalysis.MCEmbeddingTools.PFEmbeddingSource_cff")
76 if process.customization_options.replaceGenOrRecMuonMomenta.value() ==
'gen':
77 print "Taking momenta of generated tau leptons from generator level muons"
78 process.generator.src = cms.InputTag(
'genMuonsFromZs')
79 elif process.customization_options.replaceGenOrRecMuonMomenta.value() ==
'rec':
80 print "Taking momenta of generated tau leptons from reconstructed muons"
81 process.generator.src = process.customization_options.ZmumuCollection
83 raise ValueError(
"Invalid Configuration parameter 'replaceGenOrRecMuonMomenta' = %s !!" % process.customization_options.replaceGenOrRecMuonMomenta.value())
85 process.cleanedGeneralTracks.selectedMuons = process.customization_options.ZmumuCollection
86 process.cleanedParticleFlow.selectedMuons = process.customization_options.ZmumuCollection
87 if process.customization_options.muonTrackCleaningMode.value() == 1:
88 process.cleanedGeneralTracks.removeDuplicates = cms.bool(
False)
89 process.cleanedParticleFlow.removeDuplicates = cms.bool(
False)
90 elif process.customization_options.muonTrackCleaningMode.value() == 2:
91 process.cleanedGeneralTracks.removeDuplicates = cms.bool(
True)
92 process.cleanedParticleFlow.removeDuplicates = cms.bool(
True)
94 raise ValueError(
"Invalid Configuration parameter 'muonTrackCleaningMode' = %i !!" % process.customization_options.muonTrackCleaningMode.value())
97 outputModule = process.output
101 outputModule = getattr(process, str(getattr(process,
list(process.endpaths)[-1])))
105 print "Changing event-content to AODSIM + Z->mumu candidates"
106 outputModule.outputCommands = cms.untracked.vstring(
"drop *")
107 outputModule.outputCommands.extend(process.AODSIMEventContent.outputCommands)
111 for item
in outputModule.outputCommands[:]:
112 if item ==
"drop *" and index != 0:
113 del outputModule.outputCommands[index]
118 outputModule.outputCommands.extend([
119 'keep *_genMuonsFromZs_*_*'
123 outputModule.outputCommands.extend([
124 'keep *_goodMuons_*_*',
125 'keep *_goodMuonsPFIso_*_*',
126 'keep *_highestPtMuPlus_*_*',
127 'keep *_highestPtMuMinus_*_*',
128 'keep *_highestPtMuPlusPFIso_*_*',
129 'keep *_highestPtMuMinusPFIso_*_*'
134 outputModule.outputCommands.extend([
135 'keep *_goldenZmumuCandidatesGe0IsoMuons_*_*',
136 'keep *_goldenZmumuCandidatesGe1IsoMuons_*_*',
137 'keep *_goldenZmumuCandidatesGe2IsoMuons_*_*',
138 'keep TH2DMEtoEDM_MEtoEDMConverter_*_*'
144 outputModule.outputCommands.extend([
145 'keep *_goldenZmumuFilterResult_*_*',
146 'keep *_genMuonRadiationFilter_*_*',
147 'keep *_muonRadiationFilter_*_*'
153 outputModule.outputCommands.extend([
154 'keep *HepMCProduct_generator_*_*'
159 outputModule.outputCommands.extend([
160 'keep *_muonCaloEnergyDepositsByDistance_totalDistanceMuPlus_*',
161 'keep *_muonCaloEnergyDepositsByDistance_totalEnergyDepositMuPlus_*',
162 'keep *_muonCaloEnergyDepositsByDistance_totalDistanceMuMinus_*',
163 'keep *_muonCaloEnergyDepositsByDistance_totalEnergyDepositMuMinus_*',
164 'keep *_castorreco_removedEnergyMuMinus*_*',
165 'keep *_castorreco_removedEnergyMuPlus*_*',
166 'keep *_hfreco_removedEnergyMuMinus*_*',
167 'keep *_hfreco_removedEnergyMuPlus*_*',
168 'keep *_ecalPreshowerRecHit_removedEnergyMuMinus*_*',
169 'keep *_ecalPreshowerRecHit_removedEnergyMuPlus*_*',
170 'keep *_ecalRecHit_removedEnergyMuMinus*_*',
171 'keep *_ecalRecHit_removedEnergyMuPlus*_*',
172 'keep *_hbhereco_removedEnergyMuMinus*_*',
173 'keep *_hbhereco_removedEnergyMuPlus*_*',
174 'keep *_horeco_removedEnergyMuMinus*_*',
175 'keep *_horeco_removedEnergyMuPlus*_*',
180 hltProcessName =
"HLT"
182 hltProcessName = __HLT__
186 process.dimuonsHLTFilter.TriggerResultsTag.processName = hltProcessName
187 process.goodZToMuMuAtLeast1HLT.TrigTag.processName = hltProcessName
188 process.goodZToMuMuAtLeast1HLT.triggerEvent.processName = hltProcessName
189 process.hltTrigReport,HLTriggerResults.processName = hltProcessName
195 if hasattr(process,
'HLTAnalyzerEndpath'):
196 process.HLTAnalyzerEndpath.remove(process.hltL1GtTrigReport)
199 print "Setting mdtau to %i" % process.customization_options.mdtau.value()
200 process.generator.Ztautau.TauolaOptions.InputCards.mdtau = process.customization_options.mdtau
201 if hasattr(process.generator,
"ParticleGun"):
202 process.generator.ParticleGun.ExternalDecays.Tauola.InputCards.mdtau = process.customization_options.mdtau
203 if process.customization_options.useTauolaPolarization.value():
204 print "Enabling tau polarization effects in TAUOLA"
208 process.generator.Ztautau.TauolaOptions.UseTauolaPolarization = cms.bool(
True)
210 print "Disabling tau polarization effects in TAUOLA"
213 process.generator.Ztautau.TauolaOptions.UseTauolaPolarization = cms.bool(
False)
215 print "Setting minVisibleTransverseMomentum to '%s'" % process.customization_options.minVisibleTransverseMomentum.value()
216 process.generator.Ztautau.minVisibleTransverseMomentum = process.customization_options.minVisibleTransverseMomentum
218 print "Setting transformationMode to %i" % process.customization_options.transformationMode.value()
219 process.generator.Ztautau.transformationMode = process.customization_options.transformationMode
221 print "Setting rfRotationAngle to %1.0f" % process.customization_options.rfRotationAngle.value()
222 process.generator.Ztautau.rfRotationAngle = process.customization_options.rfRotationAngle
224 print "Setting rfMirror to %s" % process.customization_options.rfMirror.value()
225 process.generator.Ztautau.rfMirror = process.customization_options.rfMirror
227 print "Setting muon radiation corrections to \"%s\"" % process.customization_options.applyMuonRadiationCorrection.value()
228 process.generator.Ztautau.applyMuonRadiationCorrection = process.customization_options.applyMuonRadiationCorrection
230 if process.customization_options.overrideBeamSpot.value():
231 bs = cms.string(
"BeamSpotObjects_2009_LumiBased_SigmaZ_v28_offline")
232 process.GlobalTag.toGet = cms.VPSet(
234 record = cms.string(
"BeamSpotObjectsRcd"),
236 connect = cms.untracked.string(
"frontier://FrontierProd/CMS_COND_31X_BEAMSPOT")
239 print "BeamSpot in globaltag set to '%s'" % bs
241 print "BeamSpot in globaltag not changed"
245 print "Disabling gen. vertex smearing"
246 process.VtxSmeared = cms.EDProducer(
"FlatEvtVtxGenerator",
247 MaxZ = cms.double(0.0),
248 MaxX = cms.double(0.0),
249 MaxY = cms.double(0.0),
250 MinX = cms.double(0.0),
251 MinY = cms.double(0.0),
252 MinZ = cms.double(0.0),
253 TimeOffset = cms.double(0.0),
254 src = cms.InputTag(
"generator")
257 if process.customization_options.useJson.value():
258 print "Enabling event selection by JSON file"
259 import PhysicsTools.PythonAnalysis.LumiList
as LumiList
260 import FWCore.ParameterSet.Types
as CfgTypes
262 process.source.lumisToProcess = CfgTypes.untracked(CfgTypes.VLuminosityBlockRange())
263 process.source.lumisToProcess.extend(myLumis)
269 if process.customization_options.embeddingMode.value() ==
"RH" and process.customization_options.cleaningMode ==
'PF':
271 process.ProductionFilterSequence += process.rerunParticleFlowSequenceForPFMuonCleaning
275 process.generalTracksORG = process.generalTracks.clone()
276 process.generalTracks = cms.EDProducer(
"TrackMixer",
279 collection1 = cms.InputTag(
"generalTracksORG",
"",
"EmbeddedRECO"),
280 collection2 = cms.InputTag(
"cleanedGeneralTracks")
283 verbosity = cms.int32(0)
286 for p
in process.paths:
287 pth = getattr(process,p)
288 if "generalTracks" in pth.moduleNames():
289 pth.replace(process.generalTracks, process.generalTracksORG*process.generalTracks)
294 process.trackerDrivenElectronSeedsORG = process.trackerDrivenElectronSeeds.clone()
295 process.trackerDrivenElectronSeedsORG.TkColList = cms.VInputTag(
296 cms.InputTag(
"generalTracksORG")
299 process.trackerDrivenElectronSeeds = cms.EDProducer(
"ElectronSeedTrackRefUpdater",
300 PreIdLabel = process.trackerDrivenElectronSeedsORG.PreIdLabel,
301 PreGsfLabel = process.trackerDrivenElectronSeedsORG.PreGsfLabel,
302 targetTracks = cms.InputTag(
"generalTracks"),
303 inSeeds = cms.InputTag(
"trackerDrivenElectronSeedsORG", process.trackerDrivenElectronSeedsORG.PreGsfLabel.value()),
304 inPreId = cms.InputTag(
"trackerDrivenElectronSeedsORG", process.trackerDrivenElectronSeedsORG.PreIdLabel.value()),
307 for p
in process.paths:
308 pth = getattr(process,p)
309 if "trackerDrivenElectronSeeds" in pth.moduleNames():
310 pth.replace(process.trackerDrivenElectronSeeds, process.trackerDrivenElectronSeedsORG*process.trackerDrivenElectronSeeds)
315 outputModule.outputCommands.extend([
'keep recoTracks_generalTracksORG_*_*'])
320 process.electronGsfTracksORG = process.electronGsfTracks.clone()
321 process.electronGsfTracks = cms.EDProducer(
"GsfTrackMixer",
322 collection1 = cms.InputTag(
"electronGsfTracksORG",
"",
"EmbeddedRECO"),
323 collection2 = cms.InputTag(
"electronGsfTracks",
"", inputProcess)
326 process.gsfConversionTrackProducer.TrackProducer = cms.string(
'electronGsfTracksORG')
328 for p
in process.paths:
329 pth = getattr(process,p)
330 if "electronGsfTracks" in pth.moduleNames():
331 pth.replace(process.electronGsfTracks, process.electronGsfTracksORG*process.electronGsfTracks)
333 process.generalConversionTrackProducer.TrackProducer = cms.string(
'generalTracksORG')
334 process.uncleanedOnlyGeneralConversionTrackProducer.TrackProducer = cms.string(
'generalTracksORG')
336 process.gsfElectronsORG = process.gsfElectrons.clone()
337 process.gsfElectrons = cms.EDProducer(
"GSFElectronsMixer",
338 col1 = cms.InputTag(
"gsfElectronsORG"),
339 col2 = cms.InputTag(
"gsfElectrons",
"", inputProcess)
341 for p
in process.paths:
342 pth = getattr(process,p)
343 if "gsfElectrons" in pth.moduleNames():
344 pth.replace(process.gsfElectrons, process.gsfElectronsORG*process.gsfElectrons)
349 for p
in process.paths:
350 pth = getattr(process,p)
351 for mod
in pth.moduleNames():
352 if mod.find(
"dedx") != -1
and mod.find(
"Zmumu") == -1:
353 if mod.find(
"ForPFMuonCleaning") == -1:
354 print "Removing %s" % mod
355 module = getattr(process, mod)
363 process.muonCaloDistances = cms.EDProducer(
'MuonCaloDistanceProducer',
364 trackAssociator = TrackAssociatorParameterBlock.TrackAssociatorParameters,
365 selectedMuons = process.customization_options.ZmumuCollection)
366 process.ProductionFilterSequence += process.muonCaloDistances
369 l1ExtraCollections = [
370 [
"L1EmParticle",
"Isolated" ],
371 [
"L1EmParticle",
"NonIsolated" ],
372 [
"L1EtMissParticle",
"MET" ],
373 [
"L1EtMissParticle",
"MHT" ],
374 [
"L1JetParticle",
"Central" ],
375 [
"L1JetParticle",
"Forward" ],
376 [
"L1JetParticle",
"Tau" ],
377 [
"L1MuonParticle",
"" ]
379 l1extraParticleCollections = []
380 for l1ExtraCollection
in l1ExtraCollections:
381 inputType = l1ExtraCollection[0]
383 srcVeto = cms.InputTag(
'')
385 if inputType ==
"L1EmParticle":
386 pluginType =
"L1ExtraEmParticleMixerPlugin"
387 srcSelectedMuons = process.customization_options.ZmumuCollection
389 elif inputType ==
"L1EtMissParticle":
390 pluginType =
"L1ExtraMEtMixerPlugin"
391 elif inputType ==
"L1JetParticle":
392 pluginType =
"L1ExtraJetParticleMixerPlugin"
393 srcSelectedMuons = process.customization_options.ZmumuCollection
395 elif inputType ==
"L1MuonParticle":
396 pluginType =
"L1ExtraMuonParticleMixerPlugin"
397 srcSelectedMuons = process.customization_options.ZmumuCollection
400 raise ValueError(
"Invalid L1Extra type = %s !!" % inputType)
401 instanceLabel = l1ExtraCollection[1]
402 l1extraParticleCollections.append(cms.PSet(
403 pluginType = cms.string(pluginType),
404 instanceLabel = cms.string(instanceLabel),
405 srcSelectedMuons2 = srcSelectedMuons,
406 dRveto2 = cms.double(dRveto)))
407 if inputType ==
'L1EtMissParticle':
408 l1extraParticleCollections[-1].srcMuons = cms.InputTag(
"muonCaloDistances",
"muons")
409 l1extraParticleCollections[-1].distanceMapMuPlus = cms.InputTag(
"muonCaloDistances",
"distancesMuPlus")
410 l1extraParticleCollections[-1].distanceMapMuMinus = cms.InputTag(
"muonCaloDistances",
"distancesMuPlus")
411 l1extraParticleCollections[-1].H_Calo_AbsEtaLt12 = cms.double(process.customization_options.muonCaloCleaningSF.value()*0.75)
412 l1extraParticleCollections[-1].H_Calo_AbsEta12to17 = cms.double(process.customization_options.muonCaloCleaningSF.value()*0.6)
413 l1extraParticleCollections[-1].H_Calo_AbsEtaGt17 = cms.double(process.customization_options.muonCaloCleaningSF.value()*0.3)
415 process.l1extraParticlesORG = process.l1extraParticles.clone()
416 process.l1extraParticles = cms.EDProducer(
'L1ExtraMixer',
417 src1 = cms.InputTag(
"l1extraParticlesORG"),
418 src2 = cms.InputTag(
"l1extraParticles",
"", inputProcess),
419 collections = cms.VPSet(l1extraParticleCollections)
421 for p
in process.paths:
422 pth = getattr(process,p)
423 if "l1extraParticles" in pth.moduleNames():
424 pth.replace(process.l1extraParticles, process.l1extraParticlesORG*process.l1extraParticles)
426 if process.customization_options.embeddingMode.value() ==
"PF":
427 print "Using PF-embedding"
428 from TauAnalysis.MCEmbeddingTools.embeddingCustomizePF
import customise
as customisePF
429 customisePF(process, inputProcess)
430 elif process.customization_options.embeddingMode.value() ==
"RH":
431 print "Using RH-embedding"
432 from TauAnalysis.MCEmbeddingTools.embeddingCustomizeRH
import customise
as customiseRH
433 customiseRH(process, inputProcess)
435 raise ValueError(
"Invalid Configuration parameter 'embeddingMode' = %s !!" % process.customization_options.embeddingMode.value())
440 for s
in process.sequences:
441 seq = getattr(process,s)
442 seq.remove(process.offlineBeamSpot)
445 process.metreco.remove(process.BeamHaloId)
450 outputModule = process.output
454 outputModule = getattr(process, str(getattr(process,
list(process.endpaths)[-1])))
458 process.filterEmptyEv.src = cms.untracked.InputTag(
"generator",
"",
"EmbeddedRECO")
461 process.schedule.remove(process.DQM_FEDIntegrity_v3)
465 process.load(
"TauAnalysis/MCEmbeddingTools/ZmumuStandaloneSelection_cff")
466 process.goldenZmumuFilter.src = process.customization_options.ZmumuCollection
467 if process.customization_options.applyZmumuSkim.value():
468 print "Enabling Zmumu skim"
469 process.load(
"TrackingTools/TransientTrack/TransientTrackBuilder_cfi")
470 for path
in process.paths:
471 if process.customization_options.isMC.value():
472 getattr(process,path)._seq = process.goldenZmumuFilterSequence * getattr(process,path)._seq
474 getattr(process,path)._seq = process.goldenZmumuFilterSequenceData * getattr(process,path)._seq
475 process.options = cms.untracked.PSet(
476 wantSummary = cms.untracked.bool(
True)
479 process.goldenZmumuFilterResult = cms.EDProducer(
"CandViewCountEventSelFlagProducer",
480 src = process.customization_options.ZmumuCollection,
481 minNumber = cms.uint32(1)
483 process.goldenZmumuFilterEfficiencyPath = cms.Path(process.goldenZmumuSelectionSequence + process.goldenZmumuFilterResult + process.MEtoEDMConverter)
484 process.schedule.append(process.goldenZmumuFilterEfficiencyPath)
486 print "Zmumu skim disabled"
490 if process.customization_options.isMC.value():
491 process.load(
"TauAnalysis/MCEmbeddingTools/genMuonRadiationFilter_cfi")
492 process.genMuonRadiationFilter.srcGenParticles = cms.InputTag(
'genParticles::%s' % process.customization_options.inputProcessSIM.value())
493 process.genMuonRadiationFilter.invert = cms.bool(
False)
494 process.genMuonRadiationFilter.filter = cms.bool(
False)
495 process.reconstruction_step += process.genMuonRadiationFilter
498 process.load(
"TauAnalysis/MCEmbeddingTools/muonRadiationFilter_cfi")
499 process.particleFlowPtrsForMuonRadiationFilter.src = cms.InputTag(
'particleFlow',
'', inputProcess)
500 process.muonRadiationFilter.srcSelectedMuons = process.customization_options.ZmumuCollection
501 process.muonRadiationFilter.invert = cms.bool(
False)
502 process.muonRadiationFilter.filter = cms.bool(
False)
503 process.reconstruction_step += process.muonRadiationFilterSequence
506 if process.customization_options.disableCaloNoise.value():
507 print "Disabling ECAL/HCAL noise simulation"
508 process.simEcalUnsuppressedDigis.doNoise = cms.bool(
False)
509 process.simEcalUnsuppressedDigis.doESNoise = cms.bool(
False)
510 process.simHcalUnsuppressedDigis.doNoise = cms.bool(
False)
511 process.simHcalUnsuppressedDigis.doThermalNoise = cms.bool(
False)
513 print "Keeping ECAL/HCAL noise simulation enabled"
520 # CV: apply/do not apply muon momentum corrections determined by Rochester group
521 if process.customization_options.replaceGenOrRecMuonMomenta.value() == "rec" and hasattr(process, "goldenZmumuSelectionSequence"):
522 if process.customization_options.applyRochesterMuonCorr.value():
523 print "Enabling Rochester muon momentum corrections"
524 process.patMuonsForZmumuSelectionRochesterMomentumCorr = cms.EDProducer("RochesterCorrPATMuonProducer",
525 src = cms.InputTag('patMuonsForZmumuSelection'),
526 isMC = cms.bool(process.customization_options.isMC.value())
528 process.goldenZmumuSelectionSequence.replace(process.patMuonsForZmumuSelection, process.patMuonsForZmumuSelection*process.patMuonsForZmumuSelectionRochesterMomentumCorr)
529 process.goodMuons.src = cms.InputTag('patMuonsForZmumuSelectionRochesterMomentumCorr')
531 print "Rochester muon momentum corrections disabled"
533 if process.customization_options.applyMuonRadiationCorrection.value() != "":
534 print "Muon -> muon + photon radiation correction enabled"
535 process.load("TauAnalysis/MCEmbeddingTools/muonRadiationCorrWeightProducer_cfi")
536 if process.customization_options.applyMuonRadiationCorrection.value() == "photos":
537 process.muonRadiationCorrWeightProducer.lutDirectoryRef = cms.string('genMuonRadCorrAnalyzerPHOTOS')
538 process.muonRadiationCorrWeightProducer.lutDirectoryOthers = cms.PSet(
539 Summer12mcMadgraph = cms.string('genMuonRadCorrAnalyzer')
541 elif process.customization_options.applyMuonRadiationCorrection.value() == "pythia":
542 process.muonRadiationCorrWeightProducer.lutDirectoryRef = cms.string('genMuonRadCorrAnalyzerPYTHIA')
543 process.muonRadiationCorrWeightProducer.lutDirectoryOthers = cms.PSet(
544 Summer12mcMadgraph = cms.string('genMuonRadCorrAnalyzer')
547 raise ValueError("Invalid Configuration parameter 'applyMuonRadiationCorrection' = %s !!" % process.customization_options.applyMuonRadiationCorrection.value())
548 process.reconstruction_step += process.muonRadiationCorrWeightProducer
549 outputModule.outputCommands.extend([
550 'keep *_muonRadiationCorrWeightProducer_*_*',
551 'keep *_generator_muonsBeforeRad_*',
552 'keep *_generator_muonsAfterRad_*'
555 print "Muon -> muon + photon radiation correction disabled"
557 # CV: compute reweighting factors to compensate for smearing of di-muon Pt and mass distributions caused by:
558 # o (mis)reconstruction of muon momenta
559 # o muon -> muon + photon radiation corrections
561 # mdtau values are defined in http:marpix1.in2p3.fr/Physics/biblio_top/mc_toprex_405.ps.gz
563 embeddingKineReweightTable = {
564 (115, 'elec1_9to30had1_15'): ('TauAnalysis/MCEmbeddingTools/data/embeddingKineReweight_ePt9to30tauPtGt18_genEmbedded.root', 'TauAnalysis/MCEmbeddingTools/data/embeddingKineReweight_ePt9to30tauPtGt18_recEmbedded.root'),
565 (115, 'elec1_20had1_18'): ('TauAnalysis/MCEmbeddingTools/data/embeddingKineReweight_ePtGt20tauPtGt18_genEmbedded.root', 'TauAnalysis/MCEmbeddingTools/data/embeddingKineReweight_ePtGt20tauPtGt18_recEmbedded.root'),
566 (116, 'mu1_7to25had1_15'): ('TauAnalysis/MCEmbeddingTools/data/embeddingKineReweight_muPt7to25tauPtGt18_genEmbedded.root', 'TauAnalysis/MCEmbeddingTools/data/embeddingKineReweight_muPt7to25tauPtGt18_recEmbedded.root'),
567 (116, 'mu1_16had1_18'): ('TauAnalysis/MCEmbeddingTools/data/embeddingKineReweight_muPtGt16tauPtGt18_genEmbedded.root', 'TauAnalysis/MCEmbeddingTools/data/embeddingKineReweight_muPtGt16tauPtGt18_recEmbedded.root'),
568 (121, 'elec1_17elec2_8'): ('TauAnalysis/MCEmbeddingTools/data/embeddingKineReweight_emu_genEmbedding.root', 'TauAnalysis/MCEmbeddingTools/data/embeddingKineReweight_emu_recEmbedding.root'),
569 (122, 'mu1_18mu2_8'): ('TauAnalysis/MCEmbeddingTools/data/embeddingKineReweight_emu_genEmbedding.root', 'TauAnalysis/MCEmbeddingTools/data/embeddingKineReweight_emu_recEmbedding.root'),
570 (123, 'tau1_18tau2_8'): ('TauAnalysis/MCEmbeddingTools/data/embeddingKineReweight_emu_genEmbedding.root', 'TauAnalysis/MCEmbeddingTools/data/embeddingKineReweight_emu_recEmbedding.root'),
571 (132, 'had1_30had2_30'): ('TauAnalysis/MCEmbeddingTools/data/embeddingKineReweight_tautau_genEmbedding.root', 'TauAnalysis/MCEmbeddingTools/data/embeddingKineReweight_tautau_recEmbedding.root')
574 key = (process.customization_options.mdtau.value(), process.customization_options.minVisibleTransverseMomentum.value())
575 if key in embeddingKineReweightTable:
576 process.load("TauAnalysis/MCEmbeddingTools/embeddingKineReweight_cff")
578 genEmbeddingReweightFile, recEmbeddingReweightFile = embeddingKineReweightTable[key]
579 process.embeddingKineReweightGENembedding.inputFileName = cms.FileInPath(genEmbeddingReweightFile)
580 process.embeddingKineReweightRECembedding.inputFileName = cms.FileInPath(recEmbeddingReweightFile)
582 process.reconstruction_step += process.embeddingKineReweightSequence
583 outputModule.outputCommands.extend([
584 'keep *_embeddingKineReweight*_*_*'
587 print 'Do not produce embeddingKineWeights for mdtau=%d, minVisibleTransverseMomuntem=%s !!' % (key[0], key[1])
589 # CV: compute weights for correcting Embedded samples
590 # for efficiency with which Zmumu events used as input for Embedding production were selected
591 process.load("TauAnalysis/MCEmbeddingTools/ZmumuEvtSelEffCorrWeightProducer_cfi")
592 process.ZmumuEvtSelEffCorrWeightProducer.selectedMuons = process.customization_options.ZmumuCollection
593 process.ZmumuEvtSelEffCorrWeightProducer.verbosity = cms.int32(0)
594 process.reconstruction_step += process.ZmumuEvtSelEffCorrWeightProducer
595 outputModule.outputCommands.extend([
596 '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