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.
1 
2 import FWCore.ParameterSet.Config as cms
3 
4 from SLHCUpgradeSimulations.Configuration.muonCustoms import customise_csc_PostLS1,customise_csc_hlt
5 from L1Trigger.L1TCommon.customsPostLS1 import customiseSimL1EmulatorForPostLS1
6 
7 def customisePostLS1(process):
8 
9  # deal with CSC separately:
10  process = customise_csc_PostLS1(process)
11 
12  # deal with L1 Emulation separately:
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'):
25  process=customise_Digi(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 
37  return process
38 
39 
40 def digiEventContent(process):
41  #extend the event content
42 
43  alist=['RAWSIM','RAWDEBUG','FEVTDEBUG','FEVTDEBUGHLT','GENRAW','RAWSIMHLT','FEVT']
44  for a in alist:
45  b=a+'output'
46  if hasattr(process,b):
47  getattr(process,b).outputCommands.append('keep *_simMuonCSCDigis_*_*')
48  getattr(process,b).outputCommands.append('keep *_simMuonRPCDigis_*_*')
49  getattr(process,b).outputCommands.append('keep *_simHcalUnsuppressedDigis_*_*')
50 
51  return process
52 
53 
54 def customise_DQM(process):
55  #process.dqmoffline_step.remove(process.jetMETAnalyzer)
56  # Turn off flag of gangedME11a
57  process.l1tCsctf.gangedME11a = cms.untracked.bool(False)
58  return process
59 
60 
61 def customise_Validation(process):
62  #process.validation_step.remove(process.PixelTrackingRecHitsValid)
63  # We don't run the HLT
64  #process.validation_step.remove(process.HLTSusyExoVal)
65  #process.validation_step.remove(process.hltHiggsValidator)
66  return process
67 
68 
69 def customise_Sim(process):
70  # enable 2015 HF shower library
71  process.g4SimHits.HFShowerLibrary.FileName = 'SimG4CMS/Calo/data/HFShowerLibrary_npmt_noatt_eta4_16en.root'
72  return process
73 
74 
75 def customise_Digi(process):
76  process=digiEventContent(process)
77  if hasattr(process,'mix') and hasattr(process.mix,'digitizers'):
78  if hasattr(process.mix.digitizers,'hcal') and hasattr(process.mix.digitizers.hcal,'ho'):
79  process.mix.digitizers.hcal.ho.photoelectronsToAnalog = cms.vdouble([4.0]*16)
80  process.mix.digitizers.hcal.ho.siPMCode = cms.int32(1)
81  process.mix.digitizers.hcal.ho.pixels = cms.int32(2500)
82  process.mix.digitizers.hcal.ho.doSiPMSmearing = cms.bool(False)
83  if hasattr(process.mix.digitizers,'hcal') and hasattr(process.mix.digitizers.hcal,'hf1'):
84  process.mix.digitizers.hcal.hf1.samplingFactor = cms.double(0.60)
85  if hasattr(process.mix.digitizers,'hcal') and hasattr(process.mix.digitizers.hcal,'hf2'):
86  process.mix.digitizers.hcal.hf2.samplingFactor = cms.double(0.60)
87  if hasattr(process.mix.digitizers,'pixel'):
88  # DynamicInefficency - 13TeV - 50ns case
89  if process.mix.bunchspace == 50:
90  process.mix.digitizers.pixel.theInstLumiScaleFactor = cms.double(246.4)
91  process.mix.digitizers.pixel.theLadderEfficiency_BPix1 = cms.vdouble(
92  0.979259,
93  0.976677,
94  0.979259,
95  0.976677,
96  0.979259,
97  0.976677,
98  0.979259,
99  0.976677,
100  0.979259,
101  0.976677,
102  0.979259,
103  0.976677,
104  0.979259,
105  0.976677,
106  0.979259,
107  0.976677,
108  0.979259,
109  0.976677,
110  0.979259,
111  0.976677,
112  )
113  process.mix.digitizers.pixel.theLadderEfficiency_BPix2 = cms.vdouble(
114  0.994321,
115  0.993944,
116  0.994321,
117  0.993944,
118  0.994321,
119  0.993944,
120  0.994321,
121  0.993944,
122  0.994321,
123  0.993944,
124  0.994321,
125  0.993944,
126  0.994321,
127  0.993944,
128  0.994321,
129  0.993944,
130  0.994321,
131  0.993944,
132  0.994321,
133  0.993944,
134  0.994321,
135  0.993944,
136  0.994321,
137  0.993944,
138  0.994321,
139  0.993944,
140  0.994321,
141  0.993944,
142  0.994321,
143  0.993944,
144  0.994321,
145  0.993944,
146  )
147  process.mix.digitizers.pixel.theLadderEfficiency_BPix3 = cms.vdouble(
148  0.996787,
149  0.996945,
150  0.996787,
151  0.996945,
152  0.996787,
153  0.996945,
154  0.996787,
155  0.996945,
156  0.996787,
157  0.996945,
158  0.996787,
159  0.996945,
160  0.996787,
161  0.996945,
162  0.996787,
163  0.996945,
164  0.996787,
165  0.996945,
166  0.996787,
167  0.996945,
168  0.996787,
169  0.996945,
170  0.996787,
171  0.996945,
172  0.996787,
173  0.996945,
174  0.996787,
175  0.996945,
176  0.996787,
177  0.996945,
178  0.996787,
179  0.996945,
180  0.996787,
181  0.996945,
182  0.996787,
183  0.996945,
184  0.996787,
185  0.996945,
186  0.996787,
187  0.996945,
188  0.996787,
189  0.996945,
190  0.996787,
191  0.996945,
192  )
193  # DynamicInefficency - 13TeV - 25ns case
194  if process.mix.bunchspace == 25:
195  process.mix.digitizers.pixel.theInstLumiScaleFactor = cms.double(364)
196  process.mix.digitizers.pixel.theLadderEfficiency_BPix1 = cms.vdouble(
197  1,
198  1,
199  1,
200  1,
201  1,
202  1,
203  1,
204  1,
205  1,
206  1,
207  1,
208  1,
209  1,
210  1,
211  1,
212  1,
213  1,
214  1,
215  1,
216  1,
217  )
218  process.mix.digitizers.pixel.theLadderEfficiency_BPix2 = cms.vdouble(
219  1,
220  1,
221  1,
222  1,
223  1,
224  1,
225  1,
226  1,
227  1,
228  1,
229  1,
230  1,
231  1,
232  1,
233  1,
234  1,
235  1,
236  1,
237  1,
238  1,
239  1,
240  1,
241  1,
242  1,
243  1,
244  1,
245  1,
246  1,
247  1,
248  1,
249  1,
250  1,
251  )
252  process.mix.digitizers.pixel.theLadderEfficiency_BPix3 = cms.vdouble(
253  1,
254  1,
255  1,
256  1,
257  1,
258  1,
259  1,
260  1,
261  1,
262  1,
263  1,
264  1,
265  1,
266  1,
267  1,
268  1,
269  1,
270  1,
271  1,
272  1,
273  1,
274  1,
275  1,
276  1,
277  1,
278  1,
279  1,
280  1,
281  1,
282  1,
283  1,
284  1,
285  1,
286  1,
287  1,
288  1,
289  1,
290  1,
291  1,
292  1,
293  1,
294  1,
295  1,
296  1,
297  )
298  process.mix.digitizers.pixel.theModuleEfficiency_BPix1 = cms.vdouble(
299  1,
300  1,
301  1,
302  1,
303  )
304  process.mix.digitizers.pixel.theModuleEfficiency_BPix2 = cms.vdouble(
305  1,
306  1,
307  1,
308  1,
309  )
310  process.mix.digitizers.pixel.theModuleEfficiency_BPix3 = cms.vdouble(
311  1,
312  1,
313  1,
314  1,
315  )
316  process.mix.digitizers.pixel.thePUEfficiency_BPix1 = cms.vdouble(
317  1.00023,
318  -3.18350e-06,
319  5.08503e-10,
320  -6.79785e-14,
321  )
322  process.mix.digitizers.pixel.thePUEfficiency_BPix2 = cms.vdouble(
323  9.99974e-01,
324  -8.91313e-07,
325  5.29196e-12,
326  -2.28725e-15,
327  )
328  process.mix.digitizers.pixel.thePUEfficiency_BPix3 = cms.vdouble(
329  1.00005,
330  -6.59249e-07,
331  2.75277e-11,
332  -1.62683e-15,
333  )
334  return process
335 
336 
337 def customise_L1Emulator(process):
338  return process
339 
340 
341 def customise_RawToDigi(process):
342  process.RawToDigi.remove(process.gtEvmDigis)
343  return process
344 
345 
346 def customise_DigiToRaw(process):
347  return process
348 
349 
350 def customise_HLT(process):
351  process=customise_csc_hlt(process)
352  return process
353 
354 
355 def customise_Reco(process):
356  #lowering HO threshold with SiPM
357  if hasattr(process,'particleFlowRecHitHO'):
358  for prod in process.particleFlowRecHitHO.producers:
359  prod.qualityTests = cms.VPSet(
360  cms.PSet(
361  name = cms.string("PFRecHitQTestThreshold"),
362  threshold = cms.double(0.05) # new threshold for SiPM HO
363  ),
364  cms.PSet(
365  name = cms.string("PFRecHitQTestHCALChannel"),
366  maxSeverities = cms.vint32(11),
367  cleaningThresholds = cms.vdouble(0.0),
368  flags = cms.vstring('Standard')
369  )
370  )
371 
372  return process
373 
374 
375 def customise_harvesting(process):
376  #process.dqmHarvesting.remove(process.dataCertificationJetMET)
377  #process.dqmHarvesting.remove(process.sipixelEDAClient)
378  #process.dqmHarvesting.remove(process.sipixelCertification)
379  return (process)
380 
381 def recoOutputCustoms(process):
382 
383  alist=['AODSIM','RECOSIM','FEVTSIM','FEVTDEBUG','FEVTDEBUGHLT','RECODEBUG','RAWRECOSIMHLT','RAWRECODEBUGHLT']
384  for a in alist:
385  b=a+'output'
386  if hasattr(process,b):
387  getattr(process,b).outputCommands.append('keep *_simMuonCSCDigis_*_*')
388  getattr(process,b).outputCommands.append('keep *_simMuonRPCDigis_*_*')
389  getattr(process,b).outputCommands.append('keep *_simHcalUnsuppressedDigis_*_*')
390  getattr(process,b).outputCommands.append('keep *_rawDataCollector_*_*')
391  return process
392 
def customiseSimL1EmulatorForPostLS1
def customise_csc_hlt
Definition: muonCustoms.py:280
def customise_csc_PostLS1
Definition: muonCustoms.py:233