CMS 3D CMS Logo

AlCaHarvesting_cff.py
Go to the documentation of this file.
1 import FWCore.ParameterSet.Config as cms
2 
3 # import the needed ingredients
22 
24 
25 # common ingredients
26 from CondCore.CondDB.CondDB_cfi import CondDB
27 CondDBOutput = CondDB.clone(connect = cms.string("sqlite_file:promptCalibConditions.db"))
28 
29 PoolDBOutputService = cms.Service("PoolDBOutputService",
30  CondDBOutput,
31  toPut = cms.VPSet(),
32  #timetype = cms.untracked.string("runnumber"),
33  #timetype = cms.untracked.string("lumiid"),
34  )
35 
36 
37 from DQMServices.Components.DQMFileSaver_cfi import * # FIXME
38 dqmSaver.convention = 'Offline'
39 dqmSaver.workflow = '/Express/PCLTest/ALCAPROMPT'
40 #dqmSaver.saveAtJobEnd = True
41 
42 # workflow definitions
43 # --------------------------------------------------------------------------------------
44 # --------------------------------------------------------------------------------------
45 # BeamSpot by Run
46 ALCAHARVESTBeamSpotByRun = alcaBeamSpotHarvester.clone()
47 ALCAHARVESTBeamSpotByRun.AlcaBeamSpotHarvesterParameters.BeamSpotOutputBase = cms.untracked.string("runbased")
48 ALCAHARVESTBeamSpotByRun.AlcaBeamSpotHarvesterParameters.outputRecordName = cms.untracked.string("BeamSpotObjectsRcdByRun")
49 
50 ALCAHARVESTBeamSpotByRun_metadata = cms.PSet(record = cms.untracked.string('BeamSpotObjectsRcdByRun'))
51 
52 ALCAHARVESTBeamSpotByRun_dbOutput = cms.PSet(record = cms.string('BeamSpotObjectsRcdByRun'),
53  tag = cms.string('BeamSpotObject_ByRun'),
54  timetype = cms.untracked.string('runnumber')
55  )
56 
57 # --------------------------------------------------------------------------------------
58 # BeamSpot by Lumi
59 ALCAHARVESTBeamSpotByLumi = alcaBeamSpotHarvester.clone()
60 ALCAHARVESTBeamSpotByLumi.AlcaBeamSpotHarvesterParameters.BeamSpotOutputBase = cms.untracked.string("lumibased")
61 ALCAHARVESTBeamSpotByLumi.AlcaBeamSpotHarvesterParameters.outputRecordName = cms.untracked.string("BeamSpotObjectsRcdByLumi")
62 
63 # configuration of DropBox metadata and DB output
64 ALCAHARVESTBeamSpotByLumi_metadata = cms.PSet(record = cms.untracked.string('BeamSpotObjectsRcdByLumi'))
65 
66 ALCAHARVESTBeamSpotByLumi_dbOutput = cms.PSet(record = cms.string('BeamSpotObjectsRcdByLumi'),
67  tag = cms.string('BeamSpotObject_ByLumi'),
68  timetype = cms.untracked.string('lumiid')
69  )
70 
71 # --------------------------------------------------------------------------------------
72 # BeamSpot HP by Run
73 ALCAHARVESTBeamSpotHPByRun = alcaBeamSpotHarvester.clone()
74 ALCAHARVESTBeamSpotHPByRun.AlcaBeamSpotHarvesterParameters.BeamSpotOutputBase = cms.untracked.string("runbased")
75 ALCAHARVESTBeamSpotHPByRun.AlcaBeamSpotHarvesterParameters.outputRecordName = cms.untracked.string("BeamSpotObjectsRcdHPByRun")
76 ALCAHARVESTBeamSpotHPByRun.AlcaBeamSpotHarvesterParameters.BeamSpotModuleName = cms.untracked.string('alcaBeamSpotProducerHP')
77 
78 ALCAHARVESTBeamSpotHPByRun_metadata = cms.PSet(record = cms.untracked.string('BeamSpotObjectsRcdHPByRun'))
79 
80 ALCAHARVESTBeamSpotHPByRun_dbOutput = cms.PSet(record = cms.string('BeamSpotObjectsRcdHPByRun'),
81  tag = cms.string('BeamSpotObjectHP_ByRun'),
82  timetype = cms.untracked.string('runnumber')
83  )
84 
85 # --------------------------------------------------------------------------------------
86 # BeamSpot HP by Lumi
87 ALCAHARVESTBeamSpotHPByLumi = alcaBeamSpotHarvester.clone()
88 ALCAHARVESTBeamSpotHPByLumi.AlcaBeamSpotHarvesterParameters.BeamSpotOutputBase = cms.untracked.string("lumibased")
89 ALCAHARVESTBeamSpotHPByLumi.AlcaBeamSpotHarvesterParameters.outputRecordName = cms.untracked.string("BeamSpotObjectsRcdHPByLumi")
90 ALCAHARVESTBeamSpotHPByLumi.AlcaBeamSpotHarvesterParameters.BeamSpotModuleName = cms.untracked.string('alcaBeamSpotProducerHP')
91 ALCAHARVESTBeamSpotHPByLumi.AlcaBeamSpotHarvesterParameters.DumpTxt = cms.untracked.bool(True)
92 
93 # configuration of DropBox metadata and DB output
94 ALCAHARVESTBeamSpotHPByLumi_metadata = cms.PSet(record = cms.untracked.string('BeamSpotObjectsRcdHPByLumi'))
95 
96 ALCAHARVESTBeamSpotHPByLumi_dbOutput = cms.PSet(record = cms.string('BeamSpotObjectsRcdHPByLumi'),
97  tag = cms.string('BeamSpotObjectHP_ByLumi'),
98  timetype = cms.untracked.string('lumiid')
99  )
100 
101 
102 # --------------------------------------------------------------------------------------
103 # BeamSpot HP - Low PU - by Run
104 ALCAHARVESTBeamSpotHPLowPUByRun = ALCAHARVESTBeamSpotHPByRun.clone()
105 ALCAHARVESTBeamSpotHPLowPUByRun.AlcaBeamSpotHarvesterParameters.BeamSpotModuleName = cms.untracked.string('alcaBeamSpotProducerHPLowPU')
106 
107 # configuration of DropBox metadata and DB output
108 ALCAHARVESTBeamSpotHPLowPUByRun_metadata = cms.PSet(record = cms.untracked.string('BeamSpotObjectsRcdHPByRun'))
109 
110 ALCAHARVESTBeamSpotHPLowPUByRun_dbOutput = cms.PSet(record = cms.string('BeamSpotObjectsRcdHPByRun'),
111  tag = cms.string('BeamSpotObjectHP_ByRun'),
112  timetype = cms.untracked.string('runnumber')
113  )
114 
115 # --------------------------------------------------------------------------------------
116 # BeamSpot HP - Low PU - by Lumi
117 ALCAHARVESTBeamSpotHPLowPUByLumi = ALCAHARVESTBeamSpotHPByLumi.clone()
118 ALCAHARVESTBeamSpotHPLowPUByLumi.AlcaBeamSpotHarvesterParameters.BeamSpotModuleName = cms.untracked.string('alcaBeamSpotProducerHPLowPU')
119 
120 
121 # configuration of DropBox metadata and DB output
122 ALCAHARVESTBeamSpotHPLowPUByLumi_metadata = cms.PSet(record = cms.untracked.string('BeamSpotObjectsRcdHPByLumi'))
123 
124 ALCAHARVESTBeamSpotHPLowPUByLumi_dbOutput = cms.PSet(record = cms.string('BeamSpotObjectsRcdHPByLumi'),
125  tag = cms.string('BeamSpotObjectHP_ByLumi'),
126  timetype = cms.untracked.string('lumiid')
127  )
128 
129 # --------------------------------------------------------------------------------------
130 # SiStrip Quality
131 ALCAHARVESTSiStripQuality_metadata = cms.PSet(record = cms.untracked.string('SiStripBadStripRcd'))
132 
133 ALCAHARVESTSiStripQuality_dbOutput = cms.PSet(record = cms.string('SiStripBadStripRcd'),
134  tag = cms.string('SiStripBadStrip_pcl'),
135  timetype = cms.untracked.string('runnumber')
136  )
137 
138 # --------------------------------------------------------------------------------------
139 # SiStrip Gains
140 ALCAHARVESTSiStripGains_metadata = cms.PSet(record = cms.untracked.string('SiStripApvGainRcd'))
141 
142 ALCAHARVESTSiStripGains_dbOutput = cms.PSet(record = cms.string('SiStripApvGainRcd'),
143  tag = cms.string('SiStripApvGain_pcl'),
144  timetype = cms.untracked.string('runnumber')
145  )
146 
147 # --------------------------------------------------------------------------------------
148 # SiStrip Gains (AAG)
149 ALCAHARVESTSiStripGainsAAG_metadata = cms.PSet(record = cms.untracked.string('SiStripApvGainRcdAAG'))
150 
151 ALCAHARVESTSiStripGainsAAG_dbOutput = cms.PSet(record = cms.string('SiStripApvGainRcdAAG'),
152  tag = cms.string('SiStripApvGainAAG_pcl'),
153  timetype = cms.untracked.string('runnumber')
154  )
155 # --------------------------------------------------------------------------------------
156 # SiStrip Lorentz Angle
157 ALCAHARVESTSiStripLA_metadata = cms.PSet(record = cms.untracked.string('SiStripLorentzAngleRcd'))
158 
159 ALCAHARVESTSiStripLA_dbOutput = cms.PSet(record = cms.string('SiStripLorentzAngleRcd'),
160  tag = cms.string('SiStripLA_pcl'),
161  timetype = cms.untracked.string('runnumber')
162  )
163 
164 # --------------------------------------------------------------------------------------
165 # SiStrip Bad Components from Hit Efficiency analysis
166 ALCAHARVESTSiStripHitEff_metadata = cms.PSet(record = cms.untracked.string('SiStripBadStripFromHitEffRcd'))
167 
168 ALCAHARVESTSiStripHitEff_dbOutput = cms.PSet(record = cms.string('SiStripBadStripFromHitEffRcd'),
169  tag = cms.string('SiStripBadStripRcdHitEff_pcl'),
170  timetype = cms.untracked.string('runnumber')
171  )
172 
173 # --------------------------------------------------------------------------------------
174 # SiPixel Alignment
175 ALCAHARVESTSiPixelAli_metadata = cms.PSet(record = cms.untracked.string('TrackerAlignmentRcd'))
176 
177 ALCAHARVESTSiPixelAli_dbOutput = cms.PSet(record = cms.string('TrackerAlignmentRcd'),
178  tag = cms.string('SiPixelAli_pcl'),
179  timetype = cms.untracked.string('runnumber')
180  )
181 
182 # --------------------------------------------------------------------------------------
183 # SiPixel Alignment HG
184 ALCAHARVESTSiPixelAliHG_metadata = cms.PSet(record = cms.untracked.string('TrackerAlignmentHGRcd'))
185 
186 ALCAHARVESTSiPixelAliHG_dbOutput = cms.PSet(record = cms.string('TrackerAlignmentHGRcd'),
187  tag = cms.string('SiPixelAliHG_pcl'),
188  timetype = cms.untracked.string('runnumber')
189  )
190 
191 # --------------------------------------------------------------------------------------
192 # SiPixel Alignment HG combined
193 ALCAHARVESTSiPixelAliHGCombined_metadata = cms.PSet(record = cms.untracked.string('TrackerAlignmentHGCombinedRcd'))
194 
195 ALCAHARVESTSiPixelAliHGCombined_dbOutput = cms.PSet(record = cms.string('TrackerAlignmentHGCombinedRcd'),
196  tag = cms.string('SiPixelAliHGCombined_pcl'),
197  timetype = cms.untracked.string('runnumber')
198  )
199 
200 # --------------------------------------------------------------------------------------
201 # SiPixel Lorentz Angle
202 ALCAHARVESTSiPixelLA_metadata = cms.PSet(record = cms.untracked.string('SiPixelLorentzAngleRcd'))
203 
204 ALCAHARVESTSiPixelLA_dbOutput = cms.PSet(record = cms.string('SiPixelLorentzAngleRcd'),
205  tag = cms.string('SiPixelLA_pcl'),
206  timetype = cms.untracked.string('runnumber')
207  )
208 
209 # --------------------------------------------------------------------------------------
210 # SiPixel Lorentz Angle Minimal Cluster Size
211 ALCAHARVESTSiPixelLAMCS_metadata = cms.PSet(record = cms.untracked.string('SiPixelLorentzAngleRcdMCS'))
212 
213 ALCAHARVESTSiPixelLAMCS_dbOutput = cms.PSet(record = cms.string('SiPixelLorentzAngleRcdMCS'),
214  tag = cms.string('SiPixelLAMCS_pcl'),
215  timetype = cms.untracked.string('runnumber')
216  )
217 # --------------------------------------------------------------------------------------
218 # ECAL Pedestals
219 ALCAHARVESTEcalPedestals_metadata = cms.PSet(record = cms.untracked.string('EcalPedestalsRcd'))
220 
221 ALCAHARVESTEcalPedestals_dbOutput = cms.PSet(record = cms.string('EcalPedestalsRcd'),
222  tag = cms.string('EcalPedestals_pcl'),
223  timetype = cms.untracked.string('runnumber')
224  )
225 
226 # --------------------------------------------------------------------------------------
227 # Lumi PCC
228 ALCAHARVESTLumiPCC_metadata = cms.PSet(record = cms.untracked.string('LumiCorrectionsRcd'))
229 
230 ALCAHARVESTLumiPCC_dbOutput = cms.PSet(record = cms.string('LumiCorrectionsRcd'),
231  tag = cms.string('LumiPCCCorrections_pcl'),
232  timetype = cms.untracked.string('lumiid')
233  )
234 
235 
236 
237 # SiPixel Quality
238 ALCAHARVESTSiPixelQuality = siPixelStatusHarvester.clone()
239 ALCAHARVESTSiPixelQuality.SiPixelStatusManagerParameters.outputBase = cms.untracked.string("dynamicLumibased")
240 ALCAHARVESTSiPixelQuality.SiPixelStatusManagerParameters.aveDigiOcc = cms.untracked.int32(20000)
241 ALCAHARVESTSiPixelQuality.debug = cms.untracked.bool(False)
242 
243 ALCAHARVESTSiPixelQuality_metadata = cms.VPSet(cms.PSet(record = cms.untracked.string('SiPixelQualityFromDbRcd_prompt')),
244  cms.PSet(record = cms.untracked.string('SiPixelQualityFromDbRcd_stuckTBM')),
245  cms.PSet(record = cms.untracked.string('SiPixelQualityFromDbRcd_other')))
246 ALCAHARVESTSiPixelQuality_dbOutput = cms.VPSet(cms.PSet(record = cms.string('SiPixelQualityFromDbRcd_prompt'),
247  tag = cms.string('SiPixelQualityFromDbRcd_prompt'),
248  timetype = cms.untracked.string('lumiid')
249  ),
250  cms.PSet(record = cms.string('SiPixelQualityFromDbRcd_stuckTBM'),
251  tag = cms.string('SiPixelQualityFromDbRcd_stuckTBM'),
252  timetype = cms.untracked.string('lumiid'),
253  ),
254  cms.PSet(record = cms.string('SiPixelQualityFromDbRcd_other'),
255  tag = cms.string('SiPixelQualityFromDbRcd_other'),
256  timetype = cms.untracked.string('lumiid')
257  )
258  )
259 
260 if ALCAHARVESTSiPixelQuality.debug == cms.untracked.bool(True) :
261  dbOutput_ext = cms.VPSet(
262  cms.PSet(record = cms.string('SiPixelQualityFromDbRcd_PCL'),
263  tag = cms.string('SiPixelQualityFromDbRcd_PCL'),
264  timetype = cms.untracked.string('lumiid')
265  ),
266  cms.PSet(record = cms.string('SiPixelQualityFromDbRcd_FEDerror25'),
267  tag = cms.string('SiPixelQualityFromDbRcd_FEDerror25'),
268  timetype = cms.untracked.string('lumiid'),
269  ),
270  cms.PSet(record = cms.string('SiPixelQualityFromDbRcd_permanentBad'),
271  tag = cms.string('SiPixelQualityFromDbRcd_permanentBad'),
272  timetype = cms.untracked.string('runnumber')
273  )
274  )
275  ALCAHARVESTSiPixelQuality_dbOutput.extend(dbOutput_ext)
276 
277 # --------------------------------------------------------------------------------------
278 # PPS calibration
279 ALCAHARVESTPPSTimingCalibration_metadata = cms.PSet(record = cms.untracked.string('PPSTimingCalibrationRcd_HPTDC'))
280 ALCAHARVESTPPSTimingCalibration_dbOutput = cms.PSet(record = cms.string('PPSTimingCalibrationRcd_HPTDC'),
281  tag = cms.string('PPSDiamondTimingCalibration_pcl'),
282  timetype = cms.untracked.string('runnumber')
283  )
284 
285 ALCAHARVESTPPSDiamondSampicTimingCalibration_metadata = cms.PSet(record = cms.untracked.string('PPSTimingCalibrationRcd_SAMPIC'))
286 ALCAHARVESTPPSDiamondSampicTimingCalibration_dbOutput = cms.PSet(record = cms.string('PPSTimingCalibrationRcd_SAMPIC'),
287  tag = cms.string('PPSDiamondSampicCalibration_pcl'),
288  timetype = cms.untracked.string('runnumber'))
289 
290 ALCAHARVESTPPSAlignment_metadata = cms.PSet(record = cms.untracked.string('CTPPSRPAlignmentCorrectionsDataRcd'))
291 ALCAHARVESTPPSAlignment_dbOutput = cms.PSet(record = cms.string('CTPPSRPAlignmentCorrectionsDataRcd'),
292  tag = cms.string('CTPPSRPAlignment_real_pcl'),
293  timetype = cms.untracked.string('runnumber'))
294 
295 # define all the paths
296 BeamSpotByRun = cms.Path(ALCAHARVESTBeamSpotByRun)
297 BeamSpotByLumi = cms.Path(ALCAHARVESTBeamSpotByLumi)
298 BeamSpotHPByRun = cms.Path(ALCAHARVESTBeamSpotHPByRun)
299 BeamSpotHPByLumi = cms.Path(ALCAHARVESTBeamSpotHPByLumi)
300 BeamSpotHPLowPUByRun = cms.Path(ALCAHARVESTBeamSpotHPLowPUByRun)
301 BeamSpotHPLowPUByLumi = cms.Path(ALCAHARVESTBeamSpotHPLowPUByLumi)
302 SiStripQuality = cms.Path(ALCAHARVESTSiStripQuality)
303 SiStripGains = cms.Path(ALCAHARVESTSiStripGains)
304 SiStripGainsAAG = cms.Path(ALCAHARVESTSiStripGainsAAG)
305 SiStripHitEff = cms.Path(ALCAHARVESTSiStripHitEfficiency)
306 SiStripLA = cms.Path(ALCAHARVESTSiStripLorentzAngle)
307 SiPixelAli = cms.Path(ALCAHARVESTSiPixelAli)
308 SiPixelAliHG = cms.Path(ALCAHARVESTSiPixelAliHG)
309 SiPixelAliHGCombined = cms.Path(ALCAHARVESTSiPixelAliHGCombined)
310 SiPixelLA = cms.Path(ALCAHARVESTSiPixelLorentzAngle)
311 SiPixelLAMCS = cms.Path(ALCAHARVESTSiPixelLorentzAngleMCS)
312 EcalPedestals = cms.Path(ALCAHARVESTEcalPedestals)
313 LumiPCC = cms.Path(ALCAHARVESTLumiPCC)
314 SiPixelQuality = cms.Path(dqmEnvSiPixelQuality+ALCAHARVESTSiPixelQuality)#+siPixelPhase1DQMHarvester)
315 PPSTimingCalibration = cms.Path(ALCAHARVESTPPSTimingCalibration)
316 PPSDiamondSampicTimingCalibration = cms.Path(ALCAHARVESTPPSDiamondSampicTimingCalibration)
317 PPSAlignment = cms.Path(ALCAHARVESTPPSAlignment)
318 
319 ALCAHARVESTDQMSaveAndMetadataWriter = cms.Path(dqmSaver+pclMetadataWriter)
320 
321 #promptCalibHarvest = cms.Path(alcaBeamSpotHarvester)