Go to the documentation of this file.00001 import FWCore.ParameterSet.Config as cms
00002
00003 def memorySavingTracking(process):
00004 toRemove={}
00005
00006
00007 trackProducers=['preFilterZeroStepTracks',
00008 'preFilterStepOneTracks',
00009 'secWithMaterialTracks',
00010 'thWithMaterialTracks',
00011 'fourthWithMaterialTracks',
00012 'fifthWithMaterialTracks',
00013 ]
00014
00015 for tp in trackProducers:
00016 m=getattr(process,tp)
00017 if hasattr(m,"clusterRemovalInfo"):
00018
00019 delattr(m,"clusterRemovalInfo")
00020
00021 measurementTrackers=['MeasurementTracker',
00022 'newMeasurementTracker',
00023 'secMeasurementTracker',
00024 'thMeasurementTracker',
00025 'fourthMeasurementTracker',
00026 'fifthMeasurementTracker',
00027 ]
00028
00029
00030
00031 for mt in measurementTrackers:
00032 es=getattr(process,mt)
00033
00034
00035
00036
00037
00038 removalModule=es.pixelClusterProducer.value()
00039
00040 if (removalModule != 'siPixelClusters'):
00041 es.skipClusters = cms.InputTag(removalModule)
00042 es.pixelClusterProducer = 'siPixelClusters'
00043 es.stripClusterProducer = 'siStripClusters'
00044
00045 tcremoval = getattr(process,removalModule)
00046
00047 tcremoval.clusterLessSolution= cms.bool(True)
00048 tcremoval.stripClusters = 'siStripClusters'
00049 tcremoval.pixelClusters = 'siPixelClusters'
00050 skipTrackQualityFilter=False
00051 if (skipTrackQualityFilter):
00052 tcremoval.TrackQuality = cms.string('highPurity')
00053
00054 toRemove[tcremoval.trajectories.value()]=True
00055 qf=getattr(process,tcremoval.trajectories.value())
00056 tcremoval.trajectories = qf.recTracks
00057
00058
00059
00060 patternRecoModules=[
00061 'fifthTrackCandidates',
00062 'fourthTrackCandidates',
00063 'newTrackCandidateMaker',
00064 'secTrackCandidates',
00065 'stepOneTrackCandidateMaker',
00066 'thTrackCandidates'
00067 ]
00068
00069 for ckfm in patternRecoModules:
00070 ckf=getattr(process,ckfm)
00071 builder=getattr(process,ckf.TrajectoryBuilder.value())
00072 mtn= builder.MeasurementTrackerName.value()
00073 if mtn!='':
00074
00075 builder.MeasurementTrackerName=''
00076 mt=getattr(process,mtn)
00077
00078 builder.clustersToSkip = mt.skipClusters
00079
00080
00081 delattr(process,mtn)
00082
00083
00084
00085
00086 for esp in process.es_producers_().keys():
00087 es = getattr(process,esp)
00088 if es._TypedParameterizable__type != 'SeedingLayersESProducer':
00089 continue
00090 for pm in es.parameters_().keys():
00091 p=getattr(es,pm)
00092 if p.pythonTypeName() == 'cms.PSet':
00093 if hasattr(p,'HitProducer'):
00094
00095
00096 if p.HitProducer != 'siPixelRecHits':
00097 toRemove[p.HitProducer.value()]=True
00098 skip=getattr(process,p.HitProducer.value()).src
00099 p.HitProducer = 'siPixelRecHits'
00100
00101 p.skipClusters = cms.InputTag(skip.value())
00102
00103
00104
00105 if hasattr(p,'matchedRecHits'):
00106
00107
00108
00109 if p.matchedRecHits.moduleLabel != 'siStripMatchedRecHits':
00110 toRemove[p.matchedRecHits.moduleLabel]=True
00111 skip=getattr(process,p.matchedRecHits.moduleLabel).ClusterProducer
00112 p.matchedRecHits.setModuleLabel('siStripMatchedRecHits')
00113
00114 p.skipClusters = cms.InputTag(skip.value())
00115
00116
00117
00118 for edp in process.producers_():
00119 p=getattr(process,edp)
00120 if hasattr(p,'ClusterCheckPSet'):
00121
00122 p.ClusterCheckPSet.PixelClusterCollectionLabel = 'siPixelClusters'
00123 p.ClusterCheckPSet.ClusterCollectionLabel = 'siStripClusters'
00124
00125
00126 toRemove['secStripRecHits']=True
00127 toRemove['fourthPixelRecHits']=True
00128 toRemove['fifthPixelRecHits']=True
00129
00130 for tr in toRemove:
00131 if hasattr(process,tr):
00132
00133 process.reconstruction_step.remove(getattr(process,tr))
00134
00135 delattr(process.newCombinedSeeds,'clusterRemovalInfos')
00136
00137 return (process)
00138
00139
00140 def customiseCommon(process):
00141
00142 process = memorySavingTracking(process)
00143
00144 return (process)
00145
00146
00147
00148 def customisePPData(process):
00149 process= customiseCommon(process)
00150
00151
00152 process.particleFlowRecHitHCAL.LongShortFibre_Cut = 30.
00153 process.particleFlowRecHitHCAL.ApplyPulseDPG = True
00154
00155
00156 process.hcalRecAlgos.SeverityLevels[3].RecHitFlags.remove("HFDigiTime")
00157 process.hcalRecAlgos.SeverityLevels[4].RecHitFlags.append("HFDigiTime")
00158
00159
00160 process.CSCHaloData.ExpectedBX = cms.int32(3)
00161
00162
00163 process.hfreco.PETstat.flagsToSkip = 2
00164 process.hfreco.S8S1stat.flagsToSkip = 18
00165 process.hfreco.S9S1stat.flagsToSkip = 26
00166
00167
00168 process.ecalGlobalUncalibRecHit.doEBtimeCorrection = True
00169 process.ecalGlobalUncalibRecHit.doEEtimeCorrection = True
00170
00171 return process
00172
00173
00174
00175 def customisePPMC(process):
00176 process=customiseCommon(process)
00177
00178 return process
00179
00180
00181 def customiseCosmicData(process):
00182
00183 return process
00184
00185
00186 def customiseCosmicMC(process):
00187
00188 return process
00189
00190
00191 def customiseVALSKIM(process):
00192 process= customisePPData(process)
00193 process.reconstruction.remove(process.lumiProducer)
00194 return process
00195
00196
00197 def customiseExpress(process):
00198 process= customisePPData(process)
00199
00200 import RecoVertex.BeamSpotProducer.BeamSpotOnline_cfi
00201 process.offlineBeamSpot = RecoVertex.BeamSpotProducer.BeamSpotOnline_cfi.onlineBeamSpotProducer.clone()
00202
00203 return process
00204
00205
00206 def customisePrompt(process):
00207 process= customisePPData(process)
00208 return process
00209
00210
00211
00212
00213 def customiseCommonHI(process):
00214
00215
00216
00217
00218
00219
00220
00221 process.siStripZeroSuppression.Algorithms.CommonModeNoiseSubtractionMode = cms.string("IteratedMedian")
00222 process.siStripZeroSuppression.Algorithms.CutToAvoidSignal = cms.double(2.0)
00223 process.siStripZeroSuppression.Algorithms.Iterations = cms.int32(3)
00224 process.siStripZeroSuppression.storeCM = cms.bool(True)
00225
00226
00227
00228
00229
00230
00231
00232 return process
00233
00234
00235 def customiseExpressHI(process):
00236 process= customiseCommonHI(process)
00237
00238 import RecoVertex.BeamSpotProducer.BeamSpotOnline_cfi
00239 process.offlineBeamSpot = RecoVertex.BeamSpotProducer.BeamSpotOnline_cfi.onlineBeamSpotProducer.clone()
00240
00241 return process
00242
00243
00244 def customisePromptHI(process):
00245 process= customiseCommonHI(process)
00246
00247 import RecoVertex.BeamSpotProducer.BeamSpotOnline_cfi
00248 process.offlineBeamSpot = RecoVertex.BeamSpotProducer.BeamSpotOnline_cfi.onlineBeamSpotProducer.clone()
00249
00250 return process
00251
00252