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 
53  return process
54 
55 
56 def customisePostLS1_50ns(process):
57 
58  # deal with L1 Emulation separately
59  from L1Trigger.L1TCommon.customsPostLS1 import customiseSimL1EmulatorForPostLS1_50ns
60  process = customiseSimL1EmulatorForPostLS1_50ns(process)
61 
62  # common customisations
63  process = customisePostLS1_Common(process)
64 
65  # 50ns specific customisation
66  if hasattr(process,'digitisation_step'):
67  process = customise_Digi_50ns(process)
68 
69  return process
70 
71 
72 def customisePostLS1_HI(process):
73 
74  # deal with L1 Emulation separately
75  from L1Trigger.L1TCommon.customsPostLS1 import customiseSimL1EmulatorForPostLS1_HI
76  process = customiseSimL1EmulatorForPostLS1_HI(process)
77 
78  # common customisation
79  process = customisePostLS1_Common(process)
80 
81  return process
82 
83 
84 def digiEventContent(process):
85  #extend the event content
86 
87  alist=['RAWSIM','RAWDEBUG','FEVTDEBUG','FEVTDEBUGHLT','GENRAW','RAWSIMHLT','FEVT','PREMIX','PREMIXRAW']
88  for a in alist:
89  b = a + 'output'
90  if hasattr(process,b):
91  getattr(process,b).outputCommands.append('keep *_simMuonCSCDigis_*_*')
92  getattr(process,b).outputCommands.append('keep *_simMuonRPCDigis_*_*')
93  getattr(process,b).outputCommands.append('keep *_simHcalUnsuppressedDigis_*_*')
94 
95  return process
96 
97 
98 def customise_DQM(process):
99  #process.dqmoffline_step.remove(process.jetMETAnalyzer)
100  # Turn off flag of gangedME11a
101  process.l1tCsctf.gangedME11a = cms.untracked.bool(False)
102  return process
103 
104 
105 def customise_Validation(process):
106  #process.validation_step.remove(process.PixelTrackingRecHitsValid)
107  # We don't run the HLT
108  #process.validation_step.remove(process.HLTSusyExoVal)
109  #process.validation_step.remove(process.hltHiggsValidator)
110  return process
111 
112 
113 def customise_Sim(process):
114  # enable 2015 HF shower library
115  process.g4SimHits.HFShowerLibrary.FileName = 'SimG4CMS/Calo/data/HFShowerLibrary_npmt_noatt_eta4_16en_v3.root'
116  return process
117 
118 
120  process = digiEventContent(process)
121  if hasattr(process,'mix') and hasattr(process.mix,'digitizers'):
122  if hasattr(process.mix.digitizers,'hcal') and hasattr(process.mix.digitizers.hcal,'ho'):
123  process.mix.digitizers.hcal.ho.photoelectronsToAnalog = cms.vdouble([4.0]*16)
124  process.mix.digitizers.hcal.ho.siPMCode = cms.int32(1)
125  process.mix.digitizers.hcal.ho.pixels = cms.int32(2500)
126  process.mix.digitizers.hcal.ho.doSiPMSmearing = cms.bool(False)
127  if hasattr(process.mix.digitizers,'hcal') and hasattr(process.mix.digitizers.hcal,'hf1'):
128  process.mix.digitizers.hcal.hf1.samplingFactor = cms.double(0.60)
129  if hasattr(process.mix.digitizers,'hcal') and hasattr(process.mix.digitizers.hcal,'hf2'):
130  process.mix.digitizers.hcal.hf2.samplingFactor = cms.double(0.60)
131  return process
132 
133 def customise_DataMix(process):
134  if hasattr(process,'mixData'):
135  if hasattr(process.mixData,'ho'):
136  process.mixData.ho.photoelectronsToAnalog = cms.vdouble([4.0]*16)
137  process.mixData.ho.siPMCode = cms.int32(1)
138  process.mixData.ho.pixels = cms.int32(2500)
139  process.mixData.ho.doSiPMSmearing = cms.bool(False)
140  if hasattr(process.mixData,'hf1'):
141  process.mixData.hf1.samplingFactor = cms.double(0.60)
142  if hasattr(process.mixData,'hf2'):
143  process.mixData.hf2.samplingFactor = cms.double(0.60)
144  return process
145 
146 
147 def customise_Digi_50ns(process):
148  if hasattr(process,'mix') and hasattr(process.mix,'digitizers'):
149  if hasattr(process.mix.digitizers,'pixel'):
150  # pixel dynamic inefficency - 13TeV - 50ns case
151  process.mix.digitizers.pixel.theInstLumiScaleFactor = cms.double(246.4)
152  process.mix.digitizers.pixel.theLadderEfficiency_BPix1 = cms.vdouble(
153  0.979259,
154  0.976677,
155  0.979259,
156  0.976677,
157  0.979259,
158  0.976677,
159  0.979259,
160  0.976677,
161  0.979259,
162  0.976677,
163  0.979259,
164  0.976677,
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  )
174  process.mix.digitizers.pixel.theLadderEfficiency_BPix2 = cms.vdouble(
175  0.994321,
176  0.993944,
177  0.994321,
178  0.993944,
179  0.994321,
180  0.993944,
181  0.994321,
182  0.993944,
183  0.994321,
184  0.993944,
185  0.994321,
186  0.993944,
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  )
208  process.mix.digitizers.pixel.theLadderEfficiency_BPix3 = cms.vdouble(
209  0.996787,
210  0.996945,
211  0.996787,
212  0.996945,
213  0.996787,
214  0.996945,
215  0.996787,
216  0.996945,
217  0.996787,
218  0.996945,
219  0.996787,
220  0.996945,
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  )
254  if hasattr(process,'mixData'):
255  # pixel dynamic inefficency - 13TeV - 50ns case
256  process.mixData.theInstLumiScaleFactor = cms.double(246.4)
257  process.mixData.theLadderEfficiency_BPix1 = cms.vdouble(
258  0.979259,
259  0.976677,
260  0.979259,
261  0.976677,
262  0.979259,
263  0.976677,
264  0.979259,
265  0.976677,
266  0.979259,
267  0.976677,
268  0.979259,
269  0.976677,
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  )
279  process.mixData.theLadderEfficiency_BPix2 = cms.vdouble(
280  0.994321,
281  0.993944,
282  0.994321,
283  0.993944,
284  0.994321,
285  0.993944,
286  0.994321,
287  0.993944,
288  0.994321,
289  0.993944,
290  0.994321,
291  0.993944,
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  )
313  process.mixData.theLadderEfficiency_BPix3 = cms.vdouble(
314  0.996787,
315  0.996945,
316  0.996787,
317  0.996945,
318  0.996787,
319  0.996945,
320  0.996787,
321  0.996945,
322  0.996787,
323  0.996945,
324  0.996787,
325  0.996945,
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  )
359  return process
360 
361 
362 def customise_Digi_25ns(process):
363  if hasattr(process,'mix') and hasattr(process.mix,'digitizers'):
364  if hasattr(process.mix.digitizers,'pixel'):
365  # pixel dynamic inefficency - 13TeV - 25ns case
366  process.mix.digitizers.pixel.theInstLumiScaleFactor = cms.double(364)
367  process.mix.digitizers.pixel.theLadderEfficiency_BPix1 = cms.vdouble(
368  1,
369  1,
370  1,
371  1,
372  1,
373  1,
374  1,
375  1,
376  1,
377  1,
378  1,
379  1,
380  1,
381  1,
382  1,
383  1,
384  1,
385  1,
386  1,
387  1,
388  )
389  process.mix.digitizers.pixel.theLadderEfficiency_BPix2 = cms.vdouble(
390  1,
391  1,
392  1,
393  1,
394  1,
395  1,
396  1,
397  1,
398  1,
399  1,
400  1,
401  1,
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  )
423  process.mix.digitizers.pixel.theLadderEfficiency_BPix3 = cms.vdouble(
424  1,
425  1,
426  1,
427  1,
428  1,
429  1,
430  1,
431  1,
432  1,
433  1,
434  1,
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  1,
468  )
469  process.mix.digitizers.pixel.theModuleEfficiency_BPix1 = cms.vdouble(
470  1,
471  1,
472  1,
473  1,
474  )
475  process.mix.digitizers.pixel.theModuleEfficiency_BPix2 = cms.vdouble(
476  1,
477  1,
478  1,
479  1,
480  )
481  process.mix.digitizers.pixel.theModuleEfficiency_BPix3 = cms.vdouble(
482  1,
483  1,
484  1,
485  1,
486  )
487  process.mix.digitizers.pixel.thePUEfficiency_BPix1 = cms.vdouble(
488  1.00023,
489  -3.18350e-06,
490  5.08503e-10,
491  -6.79785e-14,
492  )
493  process.mix.digitizers.pixel.thePUEfficiency_BPix2 = cms.vdouble(
494  9.99974e-01,
495  -8.91313e-07,
496  5.29196e-12,
497  -2.28725e-15,
498  )
499  process.mix.digitizers.pixel.thePUEfficiency_BPix3 = cms.vdouble(
500  1.00005,
501  -6.59249e-07,
502  2.75277e-11,
503  -1.62683e-15,
504  )
505  if hasattr(process,'mixData'):
506  # pixel dynamic inefficency - 13TeV - 25ns case
507  process.mixData.theInstLumiScaleFactor = cms.double(364)
508  process.mixData.theLadderEfficiency_BPix1 = cms.vdouble(
509  1,
510  1,
511  1,
512  1,
513  1,
514  1,
515  1,
516  1,
517  1,
518  1,
519  1,
520  1,
521  1,
522  1,
523  1,
524  1,
525  1,
526  1,
527  1,
528  1,
529  )
530  process.mixData.theLadderEfficiency_BPix2 = cms.vdouble(
531  1,
532  1,
533  1,
534  1,
535  1,
536  1,
537  1,
538  1,
539  1,
540  1,
541  1,
542  1,
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  )
564  process.mixData.theLadderEfficiency_BPix3 = cms.vdouble(
565  1,
566  1,
567  1,
568  1,
569  1,
570  1,
571  1,
572  1,
573  1,
574  1,
575  1,
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  1,
609  )
610  process.mixData.theModuleEfficiency_BPix1 = cms.vdouble(
611  1,
612  1,
613  1,
614  1,
615  )
616  process.mixData.theModuleEfficiency_BPix2 = cms.vdouble(
617  1,
618  1,
619  1,
620  1,
621  )
622  process.mixData.theModuleEfficiency_BPix3 = cms.vdouble(
623  1,
624  1,
625  1,
626  1,
627  )
628  process.mixData.thePUEfficiency_BPix1 = cms.vdouble(
629  1.00023,
630  -3.18350e-06,
631  5.08503e-10,
632  -6.79785e-14,
633  )
634  process.mixData.thePUEfficiency_BPix2 = cms.vdouble(
635  9.99974e-01,
636  -8.91313e-07,
637  5.29196e-12,
638  -2.28725e-15,
639  )
640  process.mixData.thePUEfficiency_BPix3 = cms.vdouble(
641  1.00005,
642  -6.59249e-07,
643  2.75277e-11,
644  -1.62683e-15,
645  )
646  return process
647 
648 
649 def customise_L1Emulator(process):
650  return process
651 
652 
653 def customise_RawToDigi(process):
654  return process
655 
656 
657 def customise_DigiToRaw(process):
658  return process
659 
660 
661 def customise_HLT(process):
662  return process
663 
664 
665 def customise_Reco(process):
666  #lowering HO threshold with SiPM
667  for prod in process.particleFlowRecHitHO.producers:
668  prod.qualityTests = cms.VPSet(
669  cms.PSet(
670  name = cms.string("PFRecHitQTestThreshold"),
671  threshold = cms.double(0.05) # new threshold for SiPM HO
672  ),
673  cms.PSet(
674  name = cms.string("PFRecHitQTestHCALChannel"),
675  maxSeverities = cms.vint32(11),
676  cleaningThresholds = cms.vdouble(0.0),
677  flags = cms.vstring('Standard')
678  )
679  )
680 
681  #Lower Thresholds also for Clusters!!!
682 
683  for p in process.particleFlowClusterHO.seedFinder.thresholdsByDetector:
684  p.seedingThreshold = cms.double(0.08)
685 
686  for p in process.particleFlowClusterHO.initialClusteringStep.thresholdsByDetector:
687  p.gatheringThreshold = cms.double(0.05)
688 
689  for p in process.particleFlowClusterHO.pfClusterBuilder.recHitEnergyNorms:
690  p.recHitEnergyNorm = cms.double(0.05)
691 
692  process.particleFlowClusterHO.pfClusterBuilder.positionCalc.logWeightDenominator = cms.double(0.05)
693  process.particleFlowClusterHO.pfClusterBuilder.allCellsPositionCalc.logWeightDenominator = cms.double(0.05)
694 
695  return process
696 
697 
698 def customise_harvesting(process):
699  #process.dqmHarvesting.remove(process.dataCertificationJetMET)
700  #process.dqmHarvesting.remove(process.sipixelEDAClient)
701  #process.dqmHarvesting.remove(process.sipixelCertification)
702  return (process)
703 
704 
705 def recoOutputCustoms(process):
706 
707  alist=['AODSIM','RECOSIM','FEVTSIM','FEVTDEBUG','FEVTDEBUGHLT','RECODEBUG','RAWRECOSIMHLT','RAWRECODEBUGHLT']
708  for a in alist:
709  b = a + 'output'
710  if hasattr(process,b):
711  getattr(process,b).outputCommands.append('keep *_simMuonCSCDigis_*_*')
712  getattr(process,b).outputCommands.append('keep *_simMuonRPCDigis_*_*')
713  getattr(process,b).outputCommands.append('keep *_simHcalUnsuppressedDigis_*_*')
714  getattr(process,b).outputCommands.append('keep *_rawDataCollector_*_*')
715  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