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