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