CMS 3D CMS Logo

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

Functions

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 l1EventContent
 

Function Documentation

def phase2TkCustomsBE.customise (   process)

Definition at line 3 of file phase2TkCustomsBE.py.

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

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

Definition at line 224 of file phase2TkCustomsBE.py.

Referenced by customise().

225 def customise_condOverRides(process):
226  process.load('SLHCUpgradeSimulations.Geometry.fakeConditions_BarrelEndcap_cff')
227  process.trackerNumberingSLHCGeometry.layerNumberPXB = cms.uint32(20)
228  process.trackerTopologyConstants.pxb_layerStartBit = cms.uint32(20)
229  process.trackerTopologyConstants.pxb_ladderStartBit = cms.uint32(12)
230  process.trackerTopologyConstants.pxb_moduleStartBit = cms.uint32(2)
231  process.trackerTopologyConstants.pxb_layerMask = cms.uint32(15)
232  process.trackerTopologyConstants.pxb_ladderMask = cms.uint32(255)
233  process.trackerTopologyConstants.pxb_moduleMask = cms.uint32(1023)
234  process.trackerTopologyConstants.pxf_diskStartBit = cms.uint32(18)
235  process.trackerTopologyConstants.pxf_bladeStartBit = cms.uint32(12)
236  process.trackerTopologyConstants.pxf_panelStartBit = cms.uint32(10)
237  process.trackerTopologyConstants.pxf_moduleMask = cms.uint32(255)
238  return process
239 
def phase2TkCustomsBE.customise_Digi (   process)

Definition at line 31 of file phase2TkCustomsBE.py.

Referenced by customise().

31 
32 def customise_Digi(process):
33  process.mix.digitizers.pixel.MissCalibrate = False
34  process.mix.digitizers.pixel.LorentzAngle_DB = False
35  process.mix.digitizers.pixel.killModules = False
36  process.mix.digitizers.pixel.useDB = False
37  process.mix.digitizers.pixel.DeadModules_DB = False
38  process.mix.digitizers.pixel.NumPixelBarrel = cms.int32(10)
39  process.mix.digitizers.pixel.NumPixelEndcap = cms.int32(10)
40  process.mix.digitizers.pixel.ThresholdInElectrons_FPix = cms.double(2000.0)
41  process.mix.digitizers.pixel.ThresholdInElectrons_BPix = cms.double(2000.0)
42  process.mix.digitizers.pixel.ThresholdInElectrons_BPix_L1 = cms.double(2000.0)
43  process.mix.digitizers.pixel.thePixelColEfficiency_BPix4 = cms.double(0.999)
44  process.mix.digitizers.pixel.thePixelEfficiency_BPix4 = cms.double(0.999)
45  process.mix.digitizers.pixel.thePixelChipEfficiency_BPix4 = cms.double(0.999)
46  process.mix.digitizers.pixel.thePixelColEfficiency_FPix3 = cms.double(0.999)
47  process.mix.digitizers.pixel.thePixelEfficiency_FPix3 = cms.double(0.999)
48  process.mix.digitizers.pixel.thePixelChipEfficiency_FPix3 = cms.double(0.999)
49  process.mix.digitizers.pixel.AddPixelInefficiencyFromPython = cms.bool(False)
50  process.mix.digitizers.strip.ROUList = cms.vstring("g4SimHitsTrackerHitsPixelBarrelLowTof",
51  'g4SimHitsTrackerHitsPixelEndcapLowTof')
52  process.digitisation_step.remove(process.simSiStripDigiSimLink)
53  process.mergedtruth.simHitCollections.tracker = []
54  return process
55 
def phase2TkCustomsBE.customise_DigiToRaw (   process)

Definition at line 56 of file phase2TkCustomsBE.py.

Referenced by customise().

56 
57 def customise_DigiToRaw(process):
58  process.digi2raw_step.remove(process.siPixelRawData)
59  process.digi2raw_step.remove(process.rpcpacker)
60  return process
def phase2TkCustomsBE.customise_DQM (   process,
  pileup 
)

Definition at line 264 of file phase2TkCustomsBE.py.

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

Referenced by customise().

265 def customise_DQM(process,pileup):
266  # We cut down the number of iterative tracking steps
267 # process.dqmoffline_step.remove(process.TrackMonStep3)
268 # process.dqmoffline_step.remove(process.TrackMonStep4)
269 # process.dqmoffline_step.remove(process.TrackMonStep5)
270 # process.dqmoffline_step.remove(process.TrackMonStep6)
271  #The following two steps were removed
272  #process.PixelLessStep*
273  #process.TobTecStep*
274  process.dqmoffline_step.remove(process.muonAnalyzer)
275  process.dqmoffline_step.remove(process.jetMETAnalyzer)
276 # process.dqmoffline_step.remove(process.TrackMonStep9)
277 # process.dqmoffline_step.remove(process.TrackMonStep10)
278 # process.dqmoffline_step.remove(process.PixelTrackingRecHitsValid)
279 
280  #put isUpgrade flag==true
281  process.SiPixelRawDataErrorSource.isUpgrade = cms.untracked.bool(True)
282  process.SiPixelDigiSource.isUpgrade = cms.untracked.bool(True)
283  process.SiPixelClusterSource.isUpgrade = cms.untracked.bool(True)
284  process.SiPixelRecHitSource.isUpgrade = cms.untracked.bool(True)
285  process.SiPixelTrackResidualSource.isUpgrade = cms.untracked.bool(True)
286  process.SiPixelHitEfficiencySource.isUpgrade = cms.untracked.bool(True)
287 
288  from DQM.TrackingMonitor.customizeTrackingMonitorSeedNumber import customise_trackMon_IterativeTracking_PHASE1PU140
289  from DQM.TrackingMonitor.customizeTrackingMonitorSeedNumber import customise_trackMon_IterativeTracking_PHASE1PU70
290 
291  if pileup>100:
293  else:
295  process.dqmoffline_step.remove(process.Phase1Pu70TrackMonStep2)
296  process.dqmoffline_step.remove(process.Phase1Pu70TrackMonStep4)
297  process.globalrechitsanalyze.ROUList = cms.vstring(
298  'g4SimHitsTrackerHitsPixelBarrelLowTof',
299  'g4SimHitsTrackerHitsPixelBarrelHighTof',
300  'g4SimHitsTrackerHitsPixelEndcapLowTof',
301  'g4SimHitsTrackerHitsPixelEndcapHighTof')
302  return process
def phase2TkCustomsBE.customise_harvesting (   process)

Definition at line 313 of file phase2TkCustomsBE.py.

Referenced by customise().

314 def customise_harvesting(process):
315  process.dqmHarvesting.remove(process.dataCertificationJetMET)
316  process.dqmHarvesting.remove(process.sipixelEDAClient)
317  process.dqmHarvesting.remove(process.sipixelCertification)
318  return (process)
319 
def phase2TkCustomsBE.customise_RawToDigi (   process)

Definition at line 61 of file phase2TkCustomsBE.py.

Referenced by customise().

61 
62 def customise_RawToDigi(process):
63  process.raw2digi_step.remove(process.siPixelDigis)
64  return process
def phase2TkCustomsBE.customise_Reco (   process,
  pileup 
)

Definition at line 65 of file phase2TkCustomsBE.py.

Referenced by customise().

65 
66 def customise_Reco(process,pileup):
67  #this may be a trimmed out process with only local reco
68  #if so, don't use the customize stuff
69  ## need changes to mixedtriplets step to use for imcreasing high eta efficiency
70  process.reconstruction.remove(process.pixelLessStepSeedClusterMask)
71  process.reconstruction.remove(process.castorreco)
72  process.reconstruction.remove(process.CastorTowerReco)
73  process.reconstruction.remove(process.ak7BasicJets)
74  process.reconstruction.remove(process.ak7CastorJetID)
75  #process.iterTracking.remove(process.PixelLessStep)
76  #process.iterTracking.remove(process.TobTecStep)
77  process.MixedTripletStep.remove(process.mixedTripletStepSeedsB)
78  process.mixedTripletStepSeeds = cms.EDProducer("SeedCombiner",
79  seedCollections = cms.VInputTag(cms.InputTag("mixedTripletStepSeedsA"))
80  )
81  process.load("RecoTracker.IterativeTracking.HighPtTripletStep_cff")
82  from RecoTracker.IterativeTracking.HighPtTripletStep_cff import HighPtTripletStep
83  process.iterTracking = cms.Sequence(process.InitialStep*
84  process.HighPtTripletStep*
85  process.LowPtTripletStep*
86  process.PixelPairStep*
87  process.DetachedTripletStep*
88  process.MixedTripletStep*
89  #process.PixelLessStep*
90  #process.TobTecStep*
91  process.earlyGeneralTracks*
92  process.muonSeededStep*
93  process.preDuplicateMergingGeneralTracks*
94  process.generalTracksSequence*
95  process.ConvStep*
96  process.conversionStepTracks
97  )
98 
99 
100 
101 
102  process.convClusters.oldClusterRemovalInfo=cms.InputTag("mixedTripletStepClusters")
103  process.convClusters.trajectories=cms.InputTag("mixedTripletStepTracks")
104  process.convClusters.overrideTrkQuals= cms.InputTag("mixedTripletStep")
105  process.PixelLayerTriplets.layerList = cms.vstring( 'BPix1+BPix2+BPix3',
106  'BPix2+BPix3+BPix4',
107  'BPix1+BPix3+BPix4',
108  'BPix1+BPix2+BPix4',
109  'BPix2+BPix3+FPix1_pos',
110  'BPix2+BPix3+FPix1_neg',
111  'BPix1+BPix2+FPix1_pos',
112  'BPix1+BPix2+FPix1_neg',
113  'BPix2+FPix1_pos+FPix2_pos',
114  'BPix2+FPix1_neg+FPix2_neg',
115  'BPix1+FPix1_pos+FPix2_pos',
116  'BPix1+FPix1_neg+FPix2_neg',
117  'FPix1_pos+FPix2_pos+FPix3_pos',
118  'FPix1_neg+FPix2_neg+FPix3_neg' )
119  process.MeasurementTracker.UsePixelROCQualityDB = cms.bool(False)
120  process.MeasurementTracker.UsePixelModuleQualityDB = cms.bool(False)
121  process.mixedTripletStepSeedLayersA.layerList = cms.vstring('BPix1+BPix2+BPix3',
122  'BPix1+BPix2+FPix1_pos',
123  'BPix1+BPix2+FPix1_neg',
124  'BPix1+FPix1_pos+FPix2_pos',
125  'BPix1+FPix1_neg+FPix2_neg',
126  'BPix2+FPix1_pos+FPix2_pos',
127  'BPix2+FPix1_neg+FPix2_neg')
128  process.convLayerPairs.layerList = cms.vstring('BPix1+BPix2',
129  'BPix2+BPix3',
130  'BPix2+FPix1_pos',
131  'BPix2+FPix1_neg',
132  'BPix2+FPix2_pos',
133  'BPix2+FPix2_neg',
134  'FPix1_pos+FPix2_pos',
135  'FPix1_neg+FPix2_neg')
136 
137  process.earlyGeneralTracks.setsToMerge = cms.VPSet( cms.PSet( tLists=cms.vint32(0,1,2,3,4), pQual=cms.bool(True) ))
138  process.earlyGeneralTracks.hasSelector=cms.vint32(1,1,1,1,1)
139  process.earlyGeneralTracks.selectedTrackQuals = cms.VInputTag(
140  cms.InputTag("initialStepSelector","initialStep"),
141  cms.InputTag("highPtTripletStepSelector","highPtTripletStep"),
142  cms.InputTag("lowPtTripletStepSelector","lowPtTripletStep"),
143  cms.InputTag("pixelPairStepSelector","pixelPairStep"),
144  cms.InputTag("mixedTripletStep")
145  )
146  process.earlyGeneralTracks.TrackProducers = cms.VInputTag(
147  cms.InputTag("initialStepTracks"),
148  cms.InputTag("highPtTripletStepTracks"),
149  cms.InputTag("lowPtTripletStepTracks"),
150  cms.InputTag("pixelPairStepTracks"),
151  cms.InputTag("mixedTripletStepTracks")
152  )
153 
154  process.tripletElectronSeedLayers.BPix.skipClusters=cms.InputTag('mixedTripletStepSeedClusterMask')
155  process.tripletElectronSeedLayers.FPix.skipClusters=cms.InputTag('mixedTripletStepSeedClusterMask')
156  process.tripletElectronClusterMask.oldClusterRemovalInfo=cms.InputTag('mixedTripletStepSeedClusterMask')
157 
158  process.initialStepSeedClusterMask.oldClusterRemovalInfo=cms.InputTag("mixedTripletStepClusters")
159  process.newCombinedSeeds.seedCollections = cms.VInputTag(cms.InputTag('initialStepSeeds'),
160  cms.InputTag("highPtTripletStepSeeds"),
161  cms.InputTag('pixelPairStepSeeds'),
162  cms.InputTag('mixedTripletStepSeeds'),
163  cms.InputTag('tripletElectronSeeds'),
164  cms.InputTag('pixelPairElectronSeeds'),
165  cms.InputTag('stripPairElectronSeeds') )
166  process.stripPairElectronSeedLayers.layerList = cms.vstring('BPix4+BPix5') # Optimize later
167  process.stripPairElectronSeedLayers.BPix = cms.PSet(
168  HitProducer = cms.string('siPixelRecHits'),
169  TTRHBuilder = cms.string('TTRHBuilderWithoutAngle4PixelPairs'),
170  skipClusters = cms.InputTag("pixelPairStepClusters"),
171  )
172  process.regionalCosmicTrackerSeedingLayers.layerList = cms.vstring('BPix10+BPix9') # Optimize later
173  process.regionalCosmicTrackerSeedingLayers.BPix = cms.PSet(
174  HitProducer = cms.string('siPixelRecHits'),
175  TTRHBuilder = cms.string('TTRHBuilderWithoutAngle4PixelPairs'),
176  skipClusters = cms.InputTag("pixelPairStepClusters"),
177  )
178  from RecoPixelVertexing.PixelTriplets.quadrupletseedmerging_cff import PixelSeedMergerQuadruplets
179  process.pixelTracks.SeedMergerPSet = cms.PSet(
180  layerList = PixelSeedMergerQuadruplets,
181  addRemainingTriplets = cms.bool(False),
182  mergeTriplets = cms.bool(True),
183  ttrhBuilderLabel = cms.string('PixelTTRHBuilderWithoutAngle')
184  )
185  process.initialStepSeedClusterMask.oldClusterRemovalInfo=cms.InputTag("mixedTripletStepClusters")
186 
187  # Need this line to stop error about missing siPixelDigis.
188  process.MeasurementTracker.inactivePixelDetectorLabels = cms.VInputTag()
189  process.load("SLHCUpgradeSimulations.Geometry.recoFromSimDigis_cff")
190  # Use with latest pixel geometry. Only used for seeds, so we can use the Phase1Tk file.
191  # We will need to turn it off for any steps that use the outer pixels as seeds.
192  process.ClusterShapeHitFilterESProducer.PixelShapeFile = cms.string('RecoPixelVertexing/PixelLowPtUtilities/data/pixelShape_Phase1Tk.par')
193  # Now make sure we us CPE Generic
194  process.mergedDuplicateTracks.TTRHBuilder = 'WithTrackAngle'
195  process.ctfWithMaterialTracks.TTRHBuilder = 'WithTrackAngle'
196  process.PixelCPEGenericESProducer.UseErrorsFromTemplates = cms.bool(False)
197  process.PixelCPEGenericESProducer.TruncatePixelCharge = cms.bool(False)
198  process.PixelCPEGenericESProducer.LoadTemplatesFromDB = cms.bool(False)
199  process.PixelCPEGenericESProducer.Upgrade = cms.bool(True)
200  process.PixelCPEGenericESProducer.IrradiationBiasCorrection = False
201  process.PixelCPEGenericESProducer.DoCosmics = False
202  process.siPixelRecHits.CPE = cms.string('PixelCPEGeneric')
203  #the quadruplet merger configuration
204  # from this PSet the quadruplet merger uses only the layer list so these could probably be removed
205  PixelSeedMergerQuadruplets.BPix.TTRHBuilder = cms.string("PixelTTRHBuilderWithoutAngle" )
206  PixelSeedMergerQuadruplets.BPix.HitProducer = cms.string("siPixelRecHits" )
207  PixelSeedMergerQuadruplets.FPix.TTRHBuilder = cms.string("PixelTTRHBuilderWithoutAngle" )
208  PixelSeedMergerQuadruplets.FPix.HitProducer = cms.string("siPixelRecHits" )
209 
210  process.highPtTripletStepTracks.TTRHBuilder=cms.string('WithTrackAngle')
211  process.detachedTripletStepTracks.TTRHBuilder=cms.string('WithTrackAngle')
212  process.initialStepTracks.TTRHBuilder=cms.string('WithTrackAngle')
213  process.pixelPairStepTracks.TTRHBuilder=cms.string('WithTrackAngle')
214  process.lowPtTripletStepTracks.TTRHBuilder=cms.string('WithTrackAngle')
215  process.convStepTracks.TTRHBuilder=cms.string('WithTrackAngle')
216  process.mixedTripletStepTracks.TTRHBuilder=cms.string('WithTrackAngle')
217  process.muonSeededSeedsInOut.TrackerRecHitBuilder = cms.string('WithTrackAngle')
218  process.muonSeededTracksInOut.TTRHBuilder = cms.string('WithTrackAngle')
219  process.muons1stStep.TrackerKinkFinderParameters.TrackerRecHitBuilder=cms.string('WithTrackAngle')
220  process.regionalCosmicTracks.TTRHBuilder=cms.string('WithTrackAngle')
221  process.cosmicsVetoTracksRaw.TTRHBuilder=cms.string('WithTrackAngle')
222 
223  return process
def phase2TkCustomsBE.customise_Validation (   process)

Definition at line 303 of file phase2TkCustomsBE.py.

Referenced by customise().

304 def customise_Validation(process):
305  process.validation_step.remove(process.PixelTrackingRecHitsValid)
306  process.validation_step.remove(process.stripRecHitsValid)
307  process.validation_step.remove(process.StripTrackingRecHitsValid)
308  # We don't run the HLT
309  process.validation_step.remove(process.HLTSusyExoVal)
310  process.validation_step.remove(process.hltHiggsValidator)
311  process.validation_step.remove(process.relvalMuonBits)
312  return process
def phase2TkCustomsBE.l1EventContent (   process)

Definition at line 240 of file phase2TkCustomsBE.py.

241 def l1EventContent(process):
242  #extend the event content
243 
244  alist=['RAWSIM','FEVTDEBUG','FEVTDEBUGHLT','GENRAW','RAWSIMHLT','FEVT']
245  for a in alist:
246  b=a+'output'
247  if hasattr(process,b):
248  getattr(process,b).outputCommands.append('keep PSimHits_g4SimHits_*_*')
249  getattr(process,b).outputCommands.append('keep SimTracks_g4SimHits_*_*')
250  getattr(process,b).outputCommands.append('keep SimVertexs_g4SimHits_*_*')
251  getattr(process,b).outputCommands.append('keep *_simSiPixelDigis_*_*')
252  getattr(process,b).outputCommands.append('keep *_genParticles_*_*')
253  getattr(process,b).outputCommands.append('keep *_L1TkBeams_*_*')
254  getattr(process,b).outputCommands.append('keep *_L1TkClustersFromPixelDigis_*_*')
255  getattr(process,b).outputCommands.append('keep *_L1TkClustersFromSimHits_*_*')
256  getattr(process,b).outputCommands.append('keep *_L1TkStubsFromPixelDigis_*_*')
257  getattr(process,b).outputCommands.append('keep *_L1TkStubsFromSimHits_*_*')
258  getattr(process,b).outputCommands.append('keep *_siPixelRecHits_*_*')
259  #drop some bigger collections we don't think we need
260  getattr(process,b).outputCommands.append('drop PSimHits_g4SimHits_EcalHitsEB_*')
261  getattr(process,b).outputCommands.append('drop PSimHits_g4SimHits_EcalHitsEE_*')
262  getattr(process,b).outputCommands.append('drop *_L1TkStubsFromSimHits_StubsFail_*')
263  return process