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