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