CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
postLS1Customs.py
Go to the documentation of this file.
2 
3 from RecoTracker.Configuration.customiseForRunI import customiseForRunI
4 
6 
7  # deal with CSC separately
8  from SLHCUpgradeSimulations.Configuration.muonCustoms import customise_csc_PostLS1
9  process = customise_csc_PostLS1(process)
10 
11  # deal with FastSim separately
12  from SLHCUpgradeSimulations.Configuration.fastSimCustoms import customise_fastSimPostLS1
13  process = customise_fastSimPostLS1(process)
14 
15  # all the rest
16  if hasattr(process,'g4SimHits'):
17  process = customise_Sim(process)
18  if hasattr(process,'DigiToRaw'):
19  process = customise_DigiToRaw(process)
20  if hasattr(process,'RawToDigi'):
21  process = customise_RawToDigi(process)
22  if hasattr(process,'reconstruction'):
23  process = customise_Reco(process)
24  if hasattr(process,'digitisation_step') or ( hasattr(process,'mix') and hasattr(process.mix,'digitizers')):
25  process = customise_Digi_Common(process)
26  if hasattr(process,'HLTSchedule'):
27  process = customise_HLT(process)
28  if hasattr(process,'L1simulation_step'):
29  process = customise_L1Emulator(process)
30  if hasattr(process,'dqmoffline_step'):
31  process = customise_DQM(process)
32  if hasattr(process,'dqmHarvesting'):
33  process = customise_harvesting(process)
34  if hasattr(process,'validation_step'):
35  process = customise_Validation(process)
36  if hasattr(process,'datamixing_step'):
37  process = customise_DataMix(process)
38 
39  return process
40 
41 
42 def customisePostLS1(process):
43 
44  # deal with L1 Emulation separately
45  from L1Trigger.L1TCommon.customsPostLS1 import customiseSimL1EmulatorForStage1
46  process = customiseSimL1EmulatorForStage1(process)
47 
48  # common customisation
49  process = customisePostLS1_Common(process)
50 
51  # 25ns specific customisation
52  if hasattr(process,'digitisation_step'):
53  process = customise_Digi_25ns(process)
54  if hasattr(process,'dqmoffline_step'):
55  process = customise_DQM_25ns(process)
56 
57  return process
58 
59 
60 # Note: same as 50ns version below now that menu is in GT...
62 
63  # common customisations
64  process = customisePostLS1_Common(process)
65 
66  # 50ns specific customisation
67  if hasattr(process,'digitisation_step'):
68  process = customise_Digi_50ns(process)
69 
70  return process
71 
72 
73 def customisePostLS1_50ns(process):
74 
75  # common customisations
76  process = customisePostLS1_Common(process)
77 
78  # 50ns specific customisation
79  if hasattr(process,'digitisation_step'):
80  process = customise_Digi_50ns(process)
81 
82  return process
83 
84 
85 def customisePostLS1_HI(process):
86 
87  # deal with L1 Emulation separately
88  from L1Trigger.L1TCommon.customsPostLS1 import customiseSimL1EmulatorForStage1
89  process = customiseSimL1EmulatorForStage1(process)
90 
91  # common customisation
92  process = customisePostLS1_Common(process)
93 
94  # HI Specific additional customizations:
95  from L1Trigger.L1TCommon.customsPostLS1 import customiseSimL1EmulatorForPostLS1_Additional_HI
97 
98  # HI L1Menu:
99  #from L1Trigger.Configuration.customise_overwriteL1Menu import L1Menu_CollisionsHeavyIons2015_v0
100  #process = L1Menu_CollisionsHeavyIons2015_v0(process)
101 
102  return process
103 
104 def customisePostLS1_B0T(process):
105  # 50ns only
106 
107  process=customisePostLS1_50ns(process)
108  process=customiseForRunI(process)
109 
110  return process
111 
113  # 50ns only
114 
115  process=customisePostLS1_lowPU(process)
116  process=customiseForRunI(process)
117 
118  return process
119 
120 
121 def digiEventContent(process):
122  #extend the event content
123 
124  alist=['RAWSIM','RAWDEBUG','FEVTDEBUG','FEVTDEBUGHLT','GENRAW','RAWSIMHLT','FEVT','PREMIX','PREMIXRAW']
125  for a in alist:
126  b = a + 'output'
127  if hasattr(process,b):
128  getattr(process,b).outputCommands.append('keep *_simMuonCSCDigis_*_*')
129  getattr(process,b).outputCommands.append('keep *_simMuonRPCDigis_*_*')
130  getattr(process,b).outputCommands.append('keep *_simHcalUnsuppressedDigis_*_*')
131 
132  return process
133 
134 
135 def customise_DQM(process):
136  #process.dqmoffline_step.remove(process.jetMETAnalyzer)
137  # Turn off flag of gangedME11a
138  process.l1tCsctf.gangedME11a = cms.untracked.bool(False)
139  # Turn off "low bias voltage" region in HCAL noise filters
140  if hasattr(process,'HBHENoiseFilterResultProducer'):
141  process.HBHENoiseFilterResultProducer.IgnoreTS4TS5ifJetInLowBVRegion = cms.bool(False)
142  return process
143 
144 
145 def customise_DQM_25ns(process):
146  # Switch the default decision of the HCAL noise filter
147  if hasattr(process,'HBHENoiseFilterResultProducer'):
148  process.HBHENoiseFilterResultProducer.defaultDecision = cms.string("HBHENoiseFilterResultRun2Loose")
149  return process
150 
151 
152 def customise_Validation(process):
153  #process.validation_step.remove(process.PixelTrackingRecHitsValid)
154  # We don't run the HLT
155  #process.validation_step.remove(process.HLTSusyExoVal)
156  #process.validation_step.remove(process.hltHiggsValidator)
157  return process
158 
159 
160 def customise_Sim(process):
161  # enable 2015 HF shower library
162  process.g4SimHits.HFShowerLibrary.FileName = 'SimG4CMS/Calo/data/HFShowerLibrary_npmt_noatt_eta4_16en_v3.root'
163  return process
164 
165 
167  process = digiEventContent(process)
168  if hasattr(process,'mix') and hasattr(process.mix,'digitizers'):
169  if hasattr(process.mix.digitizers,'hcal') and hasattr(process.mix.digitizers.hcal,'ho'):
170  process.mix.digitizers.hcal.ho.photoelectronsToAnalog = cms.vdouble([4.0]*16)
171  process.mix.digitizers.hcal.ho.siPMCode = cms.int32(1)
172  process.mix.digitizers.hcal.ho.pixels = cms.int32(2500)
173  process.mix.digitizers.hcal.ho.doSiPMSmearing = cms.bool(False)
174  if hasattr(process.mix.digitizers,'hcal') and hasattr(process.mix.digitizers.hcal,'hf1'):
175  process.mix.digitizers.hcal.hf1.samplingFactor = cms.double(0.60)
176  if hasattr(process.mix.digitizers,'hcal') and hasattr(process.mix.digitizers.hcal,'hf2'):
177  process.mix.digitizers.hcal.hf2.samplingFactor = cms.double(0.60)
178  return process
179 
180 def customise_DataMix(process):
181  if hasattr(process,'mixData'):
182  if hasattr(process.mixData,'ho'):
183  process.mixData.ho.photoelectronsToAnalog = cms.vdouble([4.0]*16)
184  process.mixData.ho.siPMCode = cms.int32(1)
185  process.mixData.ho.pixels = cms.int32(2500)
186  process.mixData.ho.doSiPMSmearing = cms.bool(False)
187  if hasattr(process.mixData,'hf1'):
188  process.mixData.hf1.samplingFactor = cms.double(0.60)
189  if hasattr(process.mixData,'hf2'):
190  process.mixData.hf2.samplingFactor = cms.double(0.60)
191  return process
192 
193 
194 def customise_Digi_50ns(process):
195  if hasattr(process,'mix') and hasattr(process.mix,'digitizers'):
196  if hasattr(process.mix.digitizers,'pixel'):
197  # pixel dynamic inefficency - 13TeV - 50ns case
198  process.mix.digitizers.pixel.theInstLumiScaleFactor = cms.double(246.4)
199  process.mix.digitizers.pixel.theLadderEfficiency_BPix1 = cms.vdouble(
200  0.979259,
201  0.976677,
202  0.979259,
203  0.976677,
204  0.979259,
205  0.976677,
206  0.979259,
207  0.976677,
208  0.979259,
209  0.976677,
210  0.979259,
211  0.976677,
212  0.979259,
213  0.976677,
214  0.979259,
215  0.976677,
216  0.979259,
217  0.976677,
218  0.979259,
219  0.976677,
220  )
221  process.mix.digitizers.pixel.theLadderEfficiency_BPix2 = cms.vdouble(
222  0.994321,
223  0.993944,
224  0.994321,
225  0.993944,
226  0.994321,
227  0.993944,
228  0.994321,
229  0.993944,
230  0.994321,
231  0.993944,
232  0.994321,
233  0.993944,
234  0.994321,
235  0.993944,
236  0.994321,
237  0.993944,
238  0.994321,
239  0.993944,
240  0.994321,
241  0.993944,
242  0.994321,
243  0.993944,
244  0.994321,
245  0.993944,
246  0.994321,
247  0.993944,
248  0.994321,
249  0.993944,
250  0.994321,
251  0.993944,
252  0.994321,
253  0.993944,
254  )
255  process.mix.digitizers.pixel.theLadderEfficiency_BPix3 = cms.vdouble(
256  0.996787,
257  0.996945,
258  0.996787,
259  0.996945,
260  0.996787,
261  0.996945,
262  0.996787,
263  0.996945,
264  0.996787,
265  0.996945,
266  0.996787,
267  0.996945,
268  0.996787,
269  0.996945,
270  0.996787,
271  0.996945,
272  0.996787,
273  0.996945,
274  0.996787,
275  0.996945,
276  0.996787,
277  0.996945,
278  0.996787,
279  0.996945,
280  0.996787,
281  0.996945,
282  0.996787,
283  0.996945,
284  0.996787,
285  0.996945,
286  0.996787,
287  0.996945,
288  0.996787,
289  0.996945,
290  0.996787,
291  0.996945,
292  0.996787,
293  0.996945,
294  0.996787,
295  0.996945,
296  0.996787,
297  0.996945,
298  0.996787,
299  0.996945,
300  )
301  if hasattr(process,'mixData'):
302  # pixel dynamic inefficency - 13TeV - 50ns case
303  process.mixData.theInstLumiScaleFactor = cms.double(246.4)
304  process.mixData.theLadderEfficiency_BPix1 = cms.vdouble(
305  0.979259,
306  0.976677,
307  0.979259,
308  0.976677,
309  0.979259,
310  0.976677,
311  0.979259,
312  0.976677,
313  0.979259,
314  0.976677,
315  0.979259,
316  0.976677,
317  0.979259,
318  0.976677,
319  0.979259,
320  0.976677,
321  0.979259,
322  0.976677,
323  0.979259,
324  0.976677,
325  )
326  process.mixData.theLadderEfficiency_BPix2 = cms.vdouble(
327  0.994321,
328  0.993944,
329  0.994321,
330  0.993944,
331  0.994321,
332  0.993944,
333  0.994321,
334  0.993944,
335  0.994321,
336  0.993944,
337  0.994321,
338  0.993944,
339  0.994321,
340  0.993944,
341  0.994321,
342  0.993944,
343  0.994321,
344  0.993944,
345  0.994321,
346  0.993944,
347  0.994321,
348  0.993944,
349  0.994321,
350  0.993944,
351  0.994321,
352  0.993944,
353  0.994321,
354  0.993944,
355  0.994321,
356  0.993944,
357  0.994321,
358  0.993944,
359  )
360  process.mixData.theLadderEfficiency_BPix3 = cms.vdouble(
361  0.996787,
362  0.996945,
363  0.996787,
364  0.996945,
365  0.996787,
366  0.996945,
367  0.996787,
368  0.996945,
369  0.996787,
370  0.996945,
371  0.996787,
372  0.996945,
373  0.996787,
374  0.996945,
375  0.996787,
376  0.996945,
377  0.996787,
378  0.996945,
379  0.996787,
380  0.996945,
381  0.996787,
382  0.996945,
383  0.996787,
384  0.996945,
385  0.996787,
386  0.996945,
387  0.996787,
388  0.996945,
389  0.996787,
390  0.996945,
391  0.996787,
392  0.996945,
393  0.996787,
394  0.996945,
395  0.996787,
396  0.996945,
397  0.996787,
398  0.996945,
399  0.996787,
400  0.996945,
401  0.996787,
402  0.996945,
403  0.996787,
404  0.996945,
405  )
406  return process
407 
408 
409 def customise_Digi_25ns(process):
410  if hasattr(process,'mix') and hasattr(process.mix,'digitizers'):
411  if hasattr(process.mix.digitizers,'pixel'):
412  # pixel dynamic inefficency - 13TeV - 25ns case
413  process.mix.digitizers.pixel.theInstLumiScaleFactor = cms.double(364)
414  process.mix.digitizers.pixel.theLadderEfficiency_BPix1 = cms.vdouble(
415  1,
416  1,
417  1,
418  1,
419  1,
420  1,
421  1,
422  1,
423  1,
424  1,
425  1,
426  1,
427  1,
428  1,
429  1,
430  1,
431  1,
432  1,
433  1,
434  1,
435  )
436  process.mix.digitizers.pixel.theLadderEfficiency_BPix2 = cms.vdouble(
437  1,
438  1,
439  1,
440  1,
441  1,
442  1,
443  1,
444  1,
445  1,
446  1,
447  1,
448  1,
449  1,
450  1,
451  1,
452  1,
453  1,
454  1,
455  1,
456  1,
457  1,
458  1,
459  1,
460  1,
461  1,
462  1,
463  1,
464  1,
465  1,
466  1,
467  1,
468  1,
469  )
470  process.mix.digitizers.pixel.theLadderEfficiency_BPix3 = cms.vdouble(
471  1,
472  1,
473  1,
474  1,
475  1,
476  1,
477  1,
478  1,
479  1,
480  1,
481  1,
482  1,
483  1,
484  1,
485  1,
486  1,
487  1,
488  1,
489  1,
490  1,
491  1,
492  1,
493  1,
494  1,
495  1,
496  1,
497  1,
498  1,
499  1,
500  1,
501  1,
502  1,
503  1,
504  1,
505  1,
506  1,
507  1,
508  1,
509  1,
510  1,
511  1,
512  1,
513  1,
514  1,
515  )
516  process.mix.digitizers.pixel.theModuleEfficiency_BPix1 = cms.vdouble(
517  1,
518  1,
519  1,
520  1,
521  )
522  process.mix.digitizers.pixel.theModuleEfficiency_BPix2 = cms.vdouble(
523  1,
524  1,
525  1,
526  1,
527  )
528  process.mix.digitizers.pixel.theModuleEfficiency_BPix3 = cms.vdouble(
529  1,
530  1,
531  1,
532  1,
533  )
534  process.mix.digitizers.pixel.thePUEfficiency_BPix1 = cms.vdouble(
535  1.00023,
536  -3.18350e-06,
537  5.08503e-10,
538  -6.79785e-14,
539  )
540  process.mix.digitizers.pixel.thePUEfficiency_BPix2 = cms.vdouble(
541  9.99974e-01,
542  -8.91313e-07,
543  5.29196e-12,
544  -2.28725e-15,
545  )
546  process.mix.digitizers.pixel.thePUEfficiency_BPix3 = cms.vdouble(
547  1.00005,
548  -6.59249e-07,
549  2.75277e-11,
550  -1.62683e-15,
551  )
552  if hasattr(process,'mixData'):
553  # pixel dynamic inefficency - 13TeV - 25ns case
554  process.mixData.theInstLumiScaleFactor = cms.double(364)
555  process.mixData.theLadderEfficiency_BPix1 = cms.vdouble(
556  1,
557  1,
558  1,
559  1,
560  1,
561  1,
562  1,
563  1,
564  1,
565  1,
566  1,
567  1,
568  1,
569  1,
570  1,
571  1,
572  1,
573  1,
574  1,
575  1,
576  )
577  process.mixData.theLadderEfficiency_BPix2 = cms.vdouble(
578  1,
579  1,
580  1,
581  1,
582  1,
583  1,
584  1,
585  1,
586  1,
587  1,
588  1,
589  1,
590  1,
591  1,
592  1,
593  1,
594  1,
595  1,
596  1,
597  1,
598  1,
599  1,
600  1,
601  1,
602  1,
603  1,
604  1,
605  1,
606  1,
607  1,
608  1,
609  1,
610  )
611  process.mixData.theLadderEfficiency_BPix3 = cms.vdouble(
612  1,
613  1,
614  1,
615  1,
616  1,
617  1,
618  1,
619  1,
620  1,
621  1,
622  1,
623  1,
624  1,
625  1,
626  1,
627  1,
628  1,
629  1,
630  1,
631  1,
632  1,
633  1,
634  1,
635  1,
636  1,
637  1,
638  1,
639  1,
640  1,
641  1,
642  1,
643  1,
644  1,
645  1,
646  1,
647  1,
648  1,
649  1,
650  1,
651  1,
652  1,
653  1,
654  1,
655  1,
656  )
657  process.mixData.theModuleEfficiency_BPix1 = cms.vdouble(
658  1,
659  1,
660  1,
661  1,
662  )
663  process.mixData.theModuleEfficiency_BPix2 = cms.vdouble(
664  1,
665  1,
666  1,
667  1,
668  )
669  process.mixData.theModuleEfficiency_BPix3 = cms.vdouble(
670  1,
671  1,
672  1,
673  1,
674  )
675  process.mixData.thePUEfficiency_BPix1 = cms.vdouble(
676  1.00023,
677  -3.18350e-06,
678  5.08503e-10,
679  -6.79785e-14,
680  )
681  process.mixData.thePUEfficiency_BPix2 = cms.vdouble(
682  9.99974e-01,
683  -8.91313e-07,
684  5.29196e-12,
685  -2.28725e-15,
686  )
687  process.mixData.thePUEfficiency_BPix3 = cms.vdouble(
688  1.00005,
689  -6.59249e-07,
690  2.75277e-11,
691  -1.62683e-15,
692  )
693  return process
694 
695 
696 def customise_L1Emulator(process):
697  return process
698 
699 
700 def customise_RawToDigi(process):
701  process.RawToDigi.remove(process.gtEvmDigis)
702  return process
703 
704 
705 def customise_DigiToRaw(process):
706  return process
707 
708 
709 def customise_HLT(process):
710  return process
711 
712 
713 def customise_Reco(process):
714  #lowering HO threshold with SiPM
715  if hasattr(process,'particleFlowRecHitHO'):
716  for prod in process.particleFlowRecHitHO.producers:
717  prod.qualityTests = cms.VPSet(
718  cms.PSet(
719  name = cms.string("PFRecHitQTestThreshold"),
720  threshold = cms.double(0.05) # new threshold for SiPM HO
721  ),
722  cms.PSet(
723  name = cms.string("PFRecHitQTestHCALChannel"),
724  maxSeverities = cms.vint32(11),
725  cleaningThresholds = cms.vdouble(0.0),
726  flags = cms.vstring('Standard')
727  )
728  )
729 
730  #Lower Thresholds also for Clusters!!!
731 
732  for p in process.particleFlowClusterHO.seedFinder.thresholdsByDetector:
733  p.seedingThreshold = cms.double(0.08)
734 
735  for p in process.particleFlowClusterHO.initialClusteringStep.thresholdsByDetector:
736  p.gatheringThreshold = cms.double(0.05)
737 
738  for p in process.particleFlowClusterHO.pfClusterBuilder.recHitEnergyNorms:
739  p.recHitEnergyNorm = cms.double(0.05)
740 
741  process.particleFlowClusterHO.pfClusterBuilder.positionCalc.logWeightDenominator = cms.double(0.05)
742  process.particleFlowClusterHO.pfClusterBuilder.allCellsPositionCalc.logWeightDenominator = cms.double(0.05)
743 
744  return process
745 
746 
747 def customise_harvesting(process):
748  #process.dqmHarvesting.remove(process.dataCertificationJetMET)
749  #process.dqmHarvesting.remove(process.sipixelEDAClient)
750  #process.dqmHarvesting.remove(process.sipixelCertification)
751  return (process)
752 
753 
754 def recoOutputCustoms(process):
755 
756  alist=['AODSIM','RECOSIM','FEVTSIM','FEVTDEBUG','FEVTDEBUGHLT','RECODEBUG','RAWRECOSIMHLT','RAWRECODEBUGHLT']
757  for a in alist:
758  b = a + 'output'
759  if hasattr(process,b):
760  getattr(process,b).outputCommands.append('keep *_simMuonCSCDigis_*_*')
761  getattr(process,b).outputCommands.append('keep *_simMuonRPCDigis_*_*')
762  getattr(process,b).outputCommands.append('keep *_simHcalUnsuppressedDigis_*_*')
763  getattr(process,b).outputCommands.append('keep *_rawDataCollector_*_*')
764  return process
def customisePostLS1_lowPU
def customisePostLS1_Common
def customiseSimL1EmulatorForPostLS1_Additional_HI
def customiseSimL1EmulatorForStage1
def customise_csc_PostLS1
Definition: muonCustoms.py:233
def customise_fastSimPostLS1
def customisePostLS1_B0T_lowPU