test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Functions
customizeOldEGReco Namespace Reference

Functions

def _configurePFForGEDEGamma
 
def _customize_Digi
 
def _customize_DigiToRaw
 
def _customize_DQM
 
def _customize_FastSim
 
def _customize_harvesting
 
def _customize_HLT
 
def _customize_L1Emulator
 
def _customize_RawToDigi
 
def _customize_Reco
 
def _customize_Validation
 
def customizeOldEGReco
 

Function Documentation

def customizeOldEGReco._configurePFForGEDEGamma (   process)
private

Definition at line 52 of file customizeOldEGReco.py.

Referenced by _customize_FastSim(), and _customize_Reco().

52 
53 def _configurePFForGEDEGamma(process):
54  #fix a few things in the GED from the mass-replace
55  process.gedGsfElectronsTmp.gsfElectronCoresTag = cms.InputTag('gedGsfElectronCores')
56  process.particleBasedIsolation.electronProducer = cms.InputTag("gedGsfElectrons")
57  process.gedPhotonsTmp.photonProducer = cms.InputTag('gedPhotonCore')
58  process.particleBasedIsolation.photonProducer = cms.InputTag("gedPhotons")
59 
60  process.gedPhotonsTmp.candidateP4type = cms.string('fromEcalEnergy')
61  process.gedPhotons.candidateP4type = cms.string('fromEcalEnergy')
62 
63  process.gedGsfElectronsTmp.useEcalRegression = cms.bool(False)
64  process.gedGsfElectronsTmp.useCombinationRegression = cms.bool(False)
65 
66  #for later
67  process.particleFlowBlock.SCBarrel = cms.InputTag('correctedHybridSuperClusters')
68  process.particleFlowBlock.SCEndcap = cms.InputTag('correctedMulti5x5SuperClustersWithPreshower')
69  process.particleFlowBlock.SuperClusterMatchByRef = cms.bool(False)
70  #add in conversions
71  ## for PF
72 
73  process.allConversionSequence += process.allConversionOldEGSequence
74  process.pfConversions.conversionCollection = cms.InputTag('allConversionsOldEG')
75  process.photons.conversionProducer = cms.InputTag('oldegConversions')
76  #return to old EG-based conversions based reco::Photon
77  process.ckfTracksFromConversions += process.ckfTracksFromOldEGConversions
78  process.conversionTrackProducers += process.oldegConversionTrackProducers
79  process.conversionTrackMergers += process.oldegConversionTrackMergers
80  if hasattr(process,'conversionSequence'):
81  process.conversionSequence += process.oldegConversionSequence
82  process.photonSequence.remove(process.mustachePhotonSequence)
83  process.particleFlowBlock.EGPhotons = cms.InputTag('photons')
84  process.particleFlowBlock.PhotonSelectionCuts = cms.vdouble(1,10,2.0, 0.001, 4.2, 0.003, 2.2, 0.001, 0.05, 10.0, 0.10)
85  #tell PFProducer to use old PF electron / PF photon code
86  process.particleFlowTmp.useEGammaFilters = cms.bool(False)
87  process.particleFlowTmp.usePFPhotons = cms.bool(True)
88  process.particleFlowTmp.usePFElectrons = cms.bool(True)
89  process.particleFlowTmp.sumPtTrackIso = cms.double(2.0)
90  process.particleFlowTmp.photon_HoE = cms.double(0.10)
91 
92  #re-route PF linker to use old EG collections
93  process.particleFlow.GsfElectrons = cms.InputTag('gsfElectrons')
94  process.particleFlow.Photons = cms.InputTag('pfPhotonTranslator:pfphot')
95  return process
96 
97 
def customizeOldEGReco._customize_Digi (   process)
private

Definition at line 160 of file customizeOldEGReco.py.

Referenced by customizeOldEGReco().

161 def _customize_Digi(process):
162  return process
163 
def customizeOldEGReco._customize_DigiToRaw (   process)
private

Definition at line 172 of file customizeOldEGReco.py.

Referenced by customizeOldEGReco().

173 def _customize_DigiToRaw(process):
174  return process
175 
def customizeOldEGReco._customize_DQM (   process)
private

Definition at line 98 of file customizeOldEGReco.py.

Referenced by customizeOldEGReco().

98 
99 def _customize_DQM(process):
100  try:
101  process.ecalBarrelClusterTask.SuperClusterCollection = cms.InputTag("correctedHybridSuperClusters")
102  process.ecalBarrelClusterTask.BasicClusterCollection = cms.InputTag("hybridSuperClusters","hybridBarrelBasicClusters")
103  process.ecalEndcapClusterTask.SuperClusterCollection = cms.InputTag("multi5x5SuperClusters","multi5x5EndcapSuperClusters")
104  process.ecalEndcapClusterTask.BasicClusterCollection = cms.InputTag("multi5x5SuperClusters","multi5x5EndcapBasicClusters")
105  except AttributeError:
106  pass
107  try:
108  process.ecalBarrelClusterTaskExtras.SuperClusterCollection = cms.InputTag("correctedHybridSuperClusters")
109  process.ecalEndcapClusterTaskExtras.SuperClusterCollection = cms.InputTag("multi5x5SuperClusters","multi5x5EndcapSuperClusters")
110  except AttributeError:
111  pass
112  try:
113  process.ecalBarrelRecoSummary.superClusterCollection_EB = cms.InputTag("correctedHybridSuperClusters")
114  process.ecalBarrelRecoSummary.basicClusterCollection_EB = cms.InputTag("hybridSuperClusters","hybridBarrelBasicClusters")
115  process.ecalEndcapRecoSummary.superClusterCollection_EE = cms.InputTag("correctedMulti5x5SuperClustersWithPreshower")
116  process.ecalEndcapRecoSummary.basicClusterCollection_EE = cms.InputTag("multi5x5SuperClusters","multi5x5EndcapBasicClusters")
117  except AttributeError:
118  pass
119 
120  return process
121 
def customizeOldEGReco._customize_FastSim (   process)
private

Definition at line 179 of file customizeOldEGReco.py.

References _configurePFForGEDEGamma().

Referenced by customizeOldEGReco().

180 def _customize_FastSim(process):
181  process=_configurePFForGEDEGamma(process)
182  process.egammaHighLevelRecoPostPF.insert(0,process.gsfElectronMergingSequence)
183  process.famosParticleFlowSequence.insert(8,process.pfPhotonTranslatorSequence)
184  process.famosParticleFlowSequence.insert(8,process.pfElectronTranslatorSequence)
185 
186  process.reducedEcalRecHitsES.interestingDetIds = cms.VInputTag()
187  process.reducedEcalRecHitsSequence.remove(process.interestingEcalDetIdPFEB)
188  process.reducedEcalRecHitsSequence.remove(process.interestingEcalDetIdPFEE)
189  process.reducedEcalRecHitsSequence.remove(process.interestingEcalDetIdPFES)
190  process.reducedEcalRecHitsSequence.remove(process.interestingEcalDetIdRefinedEB)
191  process.reducedEcalRecHitsSequence.remove(process.interestingEcalDetIdRefinedEE)
192  process.reducedEcalRecHitsSequence.remove(process.interestingEcalDetIdRefinedES)
193 
194  process.interestingGedEleIsoDetIdEB.emObjectLabel = cms.InputTag('gsfElectrons')
195  process.interestingGedEleIsoDetIdEE.emObjectLabel = cms.InputTag('gsfElectrons')
196  process.interestingEgammaIsoDetIds.remove(process.interestingGedGamIsoDetIdEB)
197  process.interestingEgammaIsoDetIds.remove(process.interestingGedGamIsoDetIdEE)
198 
199  process.reducedEcalRecHitsEB.interestingDetIdCollections = cms.VInputTag(
200  # ecal
201  cms.InputTag("interestingEcalDetIdEB"),
202  cms.InputTag("interestingEcalDetIdEBU"),
203  # egamma
204  cms.InputTag("interestingGedEleIsoDetIdEB"),
205  cms.InputTag("interestingGamIsoDetIdEB"),
206  # tau
207  #cms.InputTag("caloRecoTauProducer"),
208  #pf
209  cms.InputTag("pfElectronInterestingEcalDetIdEB"),
210  cms.InputTag("pfPhotonInterestingEcalDetIdEB"),
211  # muons
212  cms.InputTag("muonEcalDetIds"),
213  # high pt tracks
214  cms.InputTag("interestingTrackEcalDetIds")
215  )
216  process.reducedEcalRecHitsEE.interestingDetIdCollections = cms.VInputTag(
217  # ecal
218  cms.InputTag("interestingEcalDetIdEE"),
219  # egamma
220  cms.InputTag("interestingGedEleIsoDetIdEE"),
221  cms.InputTag("interestingGamIsoDetIdEE"),
222  # tau
223  #cms.InputTag("caloRecoTauProducer"),
224  #pf
225  cms.InputTag("pfElectronInterestingEcalDetIdEE"),
226  cms.InputTag("pfPhotonInterestingEcalDetIdEE"),
227  # muons
228  cms.InputTag("muonEcalDetIds"),
229  # high pt tracks
230  cms.InputTag("interestingTrackEcalDetIds")
231  )
232  process.allConversionsOldEG.src = cms.InputTag('gsfGeneralConversionTrackMerger')
233 
234  if hasattr(process,'ecalDrivenElectronSeeds'):
235  process.ecalDrivenElectronSeeds.barrelSuperClusters = cms.InputTag('correctedHybridSuperClusters')
236  process.ecalDrivenElectronSeeds.endcapSuperClusters = cms.InputTag('correctedMulti5x5SuperClustersWithPreshower')
237  process.ecalDrivenElectronSeeds.SeedConfiguration.ecalDrivenElectronSeedsParameters.SCEtCut = 4.0
238  return process
239 
def customizeOldEGReco._customize_harvesting (   process)
private

Definition at line 299 of file customizeOldEGReco.py.

Referenced by customizeOldEGReco().

300 def _customize_harvesting(process):
301  if hasattr(process,'oldpfPhotonPostprocessing'):
302  process.photonPostProcessor += process.oldpfPhotonPostprocessing
303  return process
def customizeOldEGReco._customize_HLT (   process)
private

Definition at line 176 of file customizeOldEGReco.py.

Referenced by customizeOldEGReco().

177 def _customize_HLT(process):
178  return process
def customizeOldEGReco._customize_L1Emulator (   process)
private

Definition at line 164 of file customizeOldEGReco.py.

Referenced by customizeOldEGReco().

165 def _customize_L1Emulator(process):
166  return process
167 
def customizeOldEGReco._customize_RawToDigi (   process)
private

Definition at line 168 of file customizeOldEGReco.py.

Referenced by customizeOldEGReco().

169 def _customize_RawToDigi(process):
170  return process
171 
def customizeOldEGReco._customize_Reco (   process)
private

Definition at line 240 of file customizeOldEGReco.py.

References _configurePFForGEDEGamma().

Referenced by customizeOldEGReco().

241 def _customize_Reco(process):
242  process=_configurePFForGEDEGamma(process)
243  process.egammaHighLevelRecoPostPF.insert(0,process.gsfElectronMergingSequence)
244  process.particleFlowReco.insert(8,process.pfPhotonTranslatorSequence)
245  process.particleFlowReco.insert(8,process.pfElectronTranslatorSequence)
246 
247  process.reducedEcalRecHitsES.interestingDetIds = cms.VInputTag()
248  process.reducedEcalRecHitsSequence.remove(process.interestingEcalDetIdPFEB)
249  process.reducedEcalRecHitsSequence.remove(process.interestingEcalDetIdPFEE)
250  process.reducedEcalRecHitsSequence.remove(process.interestingEcalDetIdPFES)
251  process.reducedEcalRecHitsSequence.remove(process.interestingEcalDetIdRefinedEB)
252  process.reducedEcalRecHitsSequence.remove(process.interestingEcalDetIdRefinedEE)
253  process.reducedEcalRecHitsSequence.remove(process.interestingEcalDetIdRefinedES)
254 
255  process.interestingGedEleIsoDetIdEB.emObjectLabel = cms.InputTag('gsfElectrons')
256  process.interestingGedEleIsoDetIdEE.emObjectLabel = cms.InputTag('gsfElectrons')
257  process.interestingEgammaIsoDetIds.remove(process.interestingGedGamIsoDetIdEB)
258  process.interestingEgammaIsoDetIds.remove(process.interestingGedGamIsoDetIdEE)
259 
260  process.reducedEcalRecHitsEB.interestingDetIdCollections = cms.VInputTag(
261  # ecal
262  cms.InputTag("interestingEcalDetIdEB"),
263  cms.InputTag("interestingEcalDetIdEBU"),
264  # egamma
265  cms.InputTag("interestingGedEleIsoDetIdEB"),
266  cms.InputTag("interestingGamIsoDetIdEB"),
267  # tau
268  #cms.InputTag("caloRecoTauProducer"),
269  #pf
270  cms.InputTag("pfElectronInterestingEcalDetIdEB"),
271  cms.InputTag("pfPhotonInterestingEcalDetIdEB"),
272  # muons
273  cms.InputTag("muonEcalDetIds"),
274  # high pt tracks
275  cms.InputTag("interestingTrackEcalDetIds")
276  )
277  process.reducedEcalRecHitsEE.interestingDetIdCollections = cms.VInputTag(
278  # ecal
279  cms.InputTag("interestingEcalDetIdEE"),
280  # egamma
281  cms.InputTag("interestingGedEleIsoDetIdEE"),
282  cms.InputTag("interestingGamIsoDetIdEE"),
283  # tau
284  #cms.InputTag("caloRecoTauProducer"),
285  #pf
286  cms.InputTag("pfElectronInterestingEcalDetIdEE"),
287  cms.InputTag("pfPhotonInterestingEcalDetIdEE"),
288  # muons
289  cms.InputTag("muonEcalDetIds"),
290  # high pt tracks
291  cms.InputTag("interestingTrackEcalDetIds")
292  )
293 
294  if hasattr(process,'ecalDrivenElectronSeeds'):
295  process.ecalDrivenElectronSeeds.barrelSuperClusters = cms.InputTag('correctedHybridSuperClusters')
296  process.ecalDrivenElectronSeeds.endcapSuperClusters = cms.InputTag('correctedMulti5x5SuperClustersWithPreshower')
297  return process
298 
def customizeOldEGReco._customize_Validation (   process)
private

Definition at line 122 of file customizeOldEGReco.py.

Referenced by customizeOldEGReco().

123 def _customize_Validation(process):
124  _replaceTags(process.validation_step,
125  cms.InputTag('gedGsfElectrons'),
126  cms.InputTag('gsfElectrons'),
127  skipLabelTest=True)
128  _replaceTags(process.validation_step,
129  cms.InputTag('gedGsfElectronCores'),
130  cms.InputTag('gsfElectronCores'),
131  skipLabelTest=True)
132  #don't ask... just don't ask
133  if hasattr(process,'HLTSusyExoValFastSim'):
134  process.HLTSusyExoValFastSim.PlotMakerRecoInput.electrons = \
135  cms.string('gsfElectrons')
136  for pset in process.HLTSusyExoValFastSim.reco_parametersets:
137  pset.electrons = cms.string('gsfElectrons')
138  if hasattr(process,'HLTSusyExoVal'):
139  process.HLTSusyExoVal.PlotMakerRecoInput.electrons = \
140  cms.string('gsfElectrons')
141  for pset in process.HLTSusyExoVal.reco_parametersets:
142  pset.electrons = cms.string('gsfElectrons')
143  if hasattr(process,'hltHiggsValidator'):
144  process.hltHiggsValidator.H2tau.recElecLabel = \
145  cms.string('gsfElectrons')
146  process.hltHiggsValidator.HZZ.recElecLabel = \
147  cms.string('gsfElectrons')
148  process.hltHiggsValidator.HWW.recElecLabel = \
149  cms.string('gsfElectrons')
150  if hasattr(process,'oldpfPhotonValidation'):
151  process.photonValidationSequence += process.oldpfPhotonValidation
152  process.oldpfPhotonValidation.conversionIOTrackProducer = cms.string('ckfInOutTracksFromOldEGConversions')
153  process.oldpfPhotonValidation.conversionOITrackProducer = cms.string('ckfOutInTracksFromOldEGConversions')
154  process.photonValidation.phoProducer = cms.string('photons')
155  process.photonValidation.conversionIOTrackProducer = cms.string('ckfInOutTracksFromOldEGConversions')
156  process.photonValidation.conversionOITrackProducer = cms.string('ckfOutInTracksFromOldEGConversions')
157  process.tkConversionValidation.convProducer = cms.string('allConversionsOldEG')
158  return process
159 
def customizeOldEGReco.customizeOldEGReco (   process)

Definition at line 5 of file customizeOldEGReco.py.

References _customize_Digi(), _customize_DigiToRaw(), _customize_DQM(), _customize_FastSim(), _customize_harvesting(), _customize_HLT(), _customize_L1Emulator(), _customize_RawToDigi(), _customize_Reco(), and _customize_Validation().

5 
6 def customizeOldEGReco(process):
7  for path in process.paths:
8  sequences = getattr(process,path)
9  #for seq in path:
10  _replaceTags(sequences,
11  cms.InputTag('gedGsfElectrons'),
12  cms.InputTag('gsfElectrons'),
13  skipLabelTest=True)
14  _replaceTags(sequences,
15  cms.InputTag('gedGsfElectronCores'),
16  cms.InputTag('gsfElectronCores'),
17  skipLabelTest=True)
18  #for seq in path:
19  _replaceTags(sequences,
20  cms.InputTag('gedPhotons'),
21  cms.InputTag('photons'),
22  skipLabelTest=True)
23  _replaceTags(sequences,
24  cms.InputTag('gedPhotonCore'),
25  cms.InputTag('photonCore'),
26  skipLabelTest=True)
27 
28  # all the rest:
29  if hasattr(process,'DigiToRaw'):
30  process=_customize_DigiToRaw(process)
31  if hasattr(process,'RawToDigi'):
32  process=_customize_RawToDigi(process)
33  if hasattr(process,'reconstruction'):
34  process=_customize_Reco(process)
35  if hasattr(process,'reconstructionWithFamos'):
36  process=_customize_FastSim(process)
37  if hasattr(process,'digitisation_step'):
38  process=_customize_Digi(process)
39  if hasattr(process,'HLTSchedule'):
40  process=_customize_HLT(process)
41  if hasattr(process,'L1simulation_step'):
42  process=_customize_L1Emulator(process)
43  if hasattr(process,'dqmoffline_step'):
44  process=_customize_DQM(process)
45  if hasattr(process,'dqmHarvesting'):
46  process=_customize_harvesting(process)
47  if hasattr(process,'validation_step'):
48  process=_customize_Validation(process)
49 
50 
51  return process