CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
phase2TkCustomsBE5D.py
Go to the documentation of this file.
2 #GEN-SIM so far...
3 def customise(process):
4  if hasattr(process,'DigiToRaw'):
5  process=customise_DigiToRaw(process)
6  if hasattr(process,'RawToDigi'):
7  process=customise_RawToDigi(process)
8  if hasattr(process,'reconstruction'):
9  process=customise_Reco(process)
10  if hasattr(process,'digitisation_step'):
11  process=customise_Digi(process)
12  if hasattr(process,'dqmoffline_step'):
13  process=customise_DQM(process)
14  if hasattr(process,'dqmHarvesting'):
15  process=customise_harvesting(process)
16  if hasattr(process,'validation_step'):
17  process=customise_Validation(process)
18  process=customise_condOverRides(process)
19 
20  return process
21 
22 def customise_Digi(process):
23  process.mix.digitizers.pixel.MissCalibrate = False
24  process.mix.digitizers.pixel.LorentzAngle_DB = False
25  process.mix.digitizers.pixel.killModules = False
26  process.mix.digitizers.pixel.useDB = False
27  process.mix.digitizers.pixel.DeadModules_DB = False
28  process.mix.digitizers.pixel.NumPixelBarrel = cms.int32(10)
29  process.mix.digitizers.pixel.NumPixelEndcap = cms.int32(7)
30  process.mix.digitizers.pixel.ThresholdInElectrons_FPix = cms.double(2000.0)
31  process.mix.digitizers.pixel.ThresholdInElectrons_BPix = cms.double(2000.0)
32  process.mix.digitizers.pixel.ThresholdInElectrons_BPix_L1 = cms.double(2000.0)
33  process.mix.digitizers.pixel.thePixelColEfficiency_BPix4 = cms.double(0.999)
34  process.mix.digitizers.pixel.thePixelEfficiency_BPix4 = cms.double(0.999)
35  process.mix.digitizers.pixel.thePixelChipEfficiency_BPix4 = cms.double(0.999)
36  process.mix.digitizers.pixel.thePixelColEfficiency_FPix3 = cms.double(0.999)
37  process.mix.digitizers.pixel.thePixelEfficiency_FPix3 = cms.double(0.999)
38  process.mix.digitizers.pixel.thePixelChipEfficiency_FPix3 = cms.double(0.999)
39  process.mix.digitizers.pixel.AddPixelInefficiencyFromPython = cms.bool(False)
40  process.mix.digitizers.strip.ROUList = cms.vstring("g4SimHitsTrackerHitsPixelBarrelLowTof",
41  'g4SimHitsTrackerHitsPixelEndcapLowTof')
42  process.digitisation_step.remove(process.simSiStripDigiSimLink)
43  process.mergedtruth.simHitCollections.tracker = []
44  return process
45 
46 
47 def customise_DigiToRaw(process):
48  process.digi2raw_step.remove(process.siPixelRawData)
49  process.digi2raw_step.remove(process.rpcpacker)
50  return process
51 
52 def customise_RawToDigi(process):
53  process.raw2digi_step.remove(process.siPixelDigis)
54  return process
55 
56 def customise_Reco(process):
57  #this may be a trimmed out process with only local reco
58  #if so, don't use the customize stuff
59  ## need changes to mixedtriplets step to use for imcreasing high eta efficiency
60  process.reconstruction.remove(process.pixelLessStepSeedClusterMask)
61  process.reconstruction.remove(process.castorreco)
62  process.reconstruction.remove(process.CastorTowerReco)
63  process.reconstruction.remove(process.ak7BasicJets)
64  process.reconstruction.remove(process.ak7CastorJetID)
65  #process.iterTracking.remove(process.PixelLessStep)
66  #process.iterTracking.remove(process.TobTecStep)
67  process.MixedTripletStep.remove(process.mixedTripletStepSeedsB)
68  process.mixedTripletStepSeeds = cms.EDProducer("SeedCombiner",
69  seedCollections = cms.VInputTag(cms.InputTag("mixedTripletStepSeedsA"))
70  )
71  process.load("RecoTracker.IterativeTracking.HighPtTripletStep_cff")
72  from RecoTracker.IterativeTracking.HighPtTripletStep_cff import HighPtTripletStep
73  process.iterTracking = cms.Sequence(process.InitialStep*
74  process.HighPtTripletStep*
75  process.LowPtTripletStep*
76  process.PixelPairStep*
77  process.DetachedTripletStep*
78  process.MixedTripletStep*
79  #process.PixelLessStep*
80  #process.TobTecStep*
81  process.earlyGeneralTracks*
82  process.muonSeededStep*
83  process.preDuplicateMergingGeneralTracks*
84  process.generalTracksSequence*
85  process.ConvStep*
86  process.conversionStepTracks
87  )
88 
89 
90 
91 
92  process.convClusters.oldClusterRemovalInfo=cms.InputTag("mixedTripletStepClusters")
93  process.convClusters.trajectories=cms.InputTag("mixedTripletStepTracks")
94  process.convClusters.overrideTrkQuals= cms.InputTag("mixedTripletStep")
95  process.mixedTripletStepSeedLayersA.layerList = cms.vstring('BPix1+BPix2+BPix3',
96  'BPix1+BPix2+FPix1_pos',
97  'BPix1+BPix2+FPix1_neg',
98  'BPix1+FPix1_pos+FPix2_pos',
99  'BPix1+FPix1_neg+FPix2_neg',
100  'BPix2+FPix1_pos+FPix2_pos',
101  'BPix2+FPix1_neg+FPix2_neg')
102 
103  process.earlyGeneralTracks.setsToMerge = cms.VPSet( cms.PSet( tLists=cms.vint32(0,1,2,3,4), pQual=cms.bool(True) ))
104  process.earlyGeneralTracks.hasSelector=cms.vint32(1,1,1,1,1)
105  process.earlyGeneralTracks.selectedTrackQuals = cms.VInputTag(
106  cms.InputTag("initialStepSelector","initialStep"),
107  cms.InputTag("highPtTripletStepSelector","highPtTripletStep"),
108  cms.InputTag("lowPtTripletStepSelector","lowPtTripletStep"),
109  cms.InputTag("pixelPairStepSelector","pixelPairStep"),
110  cms.InputTag("mixedTripletStep")
111  )
112  process.earlyGeneralTracks.TrackProducers = cms.VInputTag(
113  cms.InputTag("initialStepTracks"),
114  cms.InputTag("highPtTripletStepTracks"),
115  cms.InputTag("lowPtTripletStepTracks"),
116  cms.InputTag("pixelPairStepTracks"),
117  cms.InputTag("mixedTripletStepTracks")
118  )
119 
120  process.tripletElectronSeedLayers.BPix.skipClusters=cms.InputTag('mixedTripletStepSeedClusterMask')
121  process.tripletElectronSeedLayers.FPix.skipClusters=cms.InputTag('mixedTripletStepSeedClusterMask')
122  process.tripletElectronClusterMask.oldClusterRemovalInfo=cms.InputTag('mixedTripletStepSeedClusterMask')
123 
124  process.initialStepSeedClusterMask.oldClusterRemovalInfo=cms.InputTag("mixedTripletStepClusters")
125  process.newCombinedSeeds.seedCollections = cms.VInputTag(cms.InputTag('initialStepSeeds'),
126  cms.InputTag("highPtTripletStepSeeds"),
127  cms.InputTag('pixelPairStepSeeds'),
128  cms.InputTag('mixedTripletStepSeeds'),
129  cms.InputTag('tripletElectronSeeds'),
130  cms.InputTag('pixelPairElectronSeeds'),
131  cms.InputTag('stripPairElectronSeeds') )
132  process.stripPairElectronSeedLayers.layerList = cms.vstring('BPix4+BPix5') # Optimize later
133  process.stripPairElectronSeedLayers.BPix = cms.PSet(
134  HitProducer = cms.string('siPixelRecHits'),
135  hitErrorRZ = cms.double(0.006),
136  useErrorsFromParam = cms.bool(True),
137  TTRHBuilder = cms.string('TTRHBuilderWithoutAngle4PixelPairs'),
138  skipClusters = cms.InputTag("pixelPairStepClusters"),
139  hitErrorRPhi = cms.double(0.0027)
140  )
141  process.regionalCosmicTrackerSeeds.OrderedHitsFactoryPSet.LayerPSet.layerList = cms.vstring('BPix10+BPix9') # Optimize later
142  process.regionalCosmicTrackerSeeds.OrderedHitsFactoryPSet.LayerPSet.BPix = cms.PSet(
143  HitProducer = cms.string('siPixelRecHits'),
144  hitErrorRZ = cms.double(0.006),
145  useErrorsFromParam = cms.bool(True),
146  TTRHBuilder = cms.string('TTRHBuilderWithoutAngle4PixelPairs'),
147  skipClusters = cms.InputTag("pixelPairStepClusters"),
148  hitErrorRPhi = cms.double(0.0027)
149  )
150  process.pixelTracks.SeedMergerPSet = cms.PSet(
151  layerListName = cms.string('PixelSeedMergerQuadruplets'),
152  addRemainingTriplets = cms.bool(False),
153  mergeTriplets = cms.bool(True),
154  ttrhBuilderLabel = cms.string('PixelTTRHBuilderWithoutAngle')
155  )
156  process.initialStepSeedClusterMask.oldClusterRemovalInfo=cms.InputTag("mixedTripletStepClusters")
157 
158  # Need this line to stop error about missing siPixelDigis.
159  process.MeasurementTracker.inactivePixelDetectorLabels = cms.VInputTag()
160  process.load("SLHCUpgradeSimulations.Geometry.recoFromSimDigis_cff")
161  # Use with latest pixel geometry. Only used for seeds, so we can use the Phase1Tk file.
162  # We will need to turn it off for any steps that use the outer pixels as seeds.
163  process.ClusterShapeHitFilterESProducer.PixelShapeFile = cms.string('RecoPixelVertexing/PixelLowPtUtilities/data/pixelShape_Phase1Tk.par')
164  # Now make sure we us CPE Generic
165  process.mergedDuplicateTracks.TTRHBuilder = 'WithTrackAngle'
166  process.ctfWithMaterialTracks.TTRHBuilder = 'WithTrackAngle'
167  process.PixelCPEGenericESProducer.UseErrorsFromTemplates = cms.bool(False)
168  process.PixelCPEGenericESProducer.TruncatePixelCharge = cms.bool(False)
169  process.PixelCPEGenericESProducer.LoadTemplatesFromDB = cms.bool(False)
170  process.PixelCPEGenericESProducer.Upgrade = cms.bool(True)
171  process.PixelCPEGenericESProducer.IrradiationBiasCorrection = False
172  process.PixelCPEGenericESProducer.DoCosmics = False
173  process.siPixelRecHits.CPE = cms.string('PixelCPEGeneric')
174  #the quadruplet merger configuration
175  process.load("RecoPixelVertexing.PixelTriplets.quadrupletseedmerging_cff")
176  process.pixelseedmergerlayers.BPix.TTRHBuilder = cms.string("PixelTTRHBuilderWithoutAngle" )
177  process.pixelseedmergerlayers.BPix.HitProducer = cms.string("siPixelRecHits" )
178  process.pixelseedmergerlayers.FPix.TTRHBuilder = cms.string("PixelTTRHBuilderWithoutAngle" )
179  process.pixelseedmergerlayers.FPix.HitProducer = cms.string("siPixelRecHits" )
180 
181  process.highPtTripletStepTracks.TTRHBuilder=cms.string('WithTrackAngle')
182  process.detachedTripletStepTracks.TTRHBuilder=cms.string('WithTrackAngle')
183  process.initialStepTracks.TTRHBuilder=cms.string('WithTrackAngle')
184  process.pixelPairStepTracks.TTRHBuilder=cms.string('WithTrackAngle')
185  process.lowPtTripletStepTracks.TTRHBuilder=cms.string('WithTrackAngle')
186  process.convStepTracks.TTRHBuilder=cms.string('WithTrackAngle')
187  process.mixedTripletStepTracks.TTRHBuilder=cms.string('WithTrackAngle')
188  process.muonSeededSeedsInOut.TrackerRecHitBuilder = cms.string('WithTrackAngle')
189  process.muonSeededTracksInOut.TTRHBuilder = cms.string('WithTrackAngle')
190  process.muons1stStep.TrackerKinkFinderParameters.TrackerRecHitBuilder=cms.string('WithTrackAngle')
191  process.regionalCosmicTracks.TTRHBuilder=cms.string('WithTrackAngle')
192  process.cosmicsVetoTracksRaw.TTRHBuilder=cms.string('WithTrackAngle')
193 
194  return process
195 
197  process.load('SLHCUpgradeSimulations.Geometry.fakeConditions_BarrelEndcap5D_cff')
198  process.trackerNumberingSLHCGeometry.layerNumberPXB = cms.uint32(20)
199  process.trackerTopologyConstants.pxb_layerStartBit = cms.uint32(20)
200  process.trackerTopologyConstants.pxb_ladderStartBit = cms.uint32(12)
201  process.trackerTopologyConstants.pxb_moduleStartBit = cms.uint32(2)
202  process.trackerTopologyConstants.pxb_layerMask = cms.uint32(15)
203  process.trackerTopologyConstants.pxb_ladderMask = cms.uint32(255)
204  process.trackerTopologyConstants.pxb_moduleMask = cms.uint32(1023)
205  process.trackerTopologyConstants.pxf_diskStartBit = cms.uint32(18)
206  process.trackerTopologyConstants.pxf_bladeStartBit = cms.uint32(12)
207  process.trackerTopologyConstants.pxf_panelStartBit = cms.uint32(10)
208  process.trackerTopologyConstants.pxf_moduleMask = cms.uint32(255)
209  return process
210 
211 
212 def l1EventContent(process):
213  #extend the event content
214 
215  alist=['RAWSIM','FEVTDEBUG','FEVTDEBUGHLT','GENRAW','RAWSIMHLT','FEVT']
216  for a in alist:
217  b=a+'output'
218  if hasattr(process,b):
219  getattr(process,b).outputCommands.append('keep PSimHits_g4SimHits_*_*')
220  getattr(process,b).outputCommands.append('keep SimTracks_g4SimHits_*_*')
221  getattr(process,b).outputCommands.append('keep SimVertexs_g4SimHits_*_*')
222  getattr(process,b).outputCommands.append('keep *_simSiPixelDigis_*_*')
223  getattr(process,b).outputCommands.append('keep *_genParticles_*_*')
224  getattr(process,b).outputCommands.append('keep *_L1TkBeams_*_*')
225  getattr(process,b).outputCommands.append('keep *_L1TkClustersFromPixelDigis_*_*')
226  getattr(process,b).outputCommands.append('keep *_L1TkClustersFromSimHits_*_*')
227  getattr(process,b).outputCommands.append('keep *_L1TkStubsFromPixelDigis_*_*')
228  getattr(process,b).outputCommands.append('keep *_L1TkStubsFromSimHits_*_*')
229  getattr(process,b).outputCommands.append('keep *_siPixelRecHits_*_*')
230  #drop some bigger collections we don't think we need
231  getattr(process,b).outputCommands.append('drop PSimHits_g4SimHits_EcalHitsEB_*')
232  getattr(process,b).outputCommands.append('drop PSimHits_g4SimHits_EcalHitsEE_*')
233  getattr(process,b).outputCommands.append('drop *_L1TkStubsFromSimHits_StubsFail_*')
234  return process
235 
def customise_Validation
Definition: HCalCustoms.py:237
def customise_harvesting
Definition: HCalCustoms.py:234
def customise_DQM
process.load("RecoLocalCalo.HcalRecProducers.HcalSimpleReconstructor_ho_cfi")
Definition: HCalCustoms.py:218