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