23 process.load(
"PhysicsTools.PatAlgos.cleaningLayer1.photonCleaner_cfi")
24 task.add(process.cleanPatPhotons)
26 cleanedPhotonCollection=
"cleanedPhotons"+postfix
27 cleanPhotonProducer = getattr(process,
"cleanPatPhotons").
clone(
28 src = photonCollection,
31 cleanPhotonProducer.checkOverlaps.electrons.src = electronCollection
32 cleanPhotonProducer.checkOverlaps.electrons.requireNoOverlaps=cms.bool(
True)
35 cleanedCorPhotonCollection=
"cleanedCorPhotons"+postfix
36 cleanCorPhotonProducer = getattr(process,
"cleanPatPhotons").
clone(
37 src = corPhotonCollection
39 cleanCorPhotonProducer.checkOverlaps.electrons.src = corElectronCollection
40 cleanCorPhotonProducer.checkOverlaps.electrons.requireNoOverlaps=cms.bool(
True)
44 matchPhotonCollection=
"matchedPhotons"+postfix
45 matchPhotonProducer=cms.EDProducer(
"PFMatchedCandidateRefExtractor",
46 col1=cms.InputTag(cleanedPhotonCollection),
47 col2=cms.InputTag(cleanedCorPhotonCollection),
48 pfCandCollection=cms.InputTag(pfCandidateCollection),
49 extractPFCandidates=cms.bool(pfCandMatching) )
51 matchElectronCollection=
"matchedElectrons"+postfix
52 matchElectronProducer=cms.EDProducer(
"PFMatchedCandidateRefExtractor",
53 col1=cms.InputTag(electronCollection),
54 col2=cms.InputTag(corElectronCollection),
55 pfCandCollection=cms.InputTag(pfCandidateCollection),
56 extractPFCandidates=cms.bool(pfCandMatching) )
60 tag1=
"pfCandCol1" if pfCandMatching
else "col1" 61 tag2=
"pfCandCol2" if pfCandMatching
else "col2" 62 correctionPhoton=
"corMETPhoton"+postfix
63 corMETPhoton = cms.EDProducer(
"ShiftedParticleMETcorrInputProducer",
64 srcOriginal = cms.InputTag(matchPhotonCollection,tag1),
65 srcShifted = cms.InputTag(matchPhotonCollection,tag2),
67 correctionElectron=
"corMETElectron"+postfix
68 corMETElectron=cms.EDProducer(
"ShiftedParticleMETcorrInputProducer",
69 srcOriginal=cms.InputTag(matchElectronCollection,tag1),
70 srcShifted=cms.InputTag(matchElectronCollection,tag2),
81 sequence=cms.Sequence()
82 sequence+=getattr(process,cleanedPhotonCollection)
83 sequence+=getattr(process,cleanedCorPhotonCollection)
84 sequence+=getattr(process,correctionPhoton)
85 sequence+=getattr(process,correctionElectron)
90 for metCollection
in metCollections:
92 if not hasattr(process, metCollection+postfix):
95 inputMetCollection=metCollection.replace(
"Raw",
"",1)
96 corMETModuleName=corMetName+postfix
97 corMETModule = cms.EDProducer(
"CorrectedPATMETProducer",
98 src = cms.InputTag( inputMetCollection ),
100 srcCorrections = cms.VInputTag( cms.InputTag(correctionPhoton),
101 cms.InputTag(correctionElectron),
105 sequence+=getattr(process,metCollection+postfix)
108 getattr(process,metCollection).srcCorrections.append(cms.InputTag(correctionPhoton))
109 getattr(process,metCollection).srcCorrections.append(cms.InputTag(correctionElectron))
112 def addToProcessAndTask(label, module, process, task)
TEveGeoShape * clone(const TEveElement *element, TEveElement *parent)
def getPatAlgosToolsTask(process)