25 process.load(
"PhysicsTools.PatAlgos.cleaningLayer1.photonCleaner_cfi")
26 task.add(process.cleanPatPhotons)
28 cleanedPhotonCollection=
"cleanedPhotons"+postfix
29 cleanPhotonProducer = getattr(process,
"cleanPatPhotons").
clone(
30 src = photonCollection,
33 cleanPhotonProducer.checkOverlaps.electrons.src = electronCollection
34 cleanPhotonProducer.checkOverlaps.electrons.requireNoOverlaps=cms.bool(
True)
37 cleanedCorPhotonCollection=
"cleanedCorPhotons"+postfix
38 cleanCorPhotonProducer = getattr(process,
"cleanPatPhotons").
clone(
39 src = corPhotonCollection
41 cleanCorPhotonProducer.checkOverlaps.electrons.src = corElectronCollection
42 cleanCorPhotonProducer.checkOverlaps.electrons.requireNoOverlaps=cms.bool(
True)
46 matchPhotonCollection=
"matchedPhotons"+postfix
47 matchPhotonProducer=cms.EDProducer(
"PFMatchedCandidateRefExtractor",
48 col1=cms.InputTag(cleanedPhotonCollection),
49 col2=cms.InputTag(cleanedCorPhotonCollection),
50 pfCandCollection=cms.InputTag(pfCandidateCollection),
51 extractPFCandidates=cms.bool(pfCandMatching) )
53 matchElectronCollection=
"matchedElectrons"+postfix
54 matchElectronProducer=cms.EDProducer(
"PFMatchedCandidateRefExtractor",
55 col1=cms.InputTag(electronCollection),
56 col2=cms.InputTag(corElectronCollection),
57 pfCandCollection=cms.InputTag(pfCandidateCollection),
58 extractPFCandidates=cms.bool(pfCandMatching) )
62 tag1=
"pfCandCol1" if pfCandMatching
else "col1"
63 tag2=
"pfCandCol2" if pfCandMatching
else "col2"
64 correctionPhoton=
"corMETPhoton"+postfix
65 corMETPhoton = cms.EDProducer(
"ShiftedParticleMETcorrInputProducer",
66 srcOriginal = cms.InputTag(matchPhotonCollection,tag1),
67 srcShifted = cms.InputTag(matchPhotonCollection,tag2),
68 srcWeights = cms.InputTag(
"")
70 correctionElectron=
"corMETElectron"+postfix
71 corMETElectron=cms.EDProducer(
"ShiftedParticleMETcorrInputProducer",
72 srcOriginal=cms.InputTag(matchElectronCollection,tag1),
73 srcShifted=cms.InputTag(matchElectronCollection,tag2),
74 srcWeights = cms.InputTag(
"")
85 sequence=cms.Sequence()
86 sequence+=getattr(process,cleanedPhotonCollection)
87 sequence+=getattr(process,cleanedCorPhotonCollection)
88 sequence+=getattr(process,correctionPhoton)
89 sequence+=getattr(process,correctionElectron)
94 for metCollection
in metCollections:
96 if not hasattr(process, metCollection+postfix):
99 inputMetCollection=metCollection.replace(
"Raw",
"",1)
100 corMETModuleName=corMetName+postfix
101 corMETModule = cms.EDProducer(
"CorrectedPATMETProducer",
102 src = cms.InputTag( inputMetCollection ),
104 srcCorrections = cms.VInputTag( cms.InputTag(correctionPhoton),
105 cms.InputTag(correctionElectron),
109 sequence+=getattr(process,metCollection+postfix)
112 getattr(process,metCollection).srcCorrections.append(cms.InputTag(correctionPhoton))
113 getattr(process,metCollection).srcCorrections.append(cms.InputTag(correctionElectron))
void print(TMatrixD &m, const char *label=nullptr, bool mathematicaFormat=false)
TEveGeoShape * clone(const TEveElement *element, TEveElement *parent)