Line Code
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332
import FWCore.ParameterSet.Config as cms

# import the needed ingredients
from Calibration.TkAlCaRecoProducers.AlcaBeamSpotHarvester_cff import *
from Calibration.TkAlCaRecoProducers.AlcaSiStripQualityHarvester_cff import *
from Calibration.TkAlCaRecoProducers.AlcaSiStripGainsHarvester_cff import *
from Calibration.TkAlCaRecoProducers.AlcaSiStripGainsAAGHarvester_cff import *
from Calibration.TkAlCaRecoProducers.AlcaSiStripHitEfficiencyHarvester_cff import *
from Calibration.TkAlCaRecoProducers.AlcaSiStripLorentzAngleHarvester_cff import *
from Calibration.TkAlCaRecoProducers.AlcaSiPixelLorentzAngleHarvester_cff import *
from Calibration.TkAlCaRecoProducers.AlcaSiPixelLorentzAngleHarvesterMCS_cff import *
from Alignment.CommonAlignmentProducer.AlcaSiPixelAliHarvester_cff import *
from Alignment.CommonAlignmentProducer.AlcaSiPixelAliHarvesterHG_cff import *
from Alignment.CommonAlignmentProducer.AlcaSiPixelAliHarvesterHGCombined_cff import *
from Alignment.CommonAlignmentProducer.AlcaSiPixelAliHarvesterHLTHGCombined_cff import *
from Calibration.EcalCalibAlgos.AlcaEcalPedestalsHarvester_cff import *
from Calibration.LumiAlCaRecoProducers.AlcaLumiPCCHarvester_cff import *
from CalibTracker.SiPixelQuality.SiPixelStatusHarvester_cfi import *
from CalibTracker.SiPixelQuality.DQMEventInfoSiPixelQuality_cff import *
from CalibPPS.TimingCalibration.PPSTimingCalibrationHarvester_cff import *
from CalibPPS.TimingCalibration.ALCARECOPPSDiamondSampicTimingCalibHarvester_cff import *
from CalibPPS.AlignmentGlobal.PPSAlignmentHarvester_cff import *

from CommonTools.ConditionDBWriter.PCLMetadataWriter_cfi import *

# common ingredients
from CondCore.CondDB.CondDB_cfi import CondDB
CondDBOutput = CondDB.clone(connect = cms.string("sqlite_file:promptCalibConditions.db"))

PoolDBOutputService = cms.Service("PoolDBOutputService",
                                  CondDBOutput,
                                  toPut = cms.VPSet(),
                                  #timetype = cms.untracked.string("runnumber"),
                                  #timetype = cms.untracked.string("lumiid"),
                                  )


from DQMServices.Components.DQMFileSaver_cfi import * # FIXME
dqmSaver.convention = 'Offline'
dqmSaver.workflow = '/Express/PCLTest/ALCAPROMPT'
#dqmSaver.saveAtJobEnd = True

# workflow definitions
# --------------------------------------------------------------------------------------
# --------------------------------------------------------------------------------------
# BeamSpot by Run
ALCAHARVESTBeamSpotByRun = alcaBeamSpotHarvester.clone()
ALCAHARVESTBeamSpotByRun.AlcaBeamSpotHarvesterParameters.BeamSpotOutputBase = cms.untracked.string("runbased")
ALCAHARVESTBeamSpotByRun.AlcaBeamSpotHarvesterParameters.outputRecordName = cms.untracked.string("BeamSpotObjectsRcdByRun")

ALCAHARVESTBeamSpotByRun_metadata = cms.PSet(record = cms.untracked.string('BeamSpotObjectsRcdByRun'))

ALCAHARVESTBeamSpotByRun_dbOutput = cms.PSet(record = cms.string('BeamSpotObjectsRcdByRun'),
                                             tag = cms.string('BeamSpotObject_ByRun'),
                                             timetype   = cms.untracked.string('runnumber')
                                             )

# --------------------------------------------------------------------------------------
# BeamSpot by Lumi
ALCAHARVESTBeamSpotByLumi = alcaBeamSpotHarvester.clone()
ALCAHARVESTBeamSpotByLumi.AlcaBeamSpotHarvesterParameters.BeamSpotOutputBase = cms.untracked.string("lumibased")
ALCAHARVESTBeamSpotByLumi.AlcaBeamSpotHarvesterParameters.outputRecordName = cms.untracked.string("BeamSpotObjectsRcdByLumi")

# configuration of DropBox metadata and DB output
ALCAHARVESTBeamSpotByLumi_metadata = cms.PSet(record = cms.untracked.string('BeamSpotObjectsRcdByLumi'))

ALCAHARVESTBeamSpotByLumi_dbOutput = cms.PSet(record = cms.string('BeamSpotObjectsRcdByLumi'),
                                              tag = cms.string('BeamSpotObject_ByLumi'),
                                              timetype   = cms.untracked.string('lumiid')
                                              )

# --------------------------------------------------------------------------------------
# BeamSpot HP by Run
ALCAHARVESTBeamSpotHPByRun = alcaBeamSpotHarvester.clone()
ALCAHARVESTBeamSpotHPByRun.AlcaBeamSpotHarvesterParameters.BeamSpotOutputBase = cms.untracked.string("runbased")
ALCAHARVESTBeamSpotHPByRun.AlcaBeamSpotHarvesterParameters.outputRecordName = cms.untracked.string("BeamSpotObjectsRcdHPByRun")
ALCAHARVESTBeamSpotHPByRun.AlcaBeamSpotHarvesterParameters.BeamSpotModuleName = cms.untracked.string('alcaBeamSpotProducerHP')

ALCAHARVESTBeamSpotHPByRun_metadata = cms.PSet(record = cms.untracked.string('BeamSpotObjectsRcdHPByRun'))

ALCAHARVESTBeamSpotHPByRun_dbOutput = cms.PSet(record = cms.string('BeamSpotObjectsRcdHPByRun'),
                                             tag = cms.string('BeamSpotObjectHP_ByRun'),
                                             timetype   = cms.untracked.string('runnumber')
                                             )

# --------------------------------------------------------------------------------------
# BeamSpot HP by Lumi
ALCAHARVESTBeamSpotHPByLumi = alcaBeamSpotHarvester.clone()
ALCAHARVESTBeamSpotHPByLumi.AlcaBeamSpotHarvesterParameters.BeamSpotOutputBase = cms.untracked.string("lumibased")
ALCAHARVESTBeamSpotHPByLumi.AlcaBeamSpotHarvesterParameters.outputRecordName = cms.untracked.string("BeamSpotObjectsRcdHPByLumi")
ALCAHARVESTBeamSpotHPByLumi.AlcaBeamSpotHarvesterParameters.BeamSpotModuleName = cms.untracked.string('alcaBeamSpotProducerHP')
ALCAHARVESTBeamSpotHPByLumi.AlcaBeamSpotHarvesterParameters.DumpTxt = cms.untracked.bool(True)

# configuration of DropBox metadata and DB output
ALCAHARVESTBeamSpotHPByLumi_metadata = cms.PSet(record = cms.untracked.string('BeamSpotObjectsRcdHPByLumi'))

ALCAHARVESTBeamSpotHPByLumi_dbOutput = cms.PSet(record = cms.string('BeamSpotObjectsRcdHPByLumi'),
                                              tag = cms.string('BeamSpotObjectHP_ByLumi'),
                                              timetype   = cms.untracked.string('lumiid')
                                              )


# --------------------------------------------------------------------------------------
# BeamSpot HP - Low PU - by Run
ALCAHARVESTBeamSpotHPLowPUByRun = ALCAHARVESTBeamSpotHPByRun.clone()
ALCAHARVESTBeamSpotHPLowPUByRun.AlcaBeamSpotHarvesterParameters.BeamSpotModuleName = cms.untracked.string('alcaBeamSpotProducerHPLowPU')

# configuration of DropBox metadata and DB output
ALCAHARVESTBeamSpotHPLowPUByRun_metadata = cms.PSet(record = cms.untracked.string('BeamSpotObjectsRcdHPByRun'))

ALCAHARVESTBeamSpotHPLowPUByRun_dbOutput = cms.PSet(record = cms.string('BeamSpotObjectsRcdHPByRun'),
                                                    tag = cms.string('BeamSpotObjectHP_ByRun'),
                                                    timetype   = cms.untracked.string('runnumber')
                                                    )

# --------------------------------------------------------------------------------------
# BeamSpot HP - Low PU - by Lumi
ALCAHARVESTBeamSpotHPLowPUByLumi = ALCAHARVESTBeamSpotHPByLumi.clone()
ALCAHARVESTBeamSpotHPLowPUByLumi.AlcaBeamSpotHarvesterParameters.BeamSpotModuleName = cms.untracked.string('alcaBeamSpotProducerHPLowPU')


# configuration of DropBox metadata and DB output
ALCAHARVESTBeamSpotHPLowPUByLumi_metadata = cms.PSet(record = cms.untracked.string('BeamSpotObjectsRcdHPByLumi'))

ALCAHARVESTBeamSpotHPLowPUByLumi_dbOutput = cms.PSet(record = cms.string('BeamSpotObjectsRcdHPByLumi'),
                                                     tag = cms.string('BeamSpotObjectHP_ByLumi'),
                                                     timetype   = cms.untracked.string('lumiid')
                                                     )

# --------------------------------------------------------------------------------------
# SiStrip Quality
ALCAHARVESTSiStripQuality_metadata = cms.PSet(record = cms.untracked.string('SiStripBadStripRcd'))

ALCAHARVESTSiStripQuality_dbOutput = cms.PSet(record = cms.string('SiStripBadStripRcd'),
                                              tag = cms.string('SiStripBadStrip_pcl'),
                                              timetype   = cms.untracked.string('runnumber')
                                              )

# --------------------------------------------------------------------------------------
# SiStrip Gains
ALCAHARVESTSiStripGains_metadata = cms.PSet(record = cms.untracked.string('SiStripApvGainRcd'))

ALCAHARVESTSiStripGains_dbOutput = cms.PSet(record = cms.string('SiStripApvGainRcd'),
                                            tag = cms.string('SiStripApvGain_pcl'),
                                            timetype   = cms.untracked.string('runnumber')
                                            )

# --------------------------------------------------------------------------------------
# SiStrip Gains (AAG)
ALCAHARVESTSiStripGainsAAG_metadata = cms.PSet(record = cms.untracked.string('SiStripApvGainRcdAAG'))

ALCAHARVESTSiStripGainsAAG_dbOutput = cms.PSet(record = cms.string('SiStripApvGainRcdAAG'),
                                                         tag = cms.string('SiStripApvGainAAG_pcl'),
                                                         timetype   = cms.untracked.string('runnumber')
                                                         )
# --------------------------------------------------------------------------------------
# SiStrip Lorentz Angle
ALCAHARVESTSiStripLA_metadata = cms.PSet(record = cms.untracked.string('SiStripLorentzAngleRcd'))

ALCAHARVESTSiStripLA_dbOutput = cms.PSet(record = cms.string('SiStripLorentzAngleRcd'),
                                         tag = cms.string('SiStripLA_pcl'),
                                         timetype   = cms.untracked.string('runnumber')
                                         )

# --------------------------------------------------------------------------------------
# SiStrip Bad Components from Hit Efficiency analysis
ALCAHARVESTSiStripHitEff_metadata = cms.PSet(record = cms.untracked.string('SiStripBadStripFromHitEffRcd'))

ALCAHARVESTSiStripHitEff_dbOutput = cms.PSet(record = cms.string('SiStripBadStripFromHitEffRcd'),
                                                    tag = cms.string('SiStripBadStripRcdHitEff_pcl'),
                                                    timetype   = cms.untracked.string('runnumber')
                                                    )

# --------------------------------------------------------------------------------------
# SiPixel Alignment
ALCAHARVESTSiPixelAli_metadata = cms.PSet(record = cms.untracked.string('TrackerAlignmentRcd'))

ALCAHARVESTSiPixelAli_dbOutput = cms.PSet(record = cms.string('TrackerAlignmentRcd'),
                                          tag = cms.string('SiPixelAli_pcl'),
                                          timetype   = cms.untracked.string('runnumber')
                                          )

# --------------------------------------------------------------------------------------
# SiPixel Alignment HG
ALCAHARVESTSiPixelAliHG_metadata = cms.PSet(record = cms.untracked.string('TrackerAlignmentHGRcd'))

ALCAHARVESTSiPixelAliHG_dbOutput = cms.PSet(record = cms.string('TrackerAlignmentHGRcd'),
                                          tag = cms.string('SiPixelAliHG_pcl'),
                                          timetype   = cms.untracked.string('runnumber')
                                          )

# --------------------------------------------------------------------------------------
# SiPixel Alignment HG combined
ALCAHARVESTSiPixelAliHGCombined_metadata = cms.PSet(record = cms.untracked.string('TrackerAlignmentHGCombinedRcd'))

ALCAHARVESTSiPixelAliHGCombined_dbOutput = cms.PSet(record = cms.string('TrackerAlignmentHGCombinedRcd'),
                                                    tag = cms.string('SiPixelAliHGCombined_pcl'),
                                                    timetype   = cms.untracked.string('runnumber')
                                                    )
# --------------------------------------------------------------------------------------
# SiPixel Alignment HG combined for HLT Calibration
ALCAHARVESTSiPixelAliHLTHGCombined_metadata = cms.PSet(record = cms.untracked.string('TrackerAlignmentHLTHGCombinedRcd'))

ALCAHARVESTSiPixelAliHLTHGCombined_dbOutput = cms.PSet(record = cms.string('TrackerAlignmentHLTHGCombinedRcd'),
                                                       tag = cms.string('SiPixelAliHLTHGCombined_pcl'),
                                                       timetype   = cms.untracked.string('runnumber')
                                                       )


# --------------------------------------------------------------------------------------
# SiPixel Lorentz Angle
ALCAHARVESTSiPixelLA_metadata = cms.PSet(record = cms.untracked.string('SiPixelLorentzAngleRcd'))

ALCAHARVESTSiPixelLA_dbOutput = cms.PSet(record = cms.string('SiPixelLorentzAngleRcd'),
                                         tag = cms.string('SiPixelLA_pcl'),
                                         timetype   = cms.untracked.string('runnumber')
                                         )

# --------------------------------------------------------------------------------------
# SiPixel Lorentz Angle Minimal Cluster Size
ALCAHARVESTSiPixelLAMCS_metadata = cms.PSet(record = cms.untracked.string('SiPixelLorentzAngleRcdMCS'))

ALCAHARVESTSiPixelLAMCS_dbOutput = cms.PSet(record = cms.string('SiPixelLorentzAngleRcdMCS'),
                                            tag = cms.string('SiPixelLAMCS_pcl'),
                                            timetype   = cms.untracked.string('runnumber')
                                         )
# --------------------------------------------------------------------------------------
# ECAL Pedestals
ALCAHARVESTEcalPedestals_metadata = cms.PSet(record = cms.untracked.string('EcalPedestalsRcd'))

ALCAHARVESTEcalPedestals_dbOutput = cms.PSet(record = cms.string('EcalPedestalsRcd'),
                                             tag = cms.string('EcalPedestals_pcl'),
                                             timetype   = cms.untracked.string('runnumber')
                                             )

# --------------------------------------------------------------------------------------
# Lumi PCC
ALCAHARVESTLumiPCC_metadata = cms.PSet(record = cms.untracked.string('LumiCorrectionsRcd'))

ALCAHARVESTLumiPCC_dbOutput = cms.PSet(record = cms.string('LumiCorrectionsRcd'),
                                             tag = cms.string('LumiPCCCorrections_pcl'),
                                             timetype   = cms.untracked.string('lumiid')
                                             )



# SiPixel Quality
ALCAHARVESTSiPixelQuality = siPixelStatusHarvester.clone()
ALCAHARVESTSiPixelQuality.SiPixelStatusManagerParameters.outputBase = cms.untracked.string("dynamicLumibased")
ALCAHARVESTSiPixelQuality.SiPixelStatusManagerParameters.aveDigiOcc = cms.untracked.int32(20000)
ALCAHARVESTSiPixelQuality.debug = cms.untracked.bool(False)

ALCAHARVESTSiPixelQuality_metadata = cms.VPSet(cms.PSet(record = cms.untracked.string('SiPixelQualityFromDbRcd_prompt')),
                                               cms.PSet(record = cms.untracked.string('SiPixelQualityFromDbRcd_stuckTBM')),
                                               cms.PSet(record = cms.untracked.string('SiPixelQualityFromDbRcd_other')))
ALCAHARVESTSiPixelQuality_dbOutput = cms.VPSet(cms.PSet(record = cms.string('SiPixelQualityFromDbRcd_prompt'),
                                                        tag = cms.string('SiPixelQualityFromDbRcd_prompt'),
                                                        timetype = cms.untracked.string('lumiid')
                                                        ),
                                               cms.PSet(record = cms.string('SiPixelQualityFromDbRcd_stuckTBM'),
                                                        tag = cms.string('SiPixelQualityFromDbRcd_stuckTBM'),
                                                        timetype = cms.untracked.string('lumiid'),
                                                        ),
                                               cms.PSet(record = cms.string('SiPixelQualityFromDbRcd_other'),
                                                        tag = cms.string('SiPixelQualityFromDbRcd_other'),
                                                        timetype = cms.untracked.string('lumiid')
                                                        )
                                               )

if ALCAHARVESTSiPixelQuality.debug == cms.untracked.bool(True) :
   dbOutput_ext = cms.VPSet(
        cms.PSet(record = cms.string('SiPixelQualityFromDbRcd_PCL'),
                tag = cms.string('SiPixelQualityFromDbRcd_PCL'),
                timetype = cms.untracked.string('lumiid')
                ),
        cms.PSet(record = cms.string('SiPixelQualityFromDbRcd_FEDerror25'),
                tag = cms.string('SiPixelQualityFromDbRcd_FEDerror25'),
                timetype = cms.untracked.string('lumiid'),
        ),
        cms.PSet(record = cms.string('SiPixelQualityFromDbRcd_permanentBad'),
                tag = cms.string('SiPixelQualityFromDbRcd_permanentBad'),
                timetype = cms.untracked.string('runnumber')
        )
   )
   ALCAHARVESTSiPixelQuality_dbOutput.extend(dbOutput_ext)

# --------------------------------------------------------------------------------------
# PPS calibration
ALCAHARVESTPPSTimingCalibration_metadata = cms.PSet(record = cms.untracked.string('PPSTimingCalibrationRcd_HPTDC'))
ALCAHARVESTPPSTimingCalibration_dbOutput = cms.PSet(record = cms.string('PPSTimingCalibrationRcd_HPTDC'),
                                                    tag = cms.string('PPSDiamondTimingCalibration_pcl'),
                                                    timetype = cms.untracked.string('runnumber')
                                                    )

ALCAHARVESTPPSDiamondSampicTimingCalibration_metadata = cms.PSet(record = cms.untracked.string('PPSTimingCalibrationRcd_SAMPIC'))
ALCAHARVESTPPSDiamondSampicTimingCalibration_dbOutput = cms.PSet(record = cms.string('PPSTimingCalibrationRcd_SAMPIC'),
                                            tag = cms.string('PPSDiamondSampicCalibration_pcl'),
                                            timetype = cms.untracked.string('runnumber'))

ALCAHARVESTPPSAlignment_metadata = cms.PSet(record = cms.untracked.string('CTPPSRPAlignmentCorrectionsDataRcd'))
ALCAHARVESTPPSAlignment_dbOutput = cms.PSet(record = cms.string('CTPPSRPAlignmentCorrectionsDataRcd'),
                                            tag = cms.string('CTPPSRPAlignment_real_pcl'),
                                            timetype = cms.untracked.string('runnumber'))

# define all the paths
BeamSpotByRun  = cms.Path(ALCAHARVESTBeamSpotByRun)
BeamSpotByLumi = cms.Path(ALCAHARVESTBeamSpotByLumi)
BeamSpotHPByRun  = cms.Path(ALCAHARVESTBeamSpotHPByRun)
BeamSpotHPByLumi = cms.Path(ALCAHARVESTBeamSpotHPByLumi)
BeamSpotHPLowPUByRun  = cms.Path(ALCAHARVESTBeamSpotHPLowPUByRun)
BeamSpotHPLowPUByLumi = cms.Path(ALCAHARVESTBeamSpotHPLowPUByLumi)
SiStripQuality = cms.Path(ALCAHARVESTSiStripQuality)
SiStripGains   = cms.Path(ALCAHARVESTSiStripGains)
SiStripGainsAAG = cms.Path(ALCAHARVESTSiStripGainsAAG)
SiStripHitEff = cms.Path(ALCAHARVESTSiStripHitEfficiency)
SiStripLA      = cms.Path(ALCAHARVESTSiStripLorentzAngle)
SiPixelAli     = cms.Path(ALCAHARVESTSiPixelAli)
SiPixelAliHG     = cms.Path(ALCAHARVESTSiPixelAliHG)
SiPixelAliHGCombined = cms.Path(ALCAHARVESTSiPixelAliHGCombined)
SiPixelAliHLTHGCombined = cms.Path(ALCAHARVESTSiPixelAliHLTHGCombined)
SiPixelLA      = cms.Path(ALCAHARVESTSiPixelLorentzAngle)
SiPixelLAMCS      = cms.Path(ALCAHARVESTSiPixelLorentzAngleMCS)
EcalPedestals  = cms.Path(ALCAHARVESTEcalPedestals)
LumiPCC = cms.Path(ALCAHARVESTLumiPCC)
SiPixelQuality = cms.Path(dqmEnvSiPixelQuality+ALCAHARVESTSiPixelQuality)#+siPixelPhase1DQMHarvester)
PPSTimingCalibration = cms.Path(ALCAHARVESTPPSTimingCalibration)
PPSDiamondSampicTimingCalibration = cms.Path(ALCAHARVESTPPSDiamondSampicTimingCalibration)
PPSAlignment = cms.Path(ALCAHARVESTPPSAlignment)

ALCAHARVESTDQMSaveAndMetadataWriter = cms.Path(dqmSaver+pclMetadataWriter)

#promptCalibHarvest = cms.Path(alcaBeamSpotHarvester)