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 139 of file phase1TkCustoms.py.

140 def add_detailed_pixel_dqm(process):
141  #enable modOn
142  process.SiPixelRawDataErrorSource.modOn = cms.untracked.bool(True)
143  process.SiPixelDigiSource.modOn = cms.untracked.bool(True)
144  process.SiPixelClusterSource.modOn = cms.untracked.bool(True)
145  process.SiPixelRecHitSource.modOn = cms.untracked.bool(True)
146  process.SiPixelTrackResidualSource.modOn = cms.untracked.bool(True)
147  process.SiPixelHitEfficiencySource.modOn = cms.untracked.bool(True)
148 
149  return process
150 
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  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.dataCertificationJetMET)
131  ###process.dqmHarvesting.remove(process.sipixelEDAClient)
132  process.sipixelEDAClient.isUpgrade = cms.untracked.bool(True)
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 158 of file phase1TkCustoms.py.

Referenced by customise().

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

152 def remove_pixel_ineff(process):
153  if hasattr(process,'mix'):
154  process.mix.digitizers.pixel.AddPixelInefficiencyFromPython = cms.bool(False)
155 
156  return process
157