CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
RecoTLR.py
Go to the documentation of this file.
1 import FWCore.ParameterSet.Config as cms
2 
3 from RecoTracker.Configuration.customiseForRunI import customiseForRunI
4 
5 ##############################################################################
6 # common utilities
7 ##############################################################################
9  from RecoVertex.BeamSpotProducer.BeamSpotOnline_cfi import onlineBeamSpotProducer
10  process.offlineBeamSpot = onlineBeamSpotProducer.clone()
11  return process
12 
13 def _addLumiProducer(process):
14  if not hasattr(process,'lumiProducer'):
15  #unscheduled..
16  from RecoLuminosity.LumiProducer.lumiProducer_cff import lumiProducer,LumiDBService
17  process.lumiProducer=lumiProducer
18  #if it's scheduled
19  if hasattr(process, 'reconstruction_step'):
20  process.reconstruction_step+=process.lumiProducer
21 
22  return process
23 
24 def _overridesFor50ns(process):
25  process.bunchSpacingProducer.bunchSpacingOverride = cms.uint32(50)
26  process.bunchSpacingProducer.overrideBunchSpacing = cms.bool(True)
27 
28  return process
29 
30 ##############################################################################
31 # post-era customizations
32 # these are here instead of generating Data-specific eras
33 ##############################################################################
34 def _hcalCustoms25ns(process):
35  import RecoLocalCalo.HcalRecAlgos.RemoveAddSevLevel as HcalRemoveAddSevLevel
36  HcalRemoveAddSevLevel.AddFlag(process.hcalRecAlgos,"HFDigiTime",8)
37  HcalRemoveAddSevLevel.AddFlag(process.hcalRecAlgos,"HBHEFlatNoise",8)
38  return process
39 
41  _hcalCustoms25ns(process)
42  return process
43 
45  _hcalCustoms25ns(process)
46  return process
47 
48 
49 ##############################################################################
50 def customisePPData(process):
51  #deprecated process= customiseCommon(process)
52  ##all customisation for data are now deprecated to Reconstruction_Data_cff
53  #left as a place holder to alter production sequences in case of emergencies
54  return process
55 
56 
57 ##############################################################################
58 def customisePPMC(process):
59  #deprecated process=customiseCommon(process)
60  #left as a place holder to alter production sequences in case of emergencies
61  return process
62 
63 ##############################################################################
64 def customiseCosmicData(process):
65  return process
66 
67 
68 
69 ##############################################################################
70 def customiseCosmicMC(process):
71  return process
72 
73 ##############################################################################
74 def customiseVALSKIM(process):
75  print "WARNING"
76  print "this method is outdated, please use RecoTLR.customisePPData"
77  process= customisePPData(process)
78  return process
79 
80 
81 ##############################################################################
82 def customiseExpress(process):
83  process= customisePPData(process)
84  process = _swapOfflineBSwithOnline(process)
85 
86  return process
87 
88 ##############################################################################
89 def customisePrompt(process):
90  process= customisePPData(process)
91  process = _addLumiProducer(process)
92 
93  return process
94 
95 ##############################################################################
96 # Heavy Ions
97 ##############################################################################
98 # keep it in case modification is needed
99 def customiseCommonHI(process):
100  return process
101 
102 ##############################################################################
103 def customiseExpressHI(process):
104  process = customiseCommonHI(process)
105  process = _swapOfflineBSwithOnline(process)
106 
107  return process
108 
109 ##############################################################################
110 def customisePromptHI(process):
111  process = customiseCommonHI(process)
112 
113  process = _addLumiProducer(process)
114 
115  return process
116 
117 ##############################################################################
118 ##############################################################################
119 ##
120 ## ALL FUNCTIONS BELOW ARE GOING TO BE REMOVED IN 81X
121 ##
122 ##############################################################################
123 ##############################################################################
124 # this is supposed to be added on top of other (Run1) data customs
126  from SLHCUpgradeSimulations.Configuration.muonCustoms import unganged_me1a_geometry,customise_csc_LocalReco
127  process = unganged_me1a_geometry(process)
128  process = customise_csc_LocalReco(process)
129 
130  if hasattr(process,'valCscTriggerPrimitiveDigis'):
131  #this is not doing anything at the moment
132  process.valCscTriggerPrimitiveDigis.commonParam.gangedME1a = cms.bool(False)
133  if hasattr(process,'valCsctfTrackDigis'):
134  process.valCsctfTrackDigis.gangedME1a = cms.untracked.bool(False)
135 
136  from SLHCUpgradeSimulations.Configuration.postLS1Customs import customise_Reco,customise_RawToDigi,customise_DQM
137  if hasattr(process,'RawToDigi'):
138  process=customise_RawToDigi(process)
139  if hasattr(process,'reconstruction'):
140  process=customise_Reco(process)
141  if hasattr(process,'dqmoffline_step'):
142  process=customise_DQM(process)
143 
144  return process
145 
146 # add stage1
148  process = customiseDataRun2Common(process)
149 
150  from L1Trigger.L1TCommon.customsPostLS1 import customiseL1RecoForStage1
151  process=customiseL1RecoForStage1(process)
152 
153  return process
154 
155 ##############################################################################
156 # common+ "25ns" Use this for data daking starting from runs in 2015C (>= 253256 )
158  process = customiseDataRun2Common_withStage1(process)
159 
160  _hcalCustoms25ns(process)
161 
162  from SLHCUpgradeSimulations.Configuration.postLS1Customs import customise_DQM_25ns
163  if hasattr(process,'dqmoffline_step'):
164  process=customise_DQM_25ns(process)
165  return process
166 
167 # common+50ns. Needed only for runs >= 253000 if taken with 50ns
169  process = customiseDataRun2Common_withStage1(process)
170 
171  process = _overridesFor50ns(process)
172 
173  return process
174 
175 ##############################################################################
176 # keep it in case modification is needed
178  process = customiseDataRun2Common_withStage1(process)
179 
180  process = _overridesFor50ns(process)
181  # HI Specific additional customizations:
182  # from L1Trigger.L1TCommon.customsPostLS1 import customiseSimL1EmulatorForPostLS1_Additional_HI
183  # process = customiseSimL1EmulatorForPostLS1_Additional_HI(process)
184 
185  return process
186 
187 ##############################################################################
189  process = customiseCosmicData(process)
190  process = customiseDataRun2Common_25ns(process)
191  return process
192 
193 ##############################################################################
195  process = customiseExpress(process)
196  process = customiseDataRun2Common_25ns(process)
197  return process
198 
200  process = customiseExpress(process)
202  return process
203 
205  process=customiseForRunI(process)
206  process=customiseExpressRun2Deprecated(process)
207  return process
208 
209 ##############################################################################
211  process = customisePrompt(process)
212  process = customiseDataRun2Common_25ns(process)
213  return process
214 
216  process = customisePrompt(process)
218  return process
219 
221  process=customiseForRunI(process)
222  process=customisePromptRun2Deprecated(process)
223  return process
224 
225 ##############################################################################
227  process = customiseRun2CommonHI(process)
228  process = _swapOfflineBSwithOnline(process)
229 
230  return process
231 
232 ##############################################################################
234  process = customiseRun2CommonHI(process)
235 
236  process = _addLumiProducer(process)
237 
238  return process
239 
240 ##############################################################################
def customisePromptRun2Deprecated
Definition: RecoTLR.py:210
def customiseDataRun2Common
ALL FUNCTIONS BELOW ARE GOING TO BE REMOVED IN 81X.
Definition: RecoTLR.py:125
def customisePromptHI
Definition: RecoTLR.py:110
def customisePPMC
Definition: RecoTLR.py:58
def customiseCosmicMC
Definition: RecoTLR.py:70
def unganged_me1a_geometry
Definition: muonCustoms.py:4
def _addLumiProducer
Definition: RecoTLR.py:13
def customiseExpressRun2DeprecatedB0T
Definition: RecoTLR.py:204
def customisePostEra_Run2_2016
Definition: RecoTLR.py:44
def customise_csc_LocalReco
Definition: muonCustoms.py:207
def _overridesFor50ns
Definition: RecoTLR.py:24
def customiseCommonHI
Heavy Ions.
Definition: RecoTLR.py:99
def customise_RawToDigi
Definition: gemCustoms.py:97
def _swapOfflineBSwithOnline
common utilities
Definition: RecoTLR.py:8
def customiseDataRun2Common_50nsRunsAfter253000
Definition: RecoTLR.py:168
def customiseVALSKIM
Definition: RecoTLR.py:74
def customiseRun2DeprecatedExpressHI
Definition: RecoTLR.py:226
def customiseExpressHI
Definition: RecoTLR.py:103
def customiseCosmicData
Definition: RecoTLR.py:64
def _hcalCustoms25ns
post-era customizations these are here instead of generating Data-specific eras
Definition: RecoTLR.py:34
def customiseCosmicDataRun2Deprecated
Definition: RecoTLR.py:188
def customiseRun2DeprecatedPromptHI
Definition: RecoTLR.py:233
def customisePPData
Definition: RecoTLR.py:50
def customiseExpressRun2Deprecated
Definition: RecoTLR.py:194
def customise_DQM
Definition: gemCustoms.py:110
def customisePostEra_Run2_25ns
Definition: RecoTLR.py:40
def customise_Reco
Definition: gemCustoms.py:100
def customisePrompt
Definition: RecoTLR.py:89
def customisePromptRun2DeprecatedB0T
Definition: RecoTLR.py:220
def customisePromptRun2Deprecated_50ns
Definition: RecoTLR.py:215
def customiseExpressRun2Deprecated_50ns
Definition: RecoTLR.py:199
def customiseDataRun2Common_25ns
common+ "25ns" Use this for data daking starting from runs in 2015C (>= 253256 )
Definition: RecoTLR.py:157
def customiseRun2CommonHI
keep it in case modification is needed
Definition: RecoTLR.py:177
def customiseExpress
Definition: RecoTLR.py:82
def customiseDataRun2Common_withStage1
Definition: RecoTLR.py:147
def customiseL1RecoForStage1