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 remove_pixel_ineff
 

Function Documentation

def phase1TkCustoms.add_detailed_pixel_dqm (   process)

Definition at line 149 of file phase1TkCustoms.py.

150 def add_detailed_pixel_dqm(process):
151  #enable modOn
152  process.SiPixelRawDataErrorSource.modOn = cms.untracked.bool(True)
153  process.SiPixelDigiSource.modOn = cms.untracked.bool(True)
154  process.SiPixelClusterSource.modOn = cms.untracked.bool(True)
155  process.SiPixelRecHitSource.modOn = cms.untracked.bool(True)
156  process.SiPixelTrackResidualSource.modOn = cms.untracked.bool(True)
157  process.SiPixelHitEfficiencySource.modOn = cms.untracked.bool(True)
158 
159  return process
160 
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,float(n))
33  process=customise_condOverRides(process)
34 
35  return process
def phase1TkCustoms.customise_condOverRides (   process)

Definition at line 135 of file phase1TkCustoms.py.

Referenced by customise().

136 def customise_condOverRides(process):
137 # process.load('SLHCUpgradeSimulations.Geometry.fakeConditions_Phase1_R30F12_cff')
138  process.trackerTopologyConstants.pxb_layerStartBit = cms.uint32(20)
139  process.trackerTopologyConstants.pxb_ladderStartBit = cms.uint32(12)
140  process.trackerTopologyConstants.pxb_moduleStartBit = cms.uint32(2)
141  process.trackerTopologyConstants.pxb_layerMask = cms.uint32(15)
142  process.trackerTopologyConstants.pxb_ladderMask = cms.uint32(255)
143  process.trackerTopologyConstants.pxb_moduleMask = cms.uint32(1023)
144  process.trackerTopologyConstants.pxf_diskStartBit = cms.uint32(18)
145  process.trackerTopologyConstants.pxf_bladeStartBit = cms.uint32(12)
146  process.trackerTopologyConstants.pxf_panelStartBit = cms.uint32(10)
147  process.trackerTopologyConstants.pxf_moduleMask = cms.uint32(255)
148  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_BPix4 = cms.double(0.999)
59  process.mix.digitizers.pixel.thePixelEfficiency_BPix4 = cms.double(0.999)
60  process.mix.digitizers.pixel.thePixelChipEfficiency_BPix4 = cms.double(0.999)
61  process.mix.digitizers.pixel.thePixelColEfficiency_FPix3 = cms.double(0.999)
62  process.mix.digitizers.pixel.thePixelEfficiency_FPix3 = cms.double(0.999)
63  process.mix.digitizers.pixel.thePixelChipEfficiency_FPix3 = cms.double(0.999)
64  process.mix.digitizers.pixel.AddPixelInefficiencyFromPython = cms.bool(True)
65 
66  process=customise_pixelMixing_PU(process)
67  return process
68 
69 
# 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 70 of file phase1TkCustoms.py.

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

Referenced by customise().

70 
71 def customise_DQM(process,pileup):
72  # We cut down the number of iterative tracking steps
73 # process.dqmoffline_step.remove(process.TrackMonStep3)
74 # process.dqmoffline_step.remove(process.TrackMonStep4)
75 # process.dqmoffline_step.remove(process.TrackMonStep5)
76 # process.dqmoffline_step.remove(process.TrackMonStep6)
77  #
78  process.dqmoffline_step.remove(process.muonAnalyzer)
79  process.dqmoffline_step.remove(process.jetMETAnalyzer)
80 # process.dqmoffline_step.remove(process.TrackMonStep9)
81 # process.dqmoffline_step.remove(process.TrackMonStep10)
82 # process.dqmoffline_step.remove(process.PixelTrackingRecHitsValid)
83 
84  #put isUpgrade flag==true
85  process.SiPixelRawDataErrorSource.isUpgrade = cms.untracked.bool(True)
86  process.SiPixelDigiSource.isUpgrade = cms.untracked.bool(True)
87  process.SiPixelClusterSource.isUpgrade = cms.untracked.bool(True)
88  process.SiPixelRecHitSource.isUpgrade = cms.untracked.bool(True)
89  process.SiPixelTrackResidualSource.isUpgrade = cms.untracked.bool(True)
90  process.SiPixelHitEfficiencySource.isUpgrade = cms.untracked.bool(True)
91 
92  from DQM.TrackingMonitor.customizeTrackingMonitorSeedNumber import customise_trackMon_IterativeTracking_PHASE1PU140
93  from DQM.TrackingMonitor.customizeTrackingMonitorSeedNumber import customise_trackMon_IterativeTracking_PHASE1PU70
94 
95  if pileup>100:
97  else:
99  return process
def phase1TkCustoms.customise_harvesting (   process)

Definition at line 128 of file phase1TkCustoms.py.

Referenced by customise().

129 def customise_harvesting(process):
130  process.dqmHarvesting.remove(process.jetMETDQMOfflineClient)
131  process.dqmHarvesting.remove(process.dataCertificationJetMET)
132  process.dqmHarvesting.remove(process.sipixelEDAClient)
133  process.dqmHarvesting.remove(process.sipixelCertification)
134  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 168 of file phase1TkCustoms.py.

Referenced by customise().

169 def customise_Reco(process,pileup):
170 
171  #this code supports either 70 or 140 pileup configurations - should fix as to support 0
172  nPU=70
173  if pileup>100: nPU=140
174 
175  #use with latest pixel geometry
176  process.ClusterShapeHitFilterESProducer.PixelShapeFile = cms.string('RecoPixelVertexing/PixelLowPtUtilities/data/pixelShape_Phase1Tk.par')
177  # Need this line to stop error about missing siPixelDigis.
178  process.MeasurementTracker.inactivePixelDetectorLabels = cms.VInputTag()
179 
180  # new layer list (3/4 pixel seeding) in InitialStep and pixelTracks
181  process.pixellayertriplets.layerList = cms.vstring( 'BPix1+BPix2+BPix3',
182  'BPix2+BPix3+BPix4',
183  'BPix1+BPix3+BPix4',
184  'BPix1+BPix2+BPix4',
185  'BPix2+BPix3+FPix1_pos',
186  'BPix2+BPix3+FPix1_neg',
187  'BPix1+BPix2+FPix1_pos',
188  'BPix1+BPix2+FPix1_neg',
189  'BPix2+FPix1_pos+FPix2_pos',
190  'BPix2+FPix1_neg+FPix2_neg',
191  'BPix1+FPix1_pos+FPix2_pos',
192  'BPix1+FPix1_neg+FPix2_neg',
193  'FPix1_pos+FPix2_pos+FPix3_pos',
194  'FPix1_neg+FPix2_neg+FPix3_neg' )
195 
196  # New tracking. This is really ugly because it redefines globalreco and reconstruction.
197  # It can be removed if change one line in Configuration/StandardSequences/python/Reconstruction_cff.py
198  # from RecoTracker_cff.py to RecoTrackerPhase1PU140_cff.py
199 
200  # remove all the tracking first
201  itIndex=process.globalreco.index(process.trackingGlobalReco)
202  grIndex=process.reconstruction.index(process.globalreco)
203 
204  process.reconstruction.remove(process.globalreco)
205  process.globalreco.remove(process.iterTracking)
206  process.globalreco.remove(process.electronSeedsSeq)
207  process.reconstruction_fromRECO.remove(process.trackingGlobalReco)
208  del process.iterTracking
209  del process.ckftracks
210  del process.ckftracks_woBH
211  del process.ckftracks_wodEdX
212  del process.ckftracks_plus_pixelless
213  del process.trackingGlobalReco
214  del process.electronSeedsSeq
215  del process.InitialStep
216  del process.LowPtTripletStep
217  del process.PixelPairStep
218  del process.DetachedTripletStep
219  del process.MixedTripletStep
220  del process.PixelLessStep
221  del process.TobTecStep
222  del process.earlyGeneralTracks
223  del process.ConvStep
224  # add the correct tracking back in
225  process.load("RecoTracker.Configuration.RecoTrackerPhase1PU"+str(nPU)+"_cff")
226 
227  process.globalreco.insert(itIndex,process.trackingGlobalReco)
228  process.reconstruction.insert(grIndex,process.globalreco)
229  #Note process.reconstruction_fromRECO is broken
230 
231  # End of new tracking configuration which can be removed if new Reconstruction is used.
232 
233 
234  process.reconstruction.remove(process.castorreco)
235  process.reconstruction.remove(process.CastorTowerReco)
236  process.reconstruction.remove(process.ak7BasicJets)
237  process.reconstruction.remove(process.ak7CastorJetID)
238 
239  #the quadruplet merger configuration
240  process.load("RecoPixelVertexing.PixelTriplets.quadrupletseedmerging_cff")
241  process.pixelseedmergerlayers.BPix.TTRHBuilder = cms.string("PixelTTRHBuilderWithoutAngle" )
242  process.pixelseedmergerlayers.BPix.HitProducer = cms.string("siPixelRecHits" )
243  process.pixelseedmergerlayers.FPix.TTRHBuilder = cms.string("PixelTTRHBuilderWithoutAngle" )
244  process.pixelseedmergerlayers.FPix.HitProducer = cms.string("siPixelRecHits" )
245 
246  # Need these until pixel templates are used
247  process.load("SLHCUpgradeSimulations.Geometry.recoFromSimDigis_cff")
248  # PixelCPEGeneric #
249  process.PixelCPEGenericESProducer.Upgrade = cms.bool(True)
250  process.PixelCPEGenericESProducer.UseErrorsFromTemplates = cms.bool(False)
251  process.PixelCPEGenericESProducer.LoadTemplatesFromDB = cms.bool(False)
252  process.PixelCPEGenericESProducer.TruncatePixelCharge = cms.bool(False)
253  process.PixelCPEGenericESProducer.IrradiationBiasCorrection = False
254  process.PixelCPEGenericESProducer.DoCosmics = False
255  # CPE for other steps
256  process.siPixelRecHits.CPE = cms.string('PixelCPEGeneric')
257  # Turn of template use in tracking (iterative steps handled inside their configs)
258  process.mergedDuplicateTracks.TTRHBuilder = 'WithTrackAngle'
259  process.ctfWithMaterialTracks.TTRHBuilder = 'WithTrackAngle'
260  process.muonSeededSeedsInOut.TrackerRecHitBuilder=cms.string('WithTrackAngle')
261  process.muonSeededTracksInOut.TTRHBuilder=cms.string('WithTrackAngle')
262  process.muonSeededTracksOutIn.TTRHBuilder=cms.string('WithTrackAngle')
263  process.muons1stStep.TrackerKinkFinderParameters.TrackerRecHitBuilder=cms.string('WithTrackAngle')
264  process.regionalCosmicTracks.TTRHBuilder=cms.string('WithTrackAngle')
265  process.cosmicsVetoTracksRaw.TTRHBuilder=cms.string('WithTrackAngle')
266  # End of pixel template needed section
267 
268  # Make pixelTracks use quadruplets
269  process.pixelTracks.SeedMergerPSet = cms.PSet(
270  layerListName = cms.string('PixelSeedMergerQuadruplets'),
271  addRemainingTriplets = cms.bool(False),
272  mergeTriplets = cms.bool(True),
273  ttrhBuilderLabel = cms.string('PixelTTRHBuilderWithoutAngle')
274  )
275  process.pixelTracks.FilterPSet.chi2 = cms.double(50.0)
276  process.pixelTracks.FilterPSet.tipMax = cms.double(0.05)
277  process.pixelTracks.RegionFactoryPSet.RegionPSet.originRadius = cms.double(0.02)
278 
279 
280 
281  return process
def phase1TkCustoms.customise_Validation (   process,
  pileup 
)

Definition at line 100 of file phase1TkCustoms.py.

Referenced by customise().

101 def customise_Validation(process,pileup):
102  process.validation_step.remove(process.PixelTrackingRecHitsValid)
103  # We don't run the HLT
104  process.validation_step.remove(process.HLTSusyExoVal)
105  process.validation_step.remove(process.hltHiggsValidator)
106  process.validation_step.remove(process.relvalMuonBits)
107  if pileup>30:
108  process.trackValidator.label=cms.VInputTag(cms.InputTag("cutsRecoTracksHp"))
109  process.tracksValidationSelectors = cms.Sequence(process.cutsRecoTracksHp)
110  process.globalValidation.remove(process.recoMuonValidation)
111  process.validation.remove(process.recoMuonValidation)
112  process.validation_preprod.remove(process.recoMuonValidation)
113  process.validation_step.remove(process.recoMuonValidation)
114  process.validation.remove(process.globalrechitsanalyze)
115  process.validation_prod.remove(process.globalrechitsanalyze)
116  process.validation_step.remove(process.globalrechitsanalyze)
117  process.validation.remove(process.stripRecHitsValid)
118  process.validation_step.remove(process.stripRecHitsValid)
119  process.validation_step.remove(process.StripTrackingRecHitsValid)
120  process.globalValidation.remove(process.vertexValidation)
121  process.validation.remove(process.vertexValidation)
122  process.validation_step.remove(process.vertexValidation)
123  process.mix.input.nbPileupEvents.averageNumber = cms.double(0.0)
124  process.mix.minBunch = cms.int32(0)
125  process.mix.maxBunch = cms.int32(0)
126 
127  return process
def phase1TkCustoms.remove_pixel_ineff (   process)

Definition at line 161 of file phase1TkCustoms.py.

162 def remove_pixel_ineff(process):
163  if hasattr(process,'mix'):
164  process.mix.digitizers.pixel.AddPixelInefficiencyFromPython = cms.bool(False)
165 
166  return process
167