CMS 3D CMS Logo

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