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 customiseSimL1EmulatorForPostLS1_25ns
46  process = customiseSimL1EmulatorForPostLS1_25ns(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 
61 
62  # deal with L1 Emulation separately
63  from L1Trigger.L1TCommon.customsPostLS1 import customiseSimL1EmulatorForPostLS1_lowPU
65 
66  # common customisations
67  process = customisePostLS1_Common(process)
68 
69  # 50ns specific customisation
70  if hasattr(process,'digitisation_step'):
71  process = customise_Digi_50ns(process)
72 
73  return process
74 
75 def customisePostLS1_50ns(process):
76 
77  # deal with L1 Emulation separately
78  from L1Trigger.L1TCommon.customsPostLS1 import customiseSimL1EmulatorForPostLS1_50ns
79  process = customiseSimL1EmulatorForPostLS1_50ns(process)
80 
81  # common customisations
82  process = customisePostLS1_Common(process)
83 
84  # 50ns specific customisation
85  if hasattr(process,'digitisation_step'):
86  process = customise_Digi_50ns(process)
87 
88  return process
89 
90 
91 def customisePostLS1_HI(process):
92 
93  # deal with L1 Emulation separately
94  from L1Trigger.L1TCommon.customsPostLS1 import customiseSimL1EmulatorForPostLS1_HI
95  process = customiseSimL1EmulatorForPostLS1_HI(process)
96 
97  # common customisation
98  process = customisePostLS1_Common(process)
99 
100  return process
101 
102 def customisePostLS1_B0T(process):
103  # 50ns only
104 
105  process=customisePostLS1_50ns(process)
106  process=customiseForRunI(process)
107 
108  return process
109 
111  # 50ns only
112 
113  process=customisePostLS1_lowPU(process)
114  process=customiseForRunI(process)
115 
116  return process
117 
118 
119 def digiEventContent(process):
120  #extend the event content
121 
122  alist=['RAWSIM','RAWDEBUG','FEVTDEBUG','FEVTDEBUGHLT','GENRAW','RAWSIMHLT','FEVT','PREMIX','PREMIXRAW']
123  for a in alist:
124  b = a + 'output'
125  if hasattr(process,b):
126  getattr(process,b).outputCommands.append('keep *_simMuonCSCDigis_*_*')
127  getattr(process,b).outputCommands.append('keep *_simMuonRPCDigis_*_*')
128  getattr(process,b).outputCommands.append('keep *_simHcalUnsuppressedDigis_*_*')
129 
130  return process
131 
132 
133 def customise_DQM(process):
134  #process.dqmoffline_step.remove(process.jetMETAnalyzer)
135  # Turn off flag of gangedME11a
136  process.l1tCsctf.gangedME11a = cms.untracked.bool(False)
137  # Turn off "low bias voltage" region in HCAL noise filters
138  if hasattr(process,'HBHENoiseFilterResultProducer'):
139  process.HBHENoiseFilterResultProducer.IgnoreTS4TS5ifJetInLowBVRegion = cms.bool(False)
140  return process
141 
142 
143 def customise_DQM_25ns(process):
144  # Switch the default decision of the HCAL noise filter
145  if hasattr(process,'HBHENoiseFilterResultProducer'):
146  process.HBHENoiseFilterResultProducer.defaultDecision = cms.string("HBHENoiseFilterResultRun2Loose")
147  return process
148 
149 
150 def customise_Validation(process):
151  #process.validation_step.remove(process.PixelTrackingRecHitsValid)
152  # We don't run the HLT
153  #process.validation_step.remove(process.HLTSusyExoVal)
154  #process.validation_step.remove(process.hltHiggsValidator)
155  return process
156 
157 
158 def customise_Sim(process):
159  # enable 2015 HF shower library
160  process.g4SimHits.HFShowerLibrary.FileName = 'SimG4CMS/Calo/data/HFShowerLibrary_npmt_noatt_eta4_16en_v3.root'
161  return process
162 
163 
165  process = digiEventContent(process)
166  if hasattr(process,'mix') and hasattr(process.mix,'digitizers'):
167  if hasattr(process.mix.digitizers,'hcal') and hasattr(process.mix.digitizers.hcal,'ho'):
168  process.mix.digitizers.hcal.ho.photoelectronsToAnalog = cms.vdouble([4.0]*16)
169  process.mix.digitizers.hcal.ho.siPMCode = cms.int32(1)
170  process.mix.digitizers.hcal.ho.pixels = cms.int32(2500)
171  process.mix.digitizers.hcal.ho.doSiPMSmearing = cms.bool(False)
172  if hasattr(process.mix.digitizers,'hcal') and hasattr(process.mix.digitizers.hcal,'hf1'):
173  process.mix.digitizers.hcal.hf1.samplingFactor = cms.double(0.60)
174  if hasattr(process.mix.digitizers,'hcal') and hasattr(process.mix.digitizers.hcal,'hf2'):
175  process.mix.digitizers.hcal.hf2.samplingFactor = cms.double(0.60)
176  return process
177 
178 def customise_DataMix(process):
179  if hasattr(process,'mixData'):
180  if hasattr(process.mixData,'ho'):
181  process.mixData.ho.photoelectronsToAnalog = cms.vdouble([4.0]*16)
182  process.mixData.ho.siPMCode = cms.int32(1)
183  process.mixData.ho.pixels = cms.int32(2500)
184  process.mixData.ho.doSiPMSmearing = cms.bool(False)
185  if hasattr(process.mixData,'hf1'):
186  process.mixData.hf1.samplingFactor = cms.double(0.60)
187  if hasattr(process.mixData,'hf2'):
188  process.mixData.hf2.samplingFactor = cms.double(0.60)
189  return process
190 
191 
192 def customise_Digi_50ns(process):
193  if hasattr(process,'mix') and hasattr(process.mix,'digitizers'):
194  if hasattr(process.mix.digitizers,'pixel'):
195  # pixel dynamic inefficency - 13TeV - 50ns case
196  process.mix.digitizers.pixel.theInstLumiScaleFactor = cms.double(246.4)
197  process.mix.digitizers.pixel.theLadderEfficiency_BPix1 = cms.vdouble(
198  0.979259,
199  0.976677,
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  )
219  process.mix.digitizers.pixel.theLadderEfficiency_BPix2 = cms.vdouble(
220  0.994321,
221  0.993944,
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  )
253  process.mix.digitizers.pixel.theLadderEfficiency_BPix3 = cms.vdouble(
254  0.996787,
255  0.996945,
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  )
299  if hasattr(process,'mixData'):
300  # pixel dynamic inefficency - 13TeV - 50ns case
301  process.mixData.theInstLumiScaleFactor = cms.double(246.4)
302  process.mixData.theLadderEfficiency_BPix1 = cms.vdouble(
303  0.979259,
304  0.976677,
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  )
324  process.mixData.theLadderEfficiency_BPix2 = cms.vdouble(
325  0.994321,
326  0.993944,
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  )
358  process.mixData.theLadderEfficiency_BPix3 = cms.vdouble(
359  0.996787,
360  0.996945,
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  )
404  return process
405 
406 
407 def customise_Digi_25ns(process):
408  if hasattr(process,'mix') and hasattr(process.mix,'digitizers'):
409  if hasattr(process.mix.digitizers,'pixel'):
410  # pixel dynamic inefficency - 13TeV - 25ns case
411  process.mix.digitizers.pixel.theInstLumiScaleFactor = cms.double(364)
412  process.mix.digitizers.pixel.theLadderEfficiency_BPix1 = cms.vdouble(
413  1,
414  1,
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  )
434  process.mix.digitizers.pixel.theLadderEfficiency_BPix2 = cms.vdouble(
435  1,
436  1,
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  )
468  process.mix.digitizers.pixel.theLadderEfficiency_BPix3 = cms.vdouble(
469  1,
470  1,
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  )
514  process.mix.digitizers.pixel.theModuleEfficiency_BPix1 = cms.vdouble(
515  1,
516  1,
517  1,
518  1,
519  )
520  process.mix.digitizers.pixel.theModuleEfficiency_BPix2 = cms.vdouble(
521  1,
522  1,
523  1,
524  1,
525  )
526  process.mix.digitizers.pixel.theModuleEfficiency_BPix3 = cms.vdouble(
527  1,
528  1,
529  1,
530  1,
531  )
532  process.mix.digitizers.pixel.thePUEfficiency_BPix1 = cms.vdouble(
533  1.00023,
534  -3.18350e-06,
535  5.08503e-10,
536  -6.79785e-14,
537  )
538  process.mix.digitizers.pixel.thePUEfficiency_BPix2 = cms.vdouble(
539  9.99974e-01,
540  -8.91313e-07,
541  5.29196e-12,
542  -2.28725e-15,
543  )
544  process.mix.digitizers.pixel.thePUEfficiency_BPix3 = cms.vdouble(
545  1.00005,
546  -6.59249e-07,
547  2.75277e-11,
548  -1.62683e-15,
549  )
550  if hasattr(process,'mixData'):
551  # pixel dynamic inefficency - 13TeV - 25ns case
552  process.mixData.theInstLumiScaleFactor = cms.double(364)
553  process.mixData.theLadderEfficiency_BPix1 = cms.vdouble(
554  1,
555  1,
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  )
575  process.mixData.theLadderEfficiency_BPix2 = cms.vdouble(
576  1,
577  1,
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  )
609  process.mixData.theLadderEfficiency_BPix3 = cms.vdouble(
610  1,
611  1,
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  )
655  process.mixData.theModuleEfficiency_BPix1 = cms.vdouble(
656  1,
657  1,
658  1,
659  1,
660  )
661  process.mixData.theModuleEfficiency_BPix2 = cms.vdouble(
662  1,
663  1,
664  1,
665  1,
666  )
667  process.mixData.theModuleEfficiency_BPix3 = cms.vdouble(
668  1,
669  1,
670  1,
671  1,
672  )
673  process.mixData.thePUEfficiency_BPix1 = cms.vdouble(
674  1.00023,
675  -3.18350e-06,
676  5.08503e-10,
677  -6.79785e-14,
678  )
679  process.mixData.thePUEfficiency_BPix2 = cms.vdouble(
680  9.99974e-01,
681  -8.91313e-07,
682  5.29196e-12,
683  -2.28725e-15,
684  )
685  process.mixData.thePUEfficiency_BPix3 = cms.vdouble(
686  1.00005,
687  -6.59249e-07,
688  2.75277e-11,
689  -1.62683e-15,
690  )
691  return process
692 
693 
694 def customise_L1Emulator(process):
695  return process
696 
697 
698 def customise_RawToDigi(process):
699  process.RawToDigi.remove(process.gtEvmDigis)
700  return process
701 
702 
703 def customise_DigiToRaw(process):
704  return process
705 
706 
707 def customise_HLT(process):
708  return process
709 
710 
711 def customise_Reco(process):
712  #lowering HO threshold with SiPM
713  if hasattr(process,'particleFlowRecHitHO'):
714  for prod in process.particleFlowRecHitHO.producers:
715  prod.qualityTests = cms.VPSet(
716  cms.PSet(
717  name = cms.string("PFRecHitQTestThreshold"),
718  threshold = cms.double(0.05) # new threshold for SiPM HO
719  ),
720  cms.PSet(
721  name = cms.string("PFRecHitQTestHCALChannel"),
722  maxSeverities = cms.vint32(11),
723  cleaningThresholds = cms.vdouble(0.0),
724  flags = cms.vstring('Standard')
725  )
726  )
727 
728  #Lower Thresholds also for Clusters!!!
729 
730  for p in process.particleFlowClusterHO.seedFinder.thresholdsByDetector:
731  p.seedingThreshold = cms.double(0.08)
732 
733  for p in process.particleFlowClusterHO.initialClusteringStep.thresholdsByDetector:
734  p.gatheringThreshold = cms.double(0.05)
735 
736  for p in process.particleFlowClusterHO.pfClusterBuilder.recHitEnergyNorms:
737  p.recHitEnergyNorm = cms.double(0.05)
738 
739  process.particleFlowClusterHO.pfClusterBuilder.positionCalc.logWeightDenominator = cms.double(0.05)
740  process.particleFlowClusterHO.pfClusterBuilder.allCellsPositionCalc.logWeightDenominator = cms.double(0.05)
741 
742  return process
743 
744 
745 def customise_harvesting(process):
746  #process.dqmHarvesting.remove(process.dataCertificationJetMET)
747  #process.dqmHarvesting.remove(process.sipixelEDAClient)
748  #process.dqmHarvesting.remove(process.sipixelCertification)
749  return (process)
750 
751 
752 def recoOutputCustoms(process):
753 
754  alist=['AODSIM','RECOSIM','FEVTSIM','FEVTDEBUG','FEVTDEBUGHLT','RECODEBUG','RAWRECOSIMHLT','RAWRECODEBUGHLT']
755  for a in alist:
756  b = a + 'output'
757  if hasattr(process,b):
758  getattr(process,b).outputCommands.append('keep *_simMuonCSCDigis_*_*')
759  getattr(process,b).outputCommands.append('keep *_simMuonRPCDigis_*_*')
760  getattr(process,b).outputCommands.append('keep *_simHcalUnsuppressedDigis_*_*')
761  getattr(process,b).outputCommands.append('keep *_rawDataCollector_*_*')
762  return process
def customiseSimL1EmulatorForPostLS1_HI
def customisePostLS1_lowPU
def customiseSimL1EmulatorForPostLS1_50ns
def customisePostLS1_Common
def customiseSimL1EmulatorForPostLS1_lowPU
def customise_csc_PostLS1
Definition: muonCustoms.py:233
def customise_fastSimPostLS1
def customiseSimL1EmulatorForPostLS1_25ns
def customisePostLS1_B0T_lowPU