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