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