test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
combinedCustoms.py
Go to the documentation of this file.
1 import FWCore.ParameterSet.Config as cms
2 from SLHCUpgradeSimulations.Configuration.postLS1Customs import customisePostLS1
3 from SLHCUpgradeSimulations.Configuration.customise_mixing import customise_NoCrossing
4 from SLHCUpgradeSimulations.Configuration.phase1TkCustoms import customise as customisePhase1Tk
5 from SLHCUpgradeSimulations.Configuration.HCalCustoms import customise_HcalPhase1, customise_HcalPhase0
6 
7 from SLHCUpgradeSimulations.Configuration.gemCustoms import customise2019 as customise_gem2019
8 from SLHCUpgradeSimulations.Configuration.gemCustoms import customise2023 as customise_gem2023
9 from SLHCUpgradeSimulations.Configuration.me0Customs import customise as customise_me0
10 from SLHCUpgradeSimulations.Configuration.rpcCustoms import customise as customise_rpc
11 from SLHCUpgradeSimulations.Configuration.fixMissingUpgradeGTPayloads import fixRPCConditions
12 
13 import SLHCUpgradeSimulations.Configuration.aging as aging
14 
15 from Configuration.StandardSequences.Eras import eras
16 
17 def cust_2017(process):
18  # To allow simulatenous use of customisation and era while the era migration is in progress
19  if not eras.run2_common.isChosen():
20  process=customisePostLS1(process,displayDeprecationWarning=False)
21  process=customisePhase1Tk(process)
22  #process=customise_HcalPhase0(process)
23  return process
24 
25 def cust_2019(process):
26  process=customisePostLS1(process,displayDeprecationWarning=False)
27  process=customisePhase1Tk(process)
28  process=customise_HcalPhase1(process)
29  return process
30 
31 def cust_2019WithGem(process):
32  process=cust_2019(process)
33  process=customise_gem2019(process)
34  return process
35 
36 def cust_2023MuonOnly(process):
37  process=customise_gem2023(process)
38  process=customise_rpc(process)
39  process=fixRPCConditions(process)
40  return process
41 
42 def noCrossing(process):
43  process=customise_NoCrossing(process)
44  return process
45 
46 def cust_2023HGCal_common(process):
47  process = customise_rpc(process)
48  process = fixRPCConditions(process)
49  process = customise_HcalPhase1(process)
50  process = customisePhase1Tk(process)
51  if hasattr(process,'L1simulation_step'):
52  process.simEcalTriggerPrimitiveDigis.BarrelOnly = cms.bool(True)
53  if hasattr(process,'digitisation_step'):
54  if hasattr(process.mix.digitizers,'ecal'):
55  process.mix.digitizers.ecal.doEE = cms.bool(False)
56  process.mix.digitizers.ecal.doES = cms.bool(False)
57  process.load('SimCalorimetry.HGCalSimProducers.hgcalDigitizer_cfi')
58  process.mix.digitizers.hgceeDigitizer=process.hgceeDigitizer
59  process.mix.digitizers.hgchebackDigitizer=process.hgchebackDigitizer
60  process.mix.digitizers.hgchefrontDigitizer=process.hgchefrontDigitizer
61  # update the HCAL Endcap for BH geom.
62  newFactors = cms.vdouble(
63  210.55, 197.93, 186.12, 189.64, 189.63,
64  189.96, 190.03, 190.11, 190.18, 190.25,
65  190.32, 190.40, 190.47, 190.54, 190.61,
66  190.69, 190.83, 190.94, 190.94, 190.94,
67  190.94, 190.94, 190.94, 190.94, 190.94,
68  190.94, 190.94, 190.94, 190.94, 190.94,
69  190.94, 190.94, 190.94, 190.94, 190.94,
70  190.94, 190.94, 190.94, 190.94, 190.94)
71  process.mix.digitizers.hcal.he.samplingFactors = newFactors
72  process.mix.digitizers.hcal.he.photoelectronsToAnalog = cms.vdouble([10.]*len(newFactors))
73  # Also need to tell the MixingModule to make the correct collections available from
74  # the pileup, even if not creating CrossingFrames.
75  process.mix.mixObjects.mixCH.input.append( cms.InputTag("g4SimHits",process.hgceeDigitizer.hitCollection.value()) )
76  process.mix.mixObjects.mixCH.input.append( cms.InputTag("g4SimHits",process.hgchebackDigitizer.hitCollection.value()) )
77  process.mix.mixObjects.mixCH.input.append( cms.InputTag("g4SimHits",process.hgchefrontDigitizer.hitCollection.value()) )
78  process.mix.mixObjects.mixCH.subdets.append( process.hgceeDigitizer.hitCollection.value() )
79  process.mix.mixObjects.mixCH.subdets.append( process.hgchebackDigitizer.hitCollection.value() )
80  process.mix.mixObjects.mixCH.subdets.append( process.hgchefrontDigitizer.hitCollection.value() )
81  return process
82 
83 def cust_2023HGCal(process):
84  process = cust_2023HGCal_common(process)
85  return process
86 
87 def cust_2023HGCalMuon(process):
88  process = customise_me0(process)
89  process = cust_2023HGCal_common(process)
90  return process
91 
92 ##### clone aging.py here
93 def agePixel(process,lumi):
94  process=process.agePixel(process,lumi)
95  return process
96 
97 def ageHcal(process,lumi):
98  process=aging.ageHcal(process,lumi)
99  return process
100 
101 def ageEcal(process,lumi):
102  process=aging.ageEcal(process,lumi)
103  return process
104 
105 def customise_aging_100(process):
106  process=aging.customise_aging_100(process)
107  return process
108 
109 def customise_aging_200(process):
110  process=aging.customise_aging_200(process)
111  return process
112 
113 def customise_aging_300(process):
114  process=aging.customise_aging_300(process)
115  return process
116 
117 def customise_aging_400(process):
118  process=aging.customise_aging_400(process)
119  return process
120 
121 def customise_aging_500(process):
122  process=aging.customise_aging_500(process)
123  return process
124 
125 def customise_aging_600(process):
126  process=aging.customise_aging_600(process)
127  return process
128 
129 def customise_aging_700(process):
130  process=aging.customise_aging_700(process)
131  return process
132 
133 
134 def customise_aging_1000(process):
135  process=aging.customise_aging_1000(process)
136  return process
137 
138 def customise_aging_3000(process):
139  process=aging.customise_aging_3000(process)
140  return process
141 
143  process=aging.customise_aging_ecalonly_300(process)
144  return process
145 
147  process=aging.customise_aging_ecalonly_1000(process)
148  return process
149 
151  process=aging.customise_aging_ecalonly_3000(process)
152  return process
153 
155  process=aging.customise_aging_newpixel_1000(process)
156  return process
157 
159  process=aging.customise_aging_newpixel_3000(process)
160  return process
161 
162 def ecal_complete_aging(process):
163  process=aging.ecal_complete_aging(process)
164  return process
165 
166 def turn_off_HE_aging(process):
167  process=aging.turn_off_HE_aging(process)
168  return process
169 
170 def turn_off_HF_aging(process):
171  process=aging.turn_off_HF_aging(process)
172  return process
173 
174 def turn_off_Pixel_aging(process):
175  process=aging.turn_off_Pixel_aging(process)
176  return process
177 
179  process=aging.turn_on_Pixel_aging_1000(process)
180  return process
181 
182 def hf_complete_aging(process):
183  process=aging.hf_complete_aging(process)
184  return process
185 
187  process=aging.ecal_complete_aging_300(process)
188  return process
189 
191  process=aging.ecal_complete_aging_1000(process)
192  return process
193 
195  process=aging.ecal_complete_aging_3000(process)
196  return process
197 
199  if not hasattr(process.GlobalTag,'toGet'):
200  process.GlobalTag.toGet=cms.VPSet()
201  process.GlobalTag.toGet.extend( cms.VPSet(
202  cms.PSet(record = cms.string("EcalSRSettingsRcd"),
203  tag = cms.string("EcalSRSettings_TL150_mc"),
204  connect = cms.untracked.string("frontier://FrontierProd/CMS_CONDITIONS")
205  )
206  )
207  )
208  process.GlobalTag.toGet.extend( cms.VPSet(
209  cms.PSet(record = cms.string("EcalTPGLutIdMapRcd"),
210  tag = cms.string("EcalTPGLutIdMap_beamv5_upgrade_mc"),
211  connect = cms.untracked.string("frontier://FrontierProd/CMS_CONDITIONS")
212  )
213  )
214  )
215  return process
216 
218  if not hasattr(process.GlobalTag,'toGet'):
219  process.GlobalTag.toGet=cms.VPSet()
220  process.GlobalTag.toGet.extend( cms.VPSet(
221  cms.PSet(record = cms.string("EcalSRSettingsRcd"),
222  tag = cms.string("EcalSRSettings_TL100_mc"),
223  connect = cms.untracked.string("frontier://FrontierProd/CMS_CONDITIONS")
224  )
225  )
226  )
227  process.GlobalTag.toGet.extend( cms.VPSet(
228  cms.PSet(record = cms.string("EcalTPGLutIdMapRcd"),
229  tag = cms.string("EcalTPGLutIdMap_beamv5_upgrade_mc"),
230  connect = cms.untracked.string("frontier://FrontierProd/CMS_CONDITIONS")
231  )
232  )
233  )
234  return process
235 
237  if not hasattr(process.GlobalTag,'toGet'):
238  process.GlobalTag.toGet=cms.VPSet()
239  process.GlobalTag.toGet.extend( cms.VPSet(
240  cms.PSet(record = cms.string("EcalSRSettingsRcd"),
241  tag = cms.string("EcalSRSettings_TL200_mc"),
242  connect = cms.untracked.string("frontier://FrontierProd/CMS_CONDITIONS")
243  )
244  )
245  )
246  process.GlobalTag.toGet.extend( cms.VPSet(
247  cms.PSet(record = cms.string("EcalTPGLutIdMapRcd"),
248  tag = cms.string("EcalTPGLutIdMap_beamv5_upgrade_mc"),
249  connect = cms.untracked.string("frontier://FrontierProd/CMS_CONDITIONS")
250  )
251  )
252  )
253  return process
254 
256  if not hasattr(process.GlobalTag,'toGet'):
257  process.GlobalTag.toGet=cms.VPSet()
258  process.GlobalTag.toGet.extend( cms.VPSet(
259  cms.PSet(record = cms.string("EcalSRSettingsRcd"),
260  tag = cms.string("EcalSRSettings_TL300_mc"),
261  connect = cms.untracked.string("frontier://FrontierProd/CMS_CONDITIONS")
262  )
263  )
264  )
265  process.GlobalTag.toGet.extend( cms.VPSet(
266  cms.PSet(record = cms.string("EcalTPGLutIdMapRcd"),
267  tag = cms.string("EcalTPGLutIdMap_beamv5_upgrade_mc"),
268  connect = cms.untracked.string("frontier://FrontierProd/CMS_CONDITIONS")
269  )
270  )
271  )
272  return process
273 
275  if not hasattr(process.GlobalTag,'toGet'):
276  process.GlobalTag.toGet=cms.VPSet()
277  process.GlobalTag.toGet.extend( cms.VPSet(
278  cms.PSet(record = cms.string("EcalSRSettingsRcd"),
279  tag = cms.string("EcalSRSettings_TL500_mc"),
280  connect = cms.untracked.string("frontier://FrontierProd/CMS_CONDITIONS")
281  )
282  )
283  )
284  process.GlobalTag.toGet.extend( cms.VPSet(
285  cms.PSet(record = cms.string("EcalTPGLutIdMapRcd"),
286  tag = cms.string("EcalTPGLutIdMap_beamv5_upgrade_mc"),
287  connect = cms.untracked.string("frontier://FrontierProd/CMS_CONDITIONS")
288  )
289  )
290  )
291  return process
292 
294  if not hasattr(process.GlobalTag,'toGet'):
295  process.GlobalTag.toGet=cms.VPSet()
296  process.GlobalTag.toGet.extend( cms.VPSet(
297  cms.PSet(record = cms.string("EcalSRSettingsRcd"),
298  tag = cms.string("EcalSRSettings_TL1000_mc"),
299  connect = cms.untracked.string("frontier://FrontierProd/CMS_CONDITIONS")
300  )
301  )
302  )
303  process.GlobalTag.toGet.extend( cms.VPSet(
304  cms.PSet(record = cms.string("EcalTPGLutIdMapRcd"),
305  tag = cms.string("EcalTPGLutIdMap_beamv5_3GeV_upgrade_mc"),
306  connect = cms.untracked.string("frontier://FrontierProd/CMS_CONDITIONS")
307  )
308  )
309  )
310  return process
311 
313  if not hasattr(process.GlobalTag,'toGet'):
314  process.GlobalTag.toGet=cms.VPSet()
315  process.GlobalTag.toGet.extend( cms.VPSet(
316  cms.PSet(record = cms.string("EcalSRSettingsRcd"),
317  tag = cms.string("EcalSRSettings_TL3000_mc"),
318  connect = cms.untracked.string("frontier://FrontierProd/CMS_CONDITIONS")
319  )
320  )
321  )
322  process.GlobalTag.toGet.extend( cms.VPSet(
323  cms.PSet(record = cms.string("EcalTPGLutIdMapRcd"),
324  tag = cms.string("EcalTPGLutIdMap_beamv5_4GeV_upgrade_mc"),
325  connect = cms.untracked.string("frontier://FrontierProd/CMS_CONDITIONS")
326  )
327  )
328  )
329  return process
def customise_aging_3000
Definition: aging.py:110
def customise_aging_ecalonly_3000
def customise_aging_400
Definition: aging.py:75
def turn_off_HE_aging
Definition: aging.py:160
def customise_aging_newpixel_1000
Definition: aging.py:132
def turn_off_HF_aging
Definition: aging.py:167
def customise_aging_100
Definition: aging.py:54
def hf_complete_aging
Definition: aging.py:146
def customise_aging_200
Definition: aging.py:61
def agePixel
clone aging.py here
def ecal_complete_aging_1000
Definition: aging.py:225
def turn_off_Pixel_aging
Definition: aging.py:176
def ecal_complete_aging_3000
Definition: aging.py:259
def ageHcal
Definition: aging.py:18
def customise_HcalPhase1
Definition: HCalCustoms.py:24
def ecal_complete_aging_300
Definition: aging.py:191
def customise_aging_300
Definition: aging.py:68
def customise_aging_newpixel_3000
Definition: aging.py:138
def customise_aging_600
Definition: aging.py:89
def customise_aging_ecalonly_300
def customise_aging_ecalonly_3000
Definition: aging.py:127
def customise_aging_newpixel_3000
def customise_aging_ecalonly_1000
Definition: aging.py:122
def customise_aging_newpixel_1000
def turn_on_Pixel_aging_1000
Definition: aging.py:183
def customise_aging_500
Definition: aging.py:82
def customise_aging_ecalonly_300
Definition: aging.py:117
def ecal_complete_aging
Definition: aging.py:153
def ageEcal
Definition: aging.py:42
def customise_aging_1000
Definition: aging.py:103
def customise_aging_ecalonly_1000
def customise_aging_700
Definition: aging.py:96