CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
phase2TkCustoms_LB_6PS.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(12)
29  process.mix.digitizers.pixel.NumPixelEndcap = cms.int32(3)
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  ## need changes to mixedtriplets step to use for imcreasing high eta efficiency
58  process.reconstruction.remove(process.pixelLessStepSeedClusterMask)
59  process.reconstruction.remove(process.castorreco)
60  process.reconstruction.remove(process.CastorTowerReco)
61  process.reconstruction.remove(process.ak7BasicJets)
62  process.reconstruction.remove(process.ak7CastorJetID)
63  #process.iterTracking.remove(process.PixelLessStep)
64  #process.iterTracking.remove(process.TobTecStep)
65  process.MixedTripletStep.remove(process.mixedTripletStepSeedsB)
66  process.mixedTripletStepSeeds = cms.EDProducer("SeedCombiner",
67  seedCollections = cms.VInputTag(cms.InputTag("mixedTripletStepSeedsA"))
68  )
69  process.load("RecoTracker.IterativeTracking.HighPtTripletStep_cff")
70  from RecoTracker.IterativeTracking.HighPtTripletStep_cff import HighPtTripletStep
71  process.iterTracking = cms.Sequence(process.InitialStep*
72  process.HighPtTripletStep*
73  process.LowPtTripletStep*
74  process.PixelPairStep*
75  process.DetachedTripletStep*
76  process.MixedTripletStep*
77  #process.PixelLessStep*
78  #process.TobTecStep*
79  process.earlyGeneralTracks*
80  process.muonSeededStep*
81  process.preDuplicateMergingGeneralTracks*
82  process.generalTracksSequence*
83  process.ConvStep*
84  process.conversionStepTracks
85  )
86 
87 
88 
89 
90  process.convClusters.oldClusterRemovalInfo=cms.InputTag("mixedTripletStepClusters")
91  process.convClusters.trajectories=cms.InputTag("mixedTripletStepTracks")
92  process.convClusters.overrideTrkQuals= cms.InputTag("mixedTripletStep")
93  process.mixedTripletStepSeedLayersA.layerList = cms.vstring('BPix1+BPix2+BPix3',
94  'BPix1+BPix2+FPix1_pos',
95  'BPix1+BPix2+FPix1_neg',
96  'BPix1+FPix1_pos+FPix2_pos',
97  'BPix1+FPix1_neg+FPix2_neg',
98  'BPix2+FPix1_pos+FPix2_pos',
99  'BPix2+FPix1_neg+FPix2_neg')
100 
101  process.earlyGeneralTracks.setsToMerge = cms.VPSet( cms.PSet( tLists=cms.vint32(0,1,2,3,4), pQual=cms.bool(True) ))
102  process.earlyGeneralTracks.hasSelector=cms.vint32(1,1,1,1,1)
103  process.earlyGeneralTracks.selectedTrackQuals = cms.VInputTag(
104  cms.InputTag("initialStepSelector","initialStep"),
105  cms.InputTag("highPtTripletStepSelector","highPtTripletStep"),
106  cms.InputTag("lowPtTripletStepSelector","lowPtTripletStep"),
107  cms.InputTag("pixelPairStepSelector","pixelPairStep"),
108  cms.InputTag("mixedTripletStep")
109  )
110  process.earlyGeneralTracks.TrackProducers = cms.VInputTag(
111  cms.InputTag("initialStepTracks"),
112  cms.InputTag("highPtTripletStepTracks"),
113  cms.InputTag("lowPtTripletStepTracks"),
114  cms.InputTag("pixelPairStepTracks"),
115  cms.InputTag("mixedTripletStepTracks")
116  )
117 
118  process.tripletElectronSeedLayers.BPix.skipClusters=cms.InputTag('mixedTripletStepSeedClusterMask')
119  process.tripletElectronSeedLayers.FPix.skipClusters=cms.InputTag('mixedTripletStepSeedClusterMask')
120  process.tripletElectronClusterMask.oldClusterRemovalInfo=cms.InputTag('mixedTripletStepSeedClusterMask')
121 
122  process.initialStepSeedClusterMask.oldClusterRemovalInfo=cms.InputTag("mixedTripletStepClusters")
123  process.newCombinedSeeds.seedCollections = cms.VInputTag(cms.InputTag('initialStepSeeds'),
124  cms.InputTag("highPtTripletStepSeeds"),
125  cms.InputTag('pixelPairStepSeeds'),
126  cms.InputTag('mixedTripletStepSeeds'),
127  cms.InputTag('tripletElectronSeeds'),
128  cms.InputTag('pixelPairElectronSeeds'),
129  cms.InputTag('stripPairElectronSeeds') )
130  process.stripPairElectronSeedLayers.layerList = cms.vstring('BPix4+BPix5') # Optimize later
131  process.stripPairElectronSeedLayers.BPix = cms.PSet(
132  HitProducer = cms.string('siPixelRecHits'),
133  TTRHBuilder = cms.string('TTRHBuilderWithoutAngle4PixelPairs'),
134  skipClusters = cms.InputTag("pixelPairStepClusters"),
135  )
136  process.regionalCosmicTrackerSeeds.OrderedHitsFactoryPSet.LayerPSet.layerList = cms.vstring('BPix12+BPix11') # Optimize later
137  process.regionalCosmicTrackerSeeds.OrderedHitsFactoryPSet.LayerPSet.BPix = cms.PSet(
138  HitProducer = cms.string('siPixelRecHits'),
139  TTRHBuilder = cms.string('TTRHBuilderWithoutAngle4PixelPairs'),
140  skipClusters = cms.InputTag("pixelPairStepClusters"),
141  )
142  from RecoPixelVertexing.PixelTriplets.quadrupletseedmerging_cff import PixelSeedMergerQuadruplets
143  process.pixelTracks.SeedMergerPSet = cms.PSet(
144  layerList = PixelSeedMergerQuadruplets,
145  addRemainingTriplets = cms.bool(False),
146  mergeTriplets = cms.bool(True),
147  ttrhBuilderLabel = cms.string('PixelTTRHBuilderWithoutAngle')
148  )
149  process.initialStepSeedClusterMask.oldClusterRemovalInfo=cms.InputTag("mixedTripletStepClusters")
150 
151  # Need this line to stop error about missing siPixelDigis.
152  process.MeasurementTracker.inactivePixelDetectorLabels = cms.VInputTag()
153  process.load("SLHCUpgradeSimulations.Geometry.recoFromSimDigis_cff")
154  # Use with latest pixel geometry. Only used for seeds, so we can use the Phase1Tk file.
155  # We will need to turn it off for any steps that use the outer pixels as seeds.
156  process.ClusterShapeHitFilterESProducer.PixelShapeFile = cms.string('RecoPixelVertexing/PixelLowPtUtilities/data/pixelShape_Phase1Tk.par')
157  # Now make sure we us CPE Generic
158  process.mergedDuplicateTracks.TTRHBuilder = 'WithTrackAngle'
159  process.ctfWithMaterialTracks.TTRHBuilder = 'WithTrackAngle'
160  process.PixelCPEGenericESProducer.UseErrorsFromTemplates = cms.bool(False)
161  process.PixelCPEGenericESProducer.TruncatePixelCharge = cms.bool(False)
162  process.PixelCPEGenericESProducer.LoadTemplatesFromDB = cms.bool(False)
163  process.PixelCPEGenericESProducer.Upgrade = cms.bool(True)
164  process.PixelCPEGenericESProducer.IrradiationBiasCorrection = False
165  process.PixelCPEGenericESProducer.DoCosmics = False
166  process.siPixelRecHits.CPE = cms.string('PixelCPEGeneric')
167  #the quadruplet merger configuration
168  # from this PSet the quadruplet merger uses only the layer list so these could probably be removed
169  PixelSeedMergerQuadruplets.BPix.TTRHBuilder = cms.string("PixelTTRHBuilderWithoutAngle" )
170  PixelSeedMergerQuadruplets.BPix.HitProducer = cms.string("siPixelRecHits" )
171  PixelSeedMergerQuadruplets.FPix.TTRHBuilder = cms.string("PixelTTRHBuilderWithoutAngle" )
172  PixelSeedMergerQuadruplets.FPix.HitProducer = cms.string("siPixelRecHits" )
173 
174  process.highPtTripletStepTracks.TTRHBuilder=cms.string('WithTrackAngle')
175  process.detachedTripletStepTracks.TTRHBuilder=cms.string('WithTrackAngle')
176  process.initialStepTracks.TTRHBuilder=cms.string('WithTrackAngle')
177  process.pixelPairStepTracks.TTRHBuilder=cms.string('WithTrackAngle')
178  process.lowPtTripletStepTracks.TTRHBuilder=cms.string('WithTrackAngle')
179  process.convStepTracks.TTRHBuilder=cms.string('WithTrackAngle')
180  process.mixedTripletStepTracks.TTRHBuilder=cms.string('WithTrackAngle')
181  process.muonSeededSeedsInOut.TrackerRecHitBuilder = cms.string('WithTrackAngle')
182  process.muonSeededTracksInOut.TTRHBuilder = cms.string('WithTrackAngle')
183  process.muons1stStep.TrackerKinkFinderParameters.TrackerRecHitBuilder=cms.string('WithTrackAngle')
184  process.regionalCosmicTracks.TTRHBuilder=cms.string('WithTrackAngle')
185  process.cosmicsVetoTracksRaw.TTRHBuilder=cms.string('WithTrackAngle')
186 
187  return process
188 
190  process.load('SLHCUpgradeSimulations.Geometry.fakeConditions_LongBarrel6PS_cff')
191  process.trackerNumberingSLHCGeometry.layerNumberPXB = cms.uint32(20)
192  process.trackerTopologyConstants.pxb_layerStartBit = cms.uint32(20)
193  process.trackerTopologyConstants.pxb_ladderStartBit = cms.uint32(12)
194  process.trackerTopologyConstants.pxb_moduleStartBit = cms.uint32(2)
195  process.trackerTopologyConstants.pxb_layerMask = cms.uint32(15)
196  process.trackerTopologyConstants.pxb_ladderMask = cms.uint32(255)
197  process.trackerTopologyConstants.pxb_moduleMask = cms.uint32(1023)
198  process.trackerTopologyConstants.pxf_diskStartBit = cms.uint32(18)
199  process.trackerTopologyConstants.pxf_bladeStartBit = cms.uint32(12)
200  process.trackerTopologyConstants.pxf_panelStartBit = cms.uint32(10)
201  process.trackerTopologyConstants.pxf_moduleMask = cms.uint32(255)
202  return process
203 
204 
205 def l1EventContent(process):
206  #extend the event content
207 
208  alist=['RAWSIM','FEVTDEBUG','FEVTDEBUGHLT','GENRAW','RAWSIMHLT','FEVT']
209  for a in alist:
210  b=a+'output'
211  if hasattr(process,b):
212  getattr(process,b).outputCommands.append('keep PSimHits_g4SimHits_*_*')
213  getattr(process,b).outputCommands.append('keep SimTracks_g4SimHits_*_*')
214  getattr(process,b).outputCommands.append('keep SimVertexs_g4SimHits_*_*')
215  getattr(process,b).outputCommands.append('keep *_simSiPixelDigis_*_*')
216  getattr(process,b).outputCommands.append('keep *_genParticles_*_*')
217  getattr(process,b).outputCommands.append('keep *_L1TkBeams_*_*')
218  getattr(process,b).outputCommands.append('keep *_L1TkClustersFromPixelDigis_*_*')
219  getattr(process,b).outputCommands.append('keep *_L1TkClustersFromSimHits_*_*')
220  getattr(process,b).outputCommands.append('keep *_L1TkStubsFromPixelDigis_*_*')
221  getattr(process,b).outputCommands.append('keep *_L1TkStubsFromSimHits_*_*')
222  getattr(process,b).outputCommands.append('keep *_siPixelRecHits_*_*')
223  #drop some bigger collections we don't think we need
224  getattr(process,b).outputCommands.append('drop PSimHits_g4SimHits_EcalHitsEB_*')
225  getattr(process,b).outputCommands.append('drop PSimHits_g4SimHits_EcalHitsEE_*')
226  getattr(process,b).outputCommands.append('drop *_L1TkStubsFromSimHits_StubsFail_*')
227  return process
228 
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