CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
customise_phase1_hcal.py
Go to the documentation of this file.
2 
3 
4 
5 #common stuff here
6 
7 def customise(process):
8 
9  process.load("SLHCUpgradeSimulations.Geometry.recoFromSimDigis_cff")
10 
11  process.load("SLHCUpgradeSimulations.Geometry.upgradeTracking_phase1_cff")
12 
13 
14 
15  process.ctfWithMaterialTracks.TTRHBuilder = 'WithTrackAngle'
16 
17  process.PixelCPEGenericESProducer.UseErrorsFromTemplates = cms.bool(False)
18 
19  process.PixelCPEGenericESProducer.TruncatePixelCharge = cms.bool(False)
20 
21  process.PixelCPEGenericESProducer.LoadTemplatesFromDB = cms.bool(False)
22 
23  process.PixelCPEGenericESProducer.Upgrade = cms.bool(True)
24 
25  process.PixelCPEGenericESProducer.SmallPitch = False
26 
27  process.PixelCPEGenericESProducer.IrradiationBiasCorrection = False
28 
29  process.PixelCPEGenericESProducer.DoCosmics = False
30 
31 
32 
33  ## CPE for other steps
34 
35  process.siPixelRecHits.CPE = cms.string('PixelCPEGeneric')
36 
37  process.initialStepTracks.TTRHBuilder = cms.string('WithTrackAngle')
38 
39  process.lowPtTripletStepTracks.TTRHBuilder = cms.string('WithTrackAngle')
40 
41  process.pixelPairStepTracks.TTRHBuilder = cms.string('WithTrackAngle')
42 
43  process.detachedTripletStepTracks.TTRHBuilder = cms.string('WithTrackAngle')
44 
45  process.mixedTripletStepTracks.TTRHBuilder = cms.string('WithTrackAngle')
46 
47  process.pixelLessStepTracks.TTRHBuilder = cms.string('WithTrackAngle')
48 
49  process.tobTecStepTracks.TTRHBuilder = cms.string('WithTrackAngle')
50 
51  process.highPtTripletStepTracks.TTRHBuilder = cms.string('WithTrackAngle')
52 
53 
54 
55  # Need these lines to stop some errors about missing siStripDigis collections.
56 
57  # should add them to fakeConditions_Phase1_cff
58 
59  process.MeasurementTracker.inactiveStripDetectorLabels = cms.VInputTag()
60 
61  process.MeasurementTracker.UseStripModuleQualityDB = cms.bool(False)
62 
63  process.MeasurementTracker.UseStripAPVFiberQualityDB = cms.bool(False)
64 
65  process.MeasurementTracker.UseStripStripQualityDB = cms.bool(False)
66 
67  process.MeasurementTracker.UsePixelModuleQualityDB = cms.bool(False)
68 
69  process.MeasurementTracker.UsePixelROCQualityDB = cms.bool(False)
70 
71 
72 
73  process.muons.TrackerKinkFinderParameters.TrackerRecHitBuilder = cms.string('WithTrackAngle')
74 
75  # The SeedMergerPSet should be added to the following file for Phase 1
76 
77  # RecoTracker/SpecialSeedGenerators/python/CombinatorialSeedGeneratorForCosmicsRegionalReconstruction_cfi.py
78 
79  # but pixel layers are not used here for cosmic TODO: need Maria and Jan to do appropriate thing here
80 
81  from RecoPixelVertexing.PixelTriplets.quadrupletseedmerging_cff import PixelSeedMergerQuadruplets
82  process.regionalCosmicTrackerSeeds.SeedMergerPSet = cms.PSet(
83 
84  mergeTriplets = cms.bool(False),
85 
86  ttrhBuilderLabel = cms.string( "PixelTTRHBuilderWithoutAngle" ),
87 
88  addRemainingTriplets = cms.bool(False),
89 
90  layerList = PixelSeedMergerQuadruplets
91 
92  )
93 
94  process.regionalCosmicTracks.TTRHBuilder = cms.string('WithTrackAngle')
95 
96 
97 
98 
99 
100  ### back to standard job commands ##################################################
101 
102  process.DigiToRaw.remove(process.castorRawData)
103 
104 
105 
106  process.DigiToRaw.remove(process.siPixelRawData)
107 
108  process.RawToDigi.remove(process.siPixelDigis)
109 
110 
111 
112 
113 
114  if hasattr(process,'dqmoffline_step'):
115 
116  process.dqmoffline_step.remove(process.SiPixelTrackResidualSource)
117 
118  process.dqmoffline_step.remove(process.jetMETAnalyzer)
119 
120  process.dqmoffline_step.remove(process.hltMonMuBits)
121 
122  process.dqmoffline_step.remove(process.vbtfAnalyzer)
123 
124  process.dqmoffline_step.remove(process.hltResults)
125 
126  process.dqmoffline_step.remove(process.egHLTOffDQMSource)
127 
128  process.dqmoffline_step.remove(process.globalAnalyzer)
129 
130  process.dqmoffline_step.remove(process.jetMETHLTOfflineSource)
131 
132  ##
133 
134  process.dqmoffline_step.remove(process.TrackerCollisionTrackMon)
135 
136  if hasattr(process,'validation_step'):
137 
138  process.validation_step.remove(process.hltHITval)
139 
140  process.validation_step.remove(process.HLTSusyExoVal)
141 
142  process.validation_step.remove(process.relvalMuonBits)
143 
144  process.validation_step.remove(process.hltMuonValidator)
145 
146  #this takes forever - seems like an infinite loop that I didnt debug yet
147 
148  process.validation_step.remove(process.pixelDigisValid)
149 
150  else:
151 
152  ## removing large memory usage module if we don't need it
153 
154  process.pdigi.remove(process.mergedtruth)
155 
156 
157 
158 # HCAL Upgrade Geometry
159 
160 
161 
162  process.load("RecoLocalCalo.HcalRecProducers.HcalUpgradeReconstructor_cff")
163 
164  process.load("RecoJets.Configuration.CaloTowersRec_cff")
165 
166  process.load("RecoLocalCalo.HcalRecAlgos.hcalRecAlgoESProd_cfi")
167 
168  process.load("RecoLocalCalo.Configuration.RecoLocalCalo_cff")
169 
170 
171 
172  process.ecalGlobalUncalibRecHit.EBdigiCollection = cms.InputTag("simEcalDigis","ebDigis")
173 
174  process.ecalGlobalUncalibRecHit.EEdigiCollection = cms.InputTag("simEcalDigis","eeDigis")
175 
176  process.ecalRecHit.ebDetIdToBeRecovered = cms.InputTag("","")
177 
178  process.ecalRecHit.eeDetIdToBeRecovered = cms.InputTag("","")
179 
180  process.ecalRecHit.eeFEToBeRecovered = cms.InputTag("","")
181 
182  process.ecalRecHit.ebFEToBeRecovered = cms.InputTag("","")
183 
184  process.ecalRecHit.recoverEBFE = cms.bool(False)
185 
186  process.ecalRecHit.recoverEEFE = cms.bool(False)
187 
188 
189 
190  process.load("RecoLocalCalo.HcalRecProducers.HcalSimpleReconstructor_hbhe_cfi")
191 
192  process.load("RecoLocalCalo.HcalRecProducers.HcalSimpleReconstructor_ho_cfi")
193 
194  process.load("RecoLocalCalo.HcalRecProducers.HcalSimpleReconstructor_hf_cfi")
195 
196 
197 
198  process.hbheprereco.digiLabel = "simHcalUnsuppressedDigis"
199 
200  process.horeco.digiLabel = "simHcalUnsuppressedDigis"
201 
202  process.hfreco.digiLabel = "simHcalUnsuppressedDigis"
203 
204  process.hcalupgradereco.digiLabel = "simHcalUnsuppressedDigis"
205 
206 
207 
208 ### Known alterations for Reco #####################################################
209 
210  delattr(process,"hbhereco")
211 
212  process.hbhereco = process.hbheprereco.clone()
213 
214 
215 
216  process.metrecoPlusHCALNoise.remove(process.BeamHaloSummary)
217 
218  process.metrecoPlusHCALNoise.remove(process.GlobalHaloData)
219 
220  process.metrecoPlusHCALNoise.remove(process.HcalHaloData)
221 
222 
223 
224  process.metrecoPlusHCALNoise.remove(process.hcalnoise)
225 
226  process.jetGlobalReco = cms.Sequence(process.recoJets*process.recoTrackJets)
227 
228  process.jetHighLevelReco = cms.Sequence(process.recoJetAssociations*process.recoPFJets*process.recoJPTJets)
229 
230 
231 
232 ### Place to add in the reco steps one by one ######################################
233 
234  process.calolocalreco = cms.Sequence(process.ecalGlobalUncalibRecHit+
235 
236  process.ecalDetIdToBeRecovered+
237 
238  process.ecalRecHit+
239 
240  process.ecalCompactTrigPrim+
241 
242  process.ecalTPSkim+
243 
244  process.ecalPreshowerRecHit+
245 
246  #process.hbheprereco+
247 
248  process.hbhereco+
249 
250  process.horeco+process.hfreco+process.hcalupgradereco+process.towerMaker
251 
252  #+process.zdcreco
253 
254  )
255 
256  process.localreco = cms.Sequence(process.trackerlocalreco+
257 
258  process.muonlocalreco+
259 
260  process.calolocalreco+
261 
262  process.castorreco+
263 
264  process.lumiProducer
265 
266  )
267 
268  process.globalreco = cms.Sequence(process.offlineBeamSpot
269 
270  *process.recopixelvertexing
271 
272  *process.trackingGlobalReco
273 
274  #*process.hcalGlobalRecoSequence
275 
276  *process.particleFlowCluster
277 
278  *process.ecalClusters
279 
280  *process.caloTowersRec
281 
282  *process.vertexreco
283 
284  *process.egammaGlobalReco
285 
286  *process.pfTrackingGlobalReco
287 
288  *process.jetGlobalReco
289 
290  *process.muonrecoComplete
291 
292  *process.muoncosmicreco
293 
294  *process.CastorFullReco
295 
296  )
297 
298  process.highlevelreco = cms.Sequence(process.egammaHighLevelRecoPrePF
299 
300  *process.particleFlowReco
301 
302  *process.egammaHighLevelRecoPostPF
303 
304  *process.jetHighLevelReco
305 
306  *process.tautagging
307 
308  *process.metrecoPlusHCALNoise
309 
310  *process.btagging
311 
312  *process.recoPFMET
313 
314  *process.PFTau
315 
316  *process.regionalCosmicTracksSeq
317 
318  *process.muoncosmichighlevelreco
319 
320  *process.reducedRecHits
321 
322  )
323 
324  process.reconstruction = cms.Sequence( process.localreco *
325 
326  process.globalreco *
327 
328  process.highlevelreco *
329 
330  process.logErrorHarvester
331 
332  )
333 
334  # Clean out some unused sequences
335 
336  process.hcalLocalRecoSequence=cms.Sequence()
337 
338  process.hcalGlobalRecoSequence=cms.Sequence()
339 
340 
341 
342  return(process)
343 
344 
345 
346 
347 
348 def customise_pu15_25ns(process):
349 
350 
351 
352  process=customise(process)
353 
354 
355 
356  process.load("SLHCUpgradeSimulations.Geometry.mixLowLumPU_Phase1_R30F12_HCal_cff")
357 
358 
359 
360 ### set the number of pileup
361 
362  process.mix.input.nbPileupEvents = cms.PSet(
363 
364  averageNumber = cms.double(15.0)
365 
366  )
367 
368  return (process)
369 
370 
371 
372 def customise_3bx(process):
373 
374  process.mix.maxBunch=1
375 
376  process.mix.minBunch=-1
377 
378  return process
379 
380 
381 
383 
384  process=customise_pu15_25ns(process)
385 
386  process=customise_3bx(process)
387 
388  return process
389 
390 
391 
392 #pileup specific stuff here
393 
394 def customise_pu50_25ns(process):
395 
396 
397 
398  process=customise(process)
399 
400 
401 
402  process.load("SLHCUpgradeSimulations.Geometry.mixLowLumPU_Phase1_R30F12_HCal_cff")
403 
404 
405 
406 ### set the number of pileup
407 
408  process.mix.input.nbPileupEvents = cms.PSet(
409 
410  averageNumber = cms.double(50.0)
411 
412  )
413 
414 
415 
416 ### if doing inefficiency at <PU>=50
417 
418  process.simSiPixelDigis.AddPixelInefficiency = 20
419 
420  ## also for strips TIB inefficiency if we want
421 
422  ## TIB1,2 inefficiency at 20%
423 
424  #process.simSiStripDigis.Inefficiency = 20
425 
426  ## TIB1,2 inefficiency at 50%
427 
428  #process.simSiStripDigis.Inefficiency = 30
429 
430  ## TIB1,2 inefficiency at 99% (i.e. dead)
431 
432  #process.simSiStripDigis.Inefficiency = 40
433 
434 
435 
436  return (process)
437 
438 
439 
441 
442  process=customise_pu50_25ns(process)
443 
444  process=customise_3bx(process)
445 
446  return process
447 
448 
449 
450 def customise_wo_pairs(process):
451 
452 
453 
454  process=customise(process)
455 
456 
457 
458  process.generalTracks.TrackProducers = (cms.InputTag('initialStepTracks'),
459 
460  cms.InputTag('highPtTripletStepTracks'),
461 
462  cms.InputTag('lowPtTripletStepTracks'),
463 
464  cms.InputTag('mixedTripletStepTracks'))
465 
466  process.generalTracks.hasSelector=cms.vint32(1,1,1,1)
467 
468  process.generalTracks.selectedTrackQuals = cms.VInputTag(cms.InputTag("initialStepSelector","initialStep"),
469 
470  cms.InputTag("highPtTripletStepSelector","highPtTripletStep"),
471 
472  cms.InputTag("lowPtTripletStepSelector","lowPtTripletStep"),
473 
474  cms.InputTag("mixedTripletStep")
475 
476  )
477 
478  process.generalTracks.setsToMerge = cms.VPSet( cms.PSet( tLists=cms.vint32(0,1,2,3), pQual=cms.bool(True) )
479 
480  )
481 
482 
483 
484  process.newCombinedSeeds.seedCollections = cms.VInputTag(
485 
486  cms.InputTag('initialStepSeeds'),
487 
488  cms.InputTag('highPtTripletStepSeeds'),
489 
490  cms.InputTag('lowPtTripletStepSeeds')
491 
492  )
493 
494 
495 
496  process.mixedTripletStepClusters.oldClusterRemovalInfo = cms.InputTag("lowPtTripletStepClusters")
497 
498  process.mixedTripletStepClusters.trajectories = cms.InputTag("lowPtTripletStepTracks")
499 
500  process.mixedTripletStepClusters.overrideTrkQuals = cms.InputTag('lowPtTripletStepSelector','lowPtTripletStep')
501 
502 
503 
504  process.iterTracking.remove(process.PixelPairStep)
505 
506  return (process)
507 
508 
509 
511  process.simHcalUnsuppressedDigis.HcalReLabel.RelabelRules.CorrectPhi = cms.untracked.bool(False)
512  process.HcalHardcodeGeometryEP.HcalReLabel.RelabelRules.CorrectPhi = cms.untracked.bool(False)
513  process.HcalReLabel.RelabelRules.CorrectPhi = cms.untracked.bool(False)
514  return (process)
515 
517 
518 
519 
520  process=customise_wo_pairs(process)
521 
522 
523 
524  process.load("SLHCUpgradeSimulations.Geometry.mixLowLumPU_Phase1_R30F12_HCal_cff")
525 
526 
527 
528 ### set the number of pileup
529 
530  process.mix.input.nbPileupEvents = cms.PSet(
531 
532  averageNumber = cms.double(15.0)
533 
534  )
535 
536  return (process)
537 
538 
539 
540 
541 
542 #pileup specific stuff here
543 
545 
546 
547 
548  process=customise_wo_pairs(process)
549 
550 
551 
552  process.load("SLHCUpgradeSimulations.Geometry.mixLowLumPU_Phase1_R30F12_HCal_cff")
553 
554 
555 
556 ### set the number of pileup
557 
558  process.mix.input.nbPileupEvents = cms.PSet(
559 
560  averageNumber = cms.double(50.0)
561 
562  )
563 
564 
565 
566 
567 
568 ### if doing inefficiency at <PU>=50
569 
570  process.simSiPixelDigis.AddPixelInefficiency = 20
571 
572  ## also for strips TIB inefficiency if we want
573 
574  ## TIB1,2 inefficiency at 20%
575 
576  #process.simSiStripDigis.Inefficiency = 20
577 
578  ## TIB1,2 inefficiency at 50%
579 
580  #process.simSiStripDigis.Inefficiency = 30
581 
582  ## TIB1,2 inefficiency at 99% (i.e. dead)
583 
584  #process.simSiStripDigis.Inefficiency = 40
585 
586 
587 
588  return (process)
589 
590 
591 
592 def saveAllProds(process):
593 
594  keys=process.outputModules.keys()
595 
596  for k in keys:
597 
598  mod=getattr(process,k)
599 
600  mod.outputCommands.extend(['keep *_simHcalUnsuppressedDigis_*_*',
601 
602  'keep *_hcalupgradereco_*_*',
603 
604  'keep *_hbhereco_*_*',
605 
606  'keep recoPFRecHits_particleFlowRecHitPS_*_*',
607 
608  'keep recoPFRecHits_particleFlowRecHitECAL_*_*',
609 
610  'keep recoPFBlocks_particleFlowBlock_*_*',
611 
612  'keep recoPFRecTracks_pfTrack_*_*',
613 
614  'keep recoPFClusters_particleFlowClusterPS_*_*',
615 
616  'keep recoPFClusters_particleFlowClusterECAL_*_*',
617 
618  'keep recoPFDisplacedVertexCandidates_particleFlowDisplacedVertexCandidate_*_*',
619 
620  'keep recoPFCandidates_particleFlow_*_*',
621 
622  'keep recoPFClusters_particleFlowClusterHCAL_*_*',
623 
624  'keep recoPFClusters_particleFlowClusterHCALUpgrade_*_*',
625 
626  'keep recoPFClusters_particleFlowClusterHO_*_*',
627 
628  'keep CaloTowersSorted_towerMakerPF_*_*',
629 
630  'keep recoPFCandidates_pfNoPileUp_*_*',
631 
632  'keep recoPFCandidates_pfAllPhotons_*_*',
633 
634  'keep recoPFRecHits_particleFlowRecHitHCAL_*_*',
635 
636  'keep recoPFRecHits_particleFlowRecHitHCALUpgrade_*_*',
637 
638  'keep recoPFRecHits_particleFlowRecHitHO_*_*',
639 
640  'keep recoPileUpPFCandidates_pfPileUp_*_*',
641 
642  'keep recoGsfPFRecTracks_pfTrackElec_*_*',
643 
644  'keep recoGsfPFRecTracks_pfTrackElec_Secondary_*',
645 
646  'keep recoPFCandidates_pfAllNeutralHadrons_*_*',
647 
648  'keep recoPFCandidates_pfAllChargedHadrons_*_*',
649 
650  'keep recoPFCandidates_particleFlow_electrons_*',
651 
652  'keep recoPFRecTracks_pfV0_*_*',
653 
654  'keep recoJetedmRefToBaseProdrecoTracksrecoTrackrecoTracksTorecoTrackedmrefhelperFindUsingAdvanceedmRefVectorsAssociationVector_ak5PFJetTracksAssociatorAtVertex_*_*',
655 
656  'keep recoPFRecTracks_pfConversions_*_*',
657 
658  'keep recoPFCandidateElectronExtras_particleFlow_*_*',
659 
660  'keep recoPFRecHits_particleFlowRecHitECAL_Cleaned_*',
661 
662  'keep recoPFV0s_pfV0_*_*',
663 
664  'keep recoPFCandidates_pfSelectedElectrons_*_*',
665 
666  'keep recoPFDisplacedVertexs_particleFlowDisplacedVertex_*_*',
667 
668  'keep recoPFRecTracks_pfDisplacedTrackerVertex_*_*',
669 
670  'keep recoPFConversions_pfConversions_*_*',
671 
672  'keep recoPFCandidates_particleFlow_CleanedPunchThroughNeutralHadrons_*',
673 
674  'keep recoPFDisplacedTrackerVertexs_pfDisplacedTrackerVertex_*_*',
675 
676  'keep recoPFCandidates_particleFlow_CleanedTrackerAndGlobalMuons_*',
677 
678  'keep recoPFCandidates_particleFlow_CleanedPunchThroughMuons_*',
679 
680  'keep recoPFCandidates_particleFlow_AddedMuonsAndHadrons_*',
681 
682  'keep recoPFMETs_pfMet_*_*',
683 
684  'keep recoPFCandidates_particleFlow_CleanedCosmicsMuons_*',
685 
686  'keep recoPFRecHits_particleFlowClusterHFHAD_Cleaned_*',
687 
688  'keep recoPFCandidates_particleFlow_CleanedFakeMuons_*',
689 
690  'keep recoPFRecHits_particleFlowClusterECAL_Cleaned_*',
691 
692  'keep recoPFRecHits_particleFlowClusterHFEM_Cleaned_*',
693 
694  'keep recoPFRecHits_particleFlowClusterHCAL_Cleaned_*',
695 
696  'keep recoPFRecHits_particleFlowRecHitHCAL_Cleaned_*',
697 
698  'keep recoPFRecHits_particleFlowClusterHCALUpgrade_Cleaned_*',
699 
700  'keep recoPFRecHits_particleFlowRecHitHCALUpgrade_Cleaned_*',
701 
702  'keep recoPFRecHits_particleFlowClusterHO_Cleaned_*',
703 
704  'keep recoPFRecHits_particleFlowRecHitHO_Cleaned_*',
705 
706  'keep recoPFRecHits_particleFlowClusterPS_Cleaned_*',
707 
708  'keep recoPFRecHits_particleFlowRecHitHCAL_HFHAD_*',
709 
710  'keep recoPFRecHits_particleFlowRecHitPS_Cleaned_*',
711 
712  'keep recoPFRecHits_particleFlowRecHitHCAL_HFEM_*',
713 
714  'keep recoPFClusters_particleFlowClusterHFHAD_*_*',
715 
716  'keep recoPFClusters_particleFlowClusterHFEM_*_*',
717 
718  'keep recoPFCandidates_particleFlow_CleanedHF_*',
719 
720  'keep recoPFCandidates_pfSelectedPhotons_*_*'])
721 
722  return process
723 
def customise_pu50_25ns_3bx
if doing inefficiency at &lt;PU&gt;=50
def saveAllProds
if doing inefficiency at &lt;PU&gt;=50
return(e1-e2)*(e1-e2)+dp *dp
def customise_pu15_25ns
Known alterations for Reco #####################################################. ...