CMS 3D CMS Logo

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

Functions

def add_detailed_pixel_dqm
 
def customise
 
def customise_condOverRides
 
def customise_Digi
 
def customise_DigiToRaw
 
def customise_DQM
 
def customise_harvesting
 
def customise_RawToDigi
 
def customise_Reco
 
def customise_Validation
 
def customise_Validation_Trackingonly
 
def remove_pixel_ineff
 

Function Documentation

def phase1TkCustoms.add_detailed_pixel_dqm (   process)

Definition at line 160 of file phase1TkCustoms.py.

161 def add_detailed_pixel_dqm(process):
162  #enable modOn
163  process.SiPixelRawDataErrorSource.modOn = cms.untracked.bool(True)
164  process.SiPixelDigiSource.modOn = cms.untracked.bool(True)
165  process.SiPixelClusterSource.modOn = cms.untracked.bool(True)
166  process.SiPixelRecHitSource.modOn = cms.untracked.bool(True)
167  process.SiPixelTrackResidualSource.modOn = cms.untracked.bool(True)
168  process.SiPixelHitEfficiencySource.modOn = cms.untracked.bool(True)
169 
170  return process
171 
def phase1TkCustoms.customise (   process)

Definition at line 7 of file phase1TkCustoms.py.

References customise_condOverRides(), customise_Digi(), customise_DigiToRaw(), customise_DQM(), customise_harvesting(), customise_RawToDigi(), customise_Reco(), and customise_Validation().

7 
8 def customise(process):
9  if hasattr(process,'DigiToRaw'):
10  process=customise_DigiToRaw(process)
11  if hasattr(process,'RawToDigi'):
12  process=customise_RawToDigi(process)
13  n=0
14  if hasattr(process,'reconstruction') or hasattr(process,'dqmoffline_step'):
15  if hasattr(process,'mix'):
16  if hasattr(process.mix,'input'):
17  n=process.mix.input.nbPileupEvents.averageNumber.value()
18  else:
19  print 'phase1TkCustoms requires a --pileup option to cmsDriver to run the reconstruction/dqm'
20  print 'Please provide one!'
21  sys.exit(1)
22  if hasattr(process,'reconstruction'):
23  process=customise_Reco(process,float(n))
24 
25  if hasattr(process,'digitisation_step'):
26  process=customise_Digi(process)
27  if hasattr(process,'dqmoffline_step'):
28  process=customise_DQM(process,n)
29  if hasattr(process,'dqmHarvesting'):
30  process=customise_harvesting(process)
31  if hasattr(process,'validation_step'):
32  process=customise_Validation(process)
33  process=customise_condOverRides(process)
34 
35  return process
def phase1TkCustoms.customise_condOverRides (   process)

Definition at line 146 of file phase1TkCustoms.py.

Referenced by customise().

147 def customise_condOverRides(process):
148 # process.trackerTopologyConstants.pxb_layerStartBit = cms.uint32(20)
149 # process.trackerTopologyConstants.pxb_ladderStartBit = cms.uint32(12)
150 # process.trackerTopologyConstants.pxb_moduleStartBit = cms.uint32(2)
151 # process.trackerTopologyConstants.pxb_layerMask = cms.uint32(15)
152 # process.trackerTopologyConstants.pxb_ladderMask = cms.uint32(255)
153 # process.trackerTopologyConstants.pxb_moduleMask = cms.uint32(1023)
154 # process.trackerTopologyConstants.pxf_diskStartBit = cms.uint32(18)
155 # process.trackerTopologyConstants.pxf_bladeStartBit = cms.uint32(12)
156 # process.trackerTopologyConstants.pxf_panelStartBit = cms.uint32(10)
157 # process.trackerTopologyConstants.pxf_moduleMask = cms.uint32(255)
158  process.load('SLHCUpgradeSimulations.Geometry.fakeConditions_Phase1_cff')
159  return process
def phase1TkCustoms.customise_Digi (   process)

Definition at line 46 of file phase1TkCustoms.py.

References customise_mixing.customise_pixelMixing_PU().

Referenced by customise().

46 
47 def customise_Digi(process):
48  process.mix.digitizers.pixel.MissCalibrate = False
49  process.mix.digitizers.pixel.LorentzAngle_DB = False
50  process.mix.digitizers.pixel.killModules = False
51  process.mix.digitizers.pixel.useDB = False
52  process.mix.digitizers.pixel.DeadModules_DB = False
53  process.mix.digitizers.pixel.NumPixelBarrel = cms.int32(4)
54  process.mix.digitizers.pixel.NumPixelEndcap = cms.int32(3)
55  process.mix.digitizers.pixel.ThresholdInElectrons_FPix = cms.double(2000.0)
56  process.mix.digitizers.pixel.ThresholdInElectrons_BPix = cms.double(2000.0)
57  process.mix.digitizers.pixel.ThresholdInElectrons_BPix_L1 = cms.double(2000.0)
58  process.mix.digitizers.pixel.thePixelColEfficiency_BPix1 = cms.double(0.999)
59  process.mix.digitizers.pixel.thePixelColEfficiency_BPix2 = cms.double(0.999)
60  process.mix.digitizers.pixel.thePixelColEfficiency_BPix3 = cms.double(0.999)
61  process.mix.digitizers.pixel.thePixelColEfficiency_BPix4 = cms.double(0.999)
62  process.mix.digitizers.pixel.thePixelEfficiency_BPix1 = cms.double(0.999)
63  process.mix.digitizers.pixel.thePixelEfficiency_BPix2 = cms.double(0.999)
64  process.mix.digitizers.pixel.thePixelEfficiency_BPix3 = cms.double(0.999)
65  process.mix.digitizers.pixel.thePixelEfficiency_BPix4 = cms.double(0.999)
66  process.mix.digitizers.pixel.thePixelChipEfficiency_BPix1 = cms.double(0.999)
67  process.mix.digitizers.pixel.thePixelChipEfficiency_BPix2 = cms.double(0.999)
68  process.mix.digitizers.pixel.thePixelChipEfficiency_BPix3 = cms.double(0.999)
69  process.mix.digitizers.pixel.thePixelChipEfficiency_BPix4 = cms.double(0.999)
70  process.mix.digitizers.pixel.thePixelColEfficiency_FPix1 = cms.double(0.999)
71  process.mix.digitizers.pixel.thePixelColEfficiency_FPix2 = cms.double(0.999)
72  process.mix.digitizers.pixel.thePixelColEfficiency_FPix3 = cms.double(0.999)
73  process.mix.digitizers.pixel.thePixelEfficiency_FPix1 = cms.double(0.999)
74  process.mix.digitizers.pixel.thePixelEfficiency_FPix2 = cms.double(0.999)
75  process.mix.digitizers.pixel.thePixelEfficiency_FPix3 = cms.double(0.999)
76  process.mix.digitizers.pixel.thePixelChipEfficiency_FPix1 = cms.double(0.999)
77  process.mix.digitizers.pixel.thePixelChipEfficiency_FPix2 = cms.double(0.999)
78  process.mix.digitizers.pixel.thePixelChipEfficiency_FPix3 = cms.double(0.999)
79  process.mix.digitizers.pixel.AddPixelInefficiency = cms.bool(True)
80 
81  process=customise_pixelMixing_PU(process)
82  return process
83 
84 
# DQM steps change
def phase1TkCustoms.customise_DigiToRaw (   process)

Definition at line 36 of file phase1TkCustoms.py.

Referenced by customise().

36 
37 def customise_DigiToRaw(process):
38  process.digi2raw_step.remove(process.siPixelRawData)
39  process.digi2raw_step.remove(process.castorRawData)
40  return process
def phase1TkCustoms.customise_DQM (   process,
  pileup 
)

Definition at line 85 of file phase1TkCustoms.py.

References customizeTrackingMonitorSeedNumber.customise_trackMon_IterativeTracking_PHASE1PU140(), and customizeTrackingMonitorSeedNumber.customise_trackMon_IterativeTracking_PHASE1PU70().

Referenced by customise().

85 
86 def customise_DQM(process,pileup):
87  # We cut down the number of iterative tracking steps
88  process.dqmoffline_step.remove(process.muonAnalyzer)
89  #process.dqmoffline_step.remove(process.jetMETAnalyzer)
90 
91  #put isUpgrade flag==true
92  process.SiPixelRawDataErrorSource.isUpgrade = cms.untracked.bool(True)
93  process.SiPixelDigiSource.isUpgrade = cms.untracked.bool(True)
94  process.SiPixelClusterSource.isUpgrade = cms.untracked.bool(True)
95  process.SiPixelRecHitSource.isUpgrade = cms.untracked.bool(True)
96  process.SiPixelTrackResidualSource.isUpgrade = cms.untracked.bool(True)
97  process.SiPixelHitEfficiencySource.isUpgrade = cms.untracked.bool(True)
98 
99  from DQM.TrackingMonitor.customizeTrackingMonitorSeedNumber import customise_trackMon_IterativeTracking_PHASE1PU140
100  from DQM.TrackingMonitor.customizeTrackingMonitorSeedNumber import customise_trackMon_IterativeTracking_PHASE1PU70
101 
102  if pileup>100:
104  else:
106  return process
def phase1TkCustoms.customise_harvesting (   process)

Definition at line 138 of file phase1TkCustoms.py.

Referenced by customise().

139 def customise_harvesting(process):
140  process.dqmHarvesting.remove(process.jetMETDQMOfflineClient)
141  process.dqmHarvesting.remove(process.dataCertificationJetMET)
142  #######process.dqmHarvesting.remove(process.sipixelEDAClient)
143  process.sipixelEDAClient.isUpgrade = cms.untracked.bool(True)
144  process.dqmHarvesting.remove(process.sipixelCertification)
145  return (process)
def phase1TkCustoms.customise_RawToDigi (   process)

Definition at line 41 of file phase1TkCustoms.py.

Referenced by customise().

41 
42 def customise_RawToDigi(process):
43  process.raw2digi_step.remove(process.siPixelDigis)
44  process.raw2digi_step.remove(process.castorDigis)
45  return process
def phase1TkCustoms.customise_Reco (   process,
  pileup 
)

Definition at line 179 of file phase1TkCustoms.py.

Referenced by customise().

180 def customise_Reco(process,pileup):
181 
182  #this code supports either 70 or 140 pileup configurations - should fix as to support 0
183  nPU=70
184  if pileup>100: nPU=140
185 
186  #use with latest pixel geometry
187  process.ClusterShapeHitFilterESProducer.PixelShapeFile = cms.string('RecoPixelVertexing/PixelLowPtUtilities/data/pixelShape_Phase1Tk.par')
188  # Need this line to stop error about missing siPixelDigis.
189  process.MeasurementTracker.inactivePixelDetectorLabels = cms.VInputTag()
190 
191  # new layer list (3/4 pixel seeding) in InitialStep and pixelTracks
192  process.PixelLayerTriplets.layerList = cms.vstring( 'BPix1+BPix2+BPix3',
193  'BPix2+BPix3+BPix4',
194  'BPix1+BPix3+BPix4',
195  'BPix1+BPix2+BPix4',
196  'BPix2+BPix3+FPix1_pos',
197  'BPix2+BPix3+FPix1_neg',
198  'BPix1+BPix2+FPix1_pos',
199  'BPix1+BPix2+FPix1_neg',
200  'BPix2+FPix1_pos+FPix2_pos',
201  'BPix2+FPix1_neg+FPix2_neg',
202  'BPix1+FPix1_pos+FPix2_pos',
203  'BPix1+FPix1_neg+FPix2_neg',
204  'FPix1_pos+FPix2_pos+FPix3_pos',
205  'FPix1_neg+FPix2_neg+FPix3_neg' )
206 
207  # New tracking. This is really ugly because it redefines globalreco and reconstruction.
208  # It can be removed if change one line in Configuration/StandardSequences/python/Reconstruction_cff.py
209  # from RecoTracker_cff.py to RecoTrackerPhase1PU140_cff.py
210 
211  # remove all the tracking first
212  itIndex=process.globalreco.index(process.trackingGlobalReco)
213  grIndex=process.reconstruction.index(process.globalreco)
214 
215  process.reconstruction.remove(process.globalreco)
216  process.globalreco.remove(process.iterTracking)
217  process.globalreco.remove(process.electronSeedsSeq)
218  process.reconstruction_fromRECO.remove(process.trackingGlobalReco)
219  process.reconstruction_fromRECO.remove(process.electronSeedsSeq)
220  process.reconstruction_fromRECO.remove(process.initialStepSeedLayers)
221  process.reconstruction_fromRECO.remove(process.initialStepSeeds)
222  process.reconstruction_fromRECO.remove(process.initialStepSelector)
223  process.reconstruction_fromRECO.remove(initialStepTrackCandidates)
224  process.reconstruction_fromRECO.remove(initialStepTracks)
225  process.reconstruction_fromRECO.remove(lowPtTripletStepClusters)
226  process.reconstruction_fromRECO.remove(lowPtTripletStepSeedLayers)
227  process.reconstruction_fromRECO.remove(lowPtTripletStepSeeds)
228  process.reconstruction_fromRECO.remove(lowPtTripletStepSelector)
229  process.reconstruction_fromRECO.remove(lowPtTripletStepTrackCandidates)
230  process.reconstruction_fromRECO.remove(lowPtTripletStepTracks)
231 
232  process.reconstruction_fromRECO.remove(mixedTripletStep)
233  process.reconstruction_fromRECO.remove(mixedTripletStepClusters)
234  process.reconstruction_fromRECO.remove(mixedTripletStepSeedLayersA)
235  process.reconstruction_fromRECO.remove(mixedTripletStepSeedLayersB)
236  process.reconstruction_fromRECO.remove(mixedTripletStepSeeds)
237  process.reconstruction_fromRECO.remove(mixedTripletStepSeedsA)
238  process.reconstruction_fromRECO.remove(mixedTripletStepSeedsB)
239  process.reconstruction_fromRECO.remove(mixedTripletStepSelector)
240  process.reconstruction_fromRECO.remove(mixedTripletStepTrackCandidates)
241  process.reconstruction_fromRECO.remove(mixedTripletStepTracks)
242 
243  process.reconstruction_fromRECO.remove(pixelPairStepClusters)
244  process.reconstruction_fromRECO.remove(pixelPairStepSeeds)
245  process.reconstruction_fromRECO.remove(pixelPairStepSeedLayers)
246  process.reconstruction_fromRECO.remove(pixelPairStepSelector)
247  process.reconstruction_fromRECO.remove(pixelPairStepTrackCandidates)
248  process.reconstruction_fromRECO.remove(pixelPairStepTracks)
249 
250  process.reconstruction_fromRECO.remove(tobTecStepClusters)
251  process.reconstruction_fromRECO.remove(tobTecStepSeeds)
252  #process.reconstruction_fromRECO.remove(tobTecStepSeedLayers)
253  process.reconstruction_fromRECO.remove(tobTecStepSelector)
254  process.reconstruction_fromRECO.remove(tobTecStepTrackCandidates)
255  process.reconstruction_fromRECO.remove(tobTecStepTracks)
256 
257  process.reconstruction_fromRECO.remove(process.convClusters)
258  process.reconstruction_fromRECO.remove(process.convLayerPairs)
259  process.reconstruction_fromRECO.remove(process.convStepSelector)
260  process.reconstruction_fromRECO.remove(process.convTrackCandidates)
261  process.reconstruction_fromRECO.remove(process.convStepTracks)
262  process.reconstruction_fromRECO.remove(process.photonConvTrajSeedFromSingleLeg)
263 
264  # Needed to make the loading of recoFromSimDigis_cff below to work
265  process.InitialStepPreSplitting.remove(siPixelClusters)
266 
267  del process.iterTracking
268  del process.ckftracks
269  del process.ckftracks_woBH
270  del process.ckftracks_wodEdX
271  del process.ckftracks_plus_pixelless
272  del process.trackingGlobalReco
273  del process.electronSeedsSeq
274  del process.InitialStep
275  del process.LowPtTripletStep
276  del process.PixelPairStep
277  del process.DetachedTripletStep
278  del process.MixedTripletStep
279  del process.PixelLessStep
280  del process.TobTecStep
281  del process.earlyGeneralTracks
282  del process.ConvStep
283  # add the correct tracking back in
284  process.load("RecoTracker.Configuration.RecoTrackerPhase1PU"+str(nPU)+"_cff")
285 
286  process.globalreco.insert(itIndex,process.trackingGlobalReco)
287  process.reconstruction.insert(grIndex,process.globalreco)
288  #Note process.reconstruction_fromRECO is broken
289 
290  # End of new tracking configuration which can be removed if new Reconstruction is used.
291 
292 
293  process.reconstruction.remove(process.castorreco)
294  process.reconstruction.remove(process.CastorTowerReco)
295  #process.reconstruction.remove(process.ak7BasicJets)
296  #process.reconstruction.remove(process.ak7CastorJetID)
297 
298  #the quadruplet merger configuration
299  process.load("RecoPixelVertexing.PixelTriplets.quadrupletseedmerging_cff")
300  process.PixelSeedMergerQuadruplets.BPix.TTRHBuilder = cms.string("PixelTTRHBuilderWithoutAngle" )
301  process.PixelSeedMergerQuadruplets.BPix.HitProducer = cms.string("siPixelRecHits" )
302  process.PixelSeedMergerQuadruplets.FPix.TTRHBuilder = cms.string("PixelTTRHBuilderWithoutAngle" )
303  process.PixelSeedMergerQuadruplets.FPix.HitProducer = cms.string("siPixelRecHits" )
304 
305  # Need these until pixel templates are used
306  process.load("SLHCUpgradeSimulations.Geometry.recoFromSimDigis_cff")
307  # PixelCPEGeneric #
308  process.PixelCPEGenericESProducer.Upgrade = cms.bool(True)
309  process.PixelCPEGenericESProducer.UseErrorsFromTemplates = cms.bool(False)
310  process.PixelCPEGenericESProducer.LoadTemplatesFromDB = cms.bool(False)
311  process.PixelCPEGenericESProducer.TruncatePixelCharge = cms.bool(False)
312  process.PixelCPEGenericESProducer.IrradiationBiasCorrection = False
313  process.PixelCPEGenericESProducer.DoCosmics = False
314  # CPE for other steps
315  process.siPixelRecHits.CPE = cms.string('PixelCPEGeneric')
316  # Turn of template use in tracking (iterative steps handled inside their configs)
317  process.mergedDuplicateTracks.TTRHBuilder = 'WithTrackAngle'
318  process.ctfWithMaterialTracks.TTRHBuilder = 'WithTrackAngle'
319  process.muonSeededSeedsInOut.TrackerRecHitBuilder=cms.string('WithTrackAngle')
320  process.muonSeededTracksInOut.TTRHBuilder=cms.string('WithTrackAngle')
321  process.muonSeededTracksOutIn.TTRHBuilder=cms.string('WithTrackAngle')
322  process.muons1stStep.TrackerKinkFinderParameters.TrackerRecHitBuilder=cms.string('WithTrackAngle')
323  process.regionalCosmicTracks.TTRHBuilder=cms.string('WithTrackAngle')
324  process.cosmicsVetoTracksRaw.TTRHBuilder=cms.string('WithTrackAngle')
325  # End of pixel template needed section
326 
327  # Remove, for now, the pre-cluster-splitting clustering step
328  # To be enabled later together with or after the jet core step is enabled
329  # This snippet must be after the loading of recoFromSimDigis_cff
330  process.pixeltrackerlocalreco = cms.Sequence(
331  process.siPixelClusters +
332  process.siPixelRecHits
333  )
334  process.clusterSummaryProducer.pixelClusters = "siPixelClusters"
335  process.reconstruction.replace(process.MeasurementTrackerEventPreSplitting, process.MeasurementTrackerEvent)
336  process.reconstruction.replace(process.siPixelClusterShapeCachePreSplitting, process.siPixelClusterShapeCache)
337 
338  # Enable, for now, pixel tracks and vertices
339  # To be removed later together with the cluster splitting
340  process.reconstruction.replace(process.standalonemuontracking,
341  process.standalonemuontracking+process.recopixelvertexing)
342  process.initialStepSelector.vertices = "pixelVertices"
343  process.highPtTripletStepSelector.vertices = "pixelVertices"
344  process.lowPtQuadStepSelector.vertices = "pixelVertices"
345  process.lowPtTripletStepSelector.vertices = "pixelVertices"
346  process.detachedQuadStepSelector.vertices = "pixelVertices"
347  process.mixedTripletStepSelector.vertices = "pixelVertices"
348  process.pixelPairStepSeeds.RegionFactoryPSet.RegionPSet.VertexCollection = "pixelVertices"
349  process.pixelPairStepSelector.vertices = "pixelVertices"
350  process.tobTecStepSelector.vertices = "pixelVertices"
351  process.muonSeededTracksInOutSelector.vertices = "pixelVertices"
352  process.muonSeededTracksOutInSelector.vertices = "pixelVertices"
353  process.duplicateTrackSelector.vertices = "pixelVertices"
354  process.convStepSelector.vertices = "pixelVertices"
355  process.ak4CaloJetsForTrk.srcPVs = "pixelVertices"
356 
357  # Make pixelTracks use quadruplets
358  process.pixelTracks.SeedMergerPSet = cms.PSet(
359  layerList = cms.PSet(refToPSet_ = cms.string('PixelSeedMergerQuadruplets')),
360  addRemainingTriplets = cms.bool(False),
361  mergeTriplets = cms.bool(True),
362  ttrhBuilderLabel = cms.string('PixelTTRHBuilderWithoutAngle')
363  )
364  process.pixelTracks.FilterPSet.chi2 = cms.double(50.0)
365  process.pixelTracks.FilterPSet.tipMax = cms.double(0.05)
366  process.pixelTracks.RegionFactoryPSet.RegionPSet.originRadius = cms.double(0.02)
367 
368 
369 
370  return process
def phase1TkCustoms.customise_Validation (   process)

Definition at line 107 of file phase1TkCustoms.py.

Referenced by customise().

108 def customise_Validation(process):
109  process.validation_step.remove(process.PixelTrackingRecHitsValid)
110  # We don't run the HLT
111  process.validation_step.remove(process.HLTSusyExoVal)
112  process.validation_step.remove(process.hltHiggsValidator)
113  process.validation_step.remove(process.relvalMuonBits)
114  return process
def phase1TkCustoms.customise_Validation_Trackingonly (   process)

Definition at line 115 of file phase1TkCustoms.py.

117 
118  #To allow Tracking to perform special tracking only validation
119  process.trackValidator.label=cms.VInputTag(cms.InputTag("cutsRecoTracksHp"))
120  process.tracksValidationSelectors = cms.Sequence(process.cutsRecoTracksHp)
121  process.globalValidation.remove(process.recoMuonValidation)
122  process.validation.remove(process.recoMuonValidation)
123  process.validation_preprod.remove(process.recoMuonValidation)
124  process.validation_step.remove(process.recoMuonValidation)
125  process.validation.remove(process.globalrechitsanalyze)
126  process.validation_prod.remove(process.globalrechitsanalyze)
127  process.validation_step.remove(process.globalrechitsanalyze)
128  process.validation.remove(process.stripRecHitsValid)
129  process.validation_step.remove(process.stripRecHitsValid)
130  process.validation_step.remove(process.StripTrackingRecHitsValid)
131  process.globalValidation.remove(process.vertexValidation)
132  process.validation.remove(process.vertexValidation)
133  process.validation_step.remove(process.vertexValidation)
134  process.mix.input.nbPileupEvents.averageNumber = cms.double(0.0)
135  process.mix.minBunch = cms.int32(0)
136  process.mix.maxBunch = cms.int32(0)
137  return process
def customise_Validation_Trackingonly
def phase1TkCustoms.remove_pixel_ineff (   process)

Definition at line 172 of file phase1TkCustoms.py.

173 def remove_pixel_ineff(process):
174  if hasattr(process,'mix'):
175  process.mix.digitizers.pixel.AddPixelInefficiency = cms.bool(False)
176 
177  return process
178