19 sequence=cms.Sequence()
25 from RecoMET.METFilters.badGlobalMuonTaggersMiniAOD_cff
import badGlobalMuonTaggerMAOD, cloneGlobalMuonTaggerMAOD
27 badMuModule=badGlobalMuonTaggerMAOD
28 cloneMuModule=cloneGlobalMuonTaggerMAOD
30 from RecoMET.METFilters.badGlobalMuonTaggersAOD_cff
import badGlobalMuonTagger, cloneGlobalMuonTagger
31 badMuModule=badGlobalMuonTagger
32 cloneMuModule=cloneGlobalMuonTagger
35 if cleaningScheme
in [
"bad",
"all",
"computeAllApplyBad",
"computeAllApplyClone"]:
36 addToProcessAndTask(
'badGlobalMuonTagger'+typeFix+postfix, badMuModule.clone(), process, task )
37 sequence +=getattr(process,
"badGlobalMuonTagger"+typeFix+postfix)
38 if cleaningScheme
in [
"bad",
"computeAllApplyBad"]:
39 badMuonCollection =
'badGlobalMuonTagger'+typeFix+postfix+
':bad'
40 if cleaningScheme
in [
"clone",
"duplicated",
"all",
"computeAllApplyBad",
"computeAllApplyClone"]:
41 addToProcessAndTask(
'cloneGlobalMuonTagger'+typeFix+postfix, cloneMuModule.clone(), process, task )
42 sequence +=getattr(process,
"cloneGlobalMuonTagger"+typeFix+postfix)
43 if cleaningScheme
in [
"clone",
"duplicated",
"computeAllApplyClone"]:
44 badMuonCollection =
'cloneGlobalMuonTagger'+typeFix+postfix+
':bad'
46 if cleaningScheme==
"all":
47 badMuonCollection=
"badMuons"+postfix
48 badMuonProducer = cms.EDProducer(
51 cms.InputTag(
'badGlobalMuonTagger'+typeFix+postfix,
'bad'),
52 cms.InputTag(
'cloneGlobalMuonTagger'+typeFix+postfix,
'bad'),
56 sequence +=getattr(process, badMuonCollection )
58 badMuonCollection=
"badMuons"+postfix
59 badMuonModule = cms.EDFilter(
"CandViewSelector",
60 src = cms.InputTag(muonCollection),
61 cut = cms.string(selection)
65 cleanedPFCandCollection=cleanCollName+postfix
68 import CommonTools.CandAlgos.candPtrProjector_cfi
as _mod
69 cleanedPFCandProducer = _mod.candPtrProjector.clone(
70 src = pfCandCollection,
71 veto = badMuonCollection
74 cleanedPFCandProducer = cms.EDProducer(
"PFCandPtrProjector",
75 src = cms.InputTag(pfCandCollection),
76 veto = cms.InputTag(badMuonCollection)
80 sequence +=getattr(process, cleanedPFCandCollection )