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