1 import FWCore.ParameterSet.Config
as cms
5 if tag
in names_to_replace:
8 if tag.getModuleLabel()
in names_to_replace:
9 tag.setModuleLabel(tag.getModuleLabel()+suffix)
13 for paraname
in pset.parameterNames_():
14 para = pset.getParameter(paraname)
15 if para.pythonTypeName()==
"cms.PSet":
17 elif para.pythonTypeName()==
"cms.VPSet":
20 elif para.pythonTypeName()==
"cms.InputTag":
22 elif para.pythonTypeName()==
"cms.VInputTag":
30 modules_to_clone=[
"slimmedElectrons",
31 "selectedPatElectrons",
38 "electronMVAValueMapProducer",
39 "electronRegressionValueMapProducer",
41 "photonIDValueMapProducer",
42 "photonRegressionValueMapProducer",
43 "photonMVAValueMapProducer",
44 "phPFIsoDepositChargedPAT",
45 "phPFIsoDepositChargedAllPAT",
46 "phPFIsoDepositPUPAT",
47 "phPFIsoDepositNeutralPAT",
48 "phPFIsoDepositGammaPAT",
49 "phPFIsoValueCharged04PFIdPAT",
50 "phPFIsoValueChargedAll04PFIdPAT",
51 "phPFIsoValuePU04PFIdPAT",
52 "phPFIsoValueNeutral04PFIdPAT",
53 "phPFIsoValueGamma04PFIdPAT",
54 "elPFIsoDepositChargedPAT",
55 "elPFIsoDepositChargedAllPAT",
56 "elPFIsoDepositPUPAT",
57 "elPFIsoDepositNeutralPAT",
58 "elPFIsoDepositGammaPAT",
59 "elPFIsoValueCharged04PFIdPAT",
60 "elPFIsoValueChargedAll04PFIdPAT",
61 "elPFIsoValuePU04PFIdPAT",
62 "elPFIsoValueNeutral04PFIdPAT",
63 "elPFIsoValueGamma04PFIdPAT",
64 "elPFIsoValueCharged04NoPFIdPAT",
65 "elPFIsoValueChargedAll04NoPFIdPAT",
66 "elPFIsoValuePU04NoPFIdPAT",
67 "elPFIsoValueNeutral04NoPFIdPAT",
68 "elPFIsoValueGamma04NoPFIdPAT"]
71 for name
in modules_to_clone:
72 new_name = name+suffix
73 setattr(process,new_name,getattr(process,name).
clone())
76 process.reducedEgammaBeforeGSFix.gsfElectronIDSources = cms.VInputTag(
77 cms.InputTag(
"eidLoose", processName=cms.InputTag.skipCurrentProcess()),
78 cms.InputTag(
"eidRobustHighEnergy", processName=cms.InputTag.skipCurrentProcess()),
79 cms.InputTag(
"eidRobustLoose", processName=cms.InputTag.skipCurrentProcess()),
80 cms.InputTag(
"eidRobustTight", processName=cms.InputTag.skipCurrentProcess()),
81 cms.InputTag(
"eidTight", processName=cms.InputTag.skipCurrentProcess()),
88 process.load(
"RecoEgamma.EgammaTools.egammaGainSwitchFixForPAT_cff")
89 process.load(
"RecoParticleFlow.PFProducer.pfGSFixLinkerForPAT_cff")
90 process.load(
"RecoEgamma.EgammaIsolationAlgos.pfClusterIsolationRemapForPAT_cff")
91 process.load(
"RecoEgamma.ElectronIdentification.idExternalRemapForPAT_cff")
92 process.load(
"RecoEgamma.EgammaTools.egammaGainSwitchFlag_cff")
98 [
'keep *_reducedEgammaBeforeGSFix_*_*',
99 'keep *_slimmedElectronsBeforeGSFix_*_*',
100 'keep *_slimmedPhotonsBeforeGSFix_*_*',
101 'keep EBDigiCollection_selectDigi_*_*',
102 'keep EEDigiCollection_selectDigi_*_*',
103 'drop *_reducedEgammaBeforeGSFix_reducedGedGsfElectrons_*',
104 'drop *_reducedEgammaBeforeGSFix_reducedGedPhotons_*',
105 'keep *_ecalMultiAndGSGlobalRecHitEB_hitsNotReplaced_*',
106 'keep *_particleFlowEGammaGSFixed_dupECALClusters_*',
107 'keep *_particleFlowEGammaGSFixed_dupESClusters_*',
109 process.reducedEgamma.gsfElectrons = cms.InputTag(
"gedGsfElectronsGSFixed")
110 process.reducedEgamma.gsfElectronsPFValMap = cms.InputTag(
"particleBasedIsolationGSFixed",
"gedGsfElectrons")
111 process.reducedEgamma.gsfElectronPFClusterIsoSources = cms.VInputTag(
112 cms.InputTag(
"electronEcalPFClusterIsolationProducerGSFixed"),
113 cms.InputTag(
"electronHcalPFClusterIsolationProducerGSFixed"),
115 process.reducedEgamma.gsfElectronIDSources = cms.VInputTag(
116 cms.InputTag(
"eidLooseGSFixed"),
117 cms.InputTag(
"eidRobustHighEnergyGSFixed"),
118 cms.InputTag(
"eidRobustLooseGSFixed"),
119 cms.InputTag(
"eidRobustTightGSFixed"),
120 cms.InputTag(
"eidTightGSFixed"),
122 process.reducedEgamma.photons = cms.InputTag(
"gedPhotonsGSFixed")
123 process.reducedEgamma.conversions = cms.InputTag(
"allConversions", processName=cms.InputTag.skipCurrentProcess())
124 process.reducedEgamma.singleConversions = cms.InputTag(
"particleFlowEGamma", processName=cms.InputTag.skipCurrentProcess())
125 process.reducedEgamma.photonsPFValMap = cms.InputTag(
"particleBasedIsolationGSFixed",
"gedPhotons")
126 process.reducedEgamma.photonPFClusterIsoSources = cms.VInputTag(
127 cms.InputTag(
"photonEcalPFClusterIsolationProducerGSFixed"),
128 cms.InputTag(
"photonHcalPFClusterIsolationProducerGSFixed"),
130 process.reducedEgamma.photonIDSources = cms.VInputTag(
131 cms.InputTag(
"PhotonCutBasedIDLooseGSFixed"),
132 cms.InputTag(
"PhotonCutBasedIDLooseEMGSFixed"),
133 cms.InputTag(
"PhotonCutBasedIDTightGSFixed")
135 process.reducedEgamma.barrelEcalHits = cms.InputTag(
"ecalMultiAndGSGlobalRecHitEB")
136 process.reducedEgamma.endcapEcalHits = cms.InputTag(
"reducedEcalRecHitsEE")
137 process.reducedEgamma.preshowerEcalHits = cms.InputTag(
"reducedEcalRecHitsES")
139 for modification
in process.slimmedPhotons.modifierConfig.modifications:
140 if modification.modifierName !=
'EGExtraInfoModifierFromIntValueMaps':
continue
141 modification.photon_config.hasGainSwitchFlag = cms.InputTag(
'PhotonGainSwitchFlagProducer:hasGainSwitchFlag')
142 for modification
in process.slimmedElectrons.modifierConfig.modifications:
143 if modification.modifierName !=
'EGExtraInfoModifierFromIntValueMaps':
continue
144 modification.electron_config.hasGainSwitchFlag = cms.InputTag(
'ElectronGainSwitchFlagProducer:hasGainSwitchFlag')
TEveGeoShape * clone(const TEveElement *element, TEveElement *parent)