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