18 sequence=cms.Sequence()
24 from RecoMET.METFilters.badGlobalMuonTaggersMiniAOD_cff
import badGlobalMuonTaggerMAOD, cloneGlobalMuonTaggerMAOD
26 badMuModule=badGlobalMuonTaggerMAOD
27 cloneMuModule=cloneGlobalMuonTaggerMAOD
29 from RecoMET.METFilters.badGlobalMuonTaggersAOD_cff
import badGlobalMuonTagger, cloneGlobalMuonTagger
30 badMuModule=badGlobalMuonTagger
31 cloneMuModule=cloneGlobalMuonTagger
34 if cleaningScheme
in [
"bad",
"all",
"computeAllApplyBad",
"computeAllApplyClone"]:
35 addToProcessAndTask(
'badGlobalMuonTagger'+typeFix+postfix, badMuModule.clone(), process, task )
36 sequence +=getattr(process,
"badGlobalMuonTagger"+typeFix+postfix)
37 if cleaningScheme
in [
"bad",
"computeAllApplyBad"]:
38 badMuonCollection =
'badGlobalMuonTagger'+typeFix+postfix+
':bad' 39 if cleaningScheme
in [
"clone",
"duplicated",
"all",
"computeAllApplyBad",
"computeAllApplyClone"]:
40 addToProcessAndTask(
'cloneGlobalMuonTagger'+typeFix+postfix, cloneMuModule.clone(), process, task )
41 sequence +=getattr(process,
"cloneGlobalMuonTagger"+typeFix+postfix)
42 if cleaningScheme
in [
"clone",
"duplicated",
"computeAllApplyClone"]:
43 badMuonCollection =
'cloneGlobalMuonTagger'+typeFix+postfix+
':bad' 45 if cleaningScheme==
"all":
46 badMuonCollection=
"badMuons"+postfix
47 badMuonProducer = cms.EDProducer(
50 cms.InputTag(
'badGlobalMuonTagger'+typeFix+postfix,
'bad'),
51 cms.InputTag(
'cloneGlobalMuonTagger'+typeFix+postfix,
'bad'),
55 sequence +=getattr(process, badMuonCollection )
57 badMuonCollection=
"badMuons"+postfix
58 badMuonModule = cms.EDFilter(
"CandViewSelector",
59 src = cms.InputTag(muonCollection),
60 cut = cms.string(selection)
64 cleanedPFCandCollection=cleanCollName+postfix
66 cleanedPFCandProducer = cms.EDProducer(
"CandPtrProjector",
67 src = cms.InputTag(pfCandCollection),
68 veto = cms.InputTag(badMuonCollection)
71 cleanedPFCandProducer = cms.EDProducer(
"PFCandPtrProjector",
72 src = cms.InputTag(pfCandCollection),
73 veto = cms.InputTag(badMuonCollection)
77 sequence +=getattr(process, cleanedPFCandCollection )
80 def addToProcessAndTask(label, module, process, task)
def getPatAlgosToolsTask(process)