Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2022-08-09 22:35:11

0001 import FWCore.ParameterSet.Config as cms
0002 
0003 # import the needed ingredients
0004 from Calibration.TkAlCaRecoProducers.AlcaBeamSpotHarvester_cff import *
0005 from Calibration.TkAlCaRecoProducers.AlcaSiStripQualityHarvester_cff import *
0006 from Calibration.TkAlCaRecoProducers.AlcaSiStripGainsHarvester_cff import *
0007 from Calibration.TkAlCaRecoProducers.AlcaSiStripGainsAAGHarvester_cff import *
0008 from Calibration.TkAlCaRecoProducers.AlcaSiStripHitEfficiencyHarvester_cff import *
0009 from Calibration.TkAlCaRecoProducers.AlcaSiPixelLorentzAngleHarvester_cff import *
0010 from Alignment.CommonAlignmentProducer.AlcaSiPixelAliHarvester_cff import *
0011 from Alignment.CommonAlignmentProducer.AlcaSiPixelAliHarvesterHG_cff import *
0012 from Calibration.EcalCalibAlgos.AlcaEcalPedestalsHarvester_cff import *
0013 from Calibration.LumiAlCaRecoProducers.AlcaLumiPCCHarvester_cff import *
0014 from CalibTracker.SiPixelQuality.SiPixelStatusHarvester_cfi import *
0015 from CalibTracker.SiPixelQuality.DQMEventInfoSiPixelQuality_cff import *
0016 from CalibPPS.TimingCalibration.PPSTimingCalibrationHarvester_cff import *
0017 from CalibPPS.TimingCalibration.ALCARECOPPSDiamondSampicTimingCalibHarvester_cff import *
0018 from CalibPPS.AlignmentGlobal.PPSAlignmentHarvester_cff import *
0019 
0020 from CommonTools.ConditionDBWriter.PCLMetadataWriter_cfi import *
0021 
0022 # common ingredients
0023 from CondCore.CondDB.CondDB_cfi import CondDB
0024 CondDBOutput = CondDB.clone(connect = cms.string("sqlite_file:promptCalibConditions.db"))
0025 
0026 PoolDBOutputService = cms.Service("PoolDBOutputService",
0027                                   CondDBOutput,
0028                                   toPut = cms.VPSet(),
0029                                   #timetype = cms.untracked.string("runnumber"),
0030                                   #timetype = cms.untracked.string("lumiid"),
0031                                   )
0032 
0033 
0034 from DQMServices.Components.DQMFileSaver_cfi import * # FIXME
0035 dqmSaver.convention = 'Offline'
0036 dqmSaver.workflow = '/Express/PCLTest/ALCAPROMPT'
0037 #dqmSaver.saveAtJobEnd = True
0038 
0039 # workflow definitions
0040 # --------------------------------------------------------------------------------------
0041 # --------------------------------------------------------------------------------------
0042 # BeamSpot by Run
0043 ALCAHARVESTBeamSpotByRun = alcaBeamSpotHarvester.clone()
0044 ALCAHARVESTBeamSpotByRun.AlcaBeamSpotHarvesterParameters.BeamSpotOutputBase = cms.untracked.string("runbased")
0045 ALCAHARVESTBeamSpotByRun.AlcaBeamSpotHarvesterParameters.outputRecordName = cms.untracked.string("BeamSpotObjectsRcdByRun")
0046 
0047 ALCAHARVESTBeamSpotByRun_metadata = cms.PSet(record = cms.untracked.string('BeamSpotObjectsRcdByRun'))
0048 
0049 ALCAHARVESTBeamSpotByRun_dbOutput = cms.PSet(record = cms.string('BeamSpotObjectsRcdByRun'),
0050                                              tag = cms.string('BeamSpotObject_ByRun'),
0051                                              timetype   = cms.untracked.string('runnumber')
0052                                              )
0053 
0054 # --------------------------------------------------------------------------------------
0055 # BeamSpot by Lumi
0056 ALCAHARVESTBeamSpotByLumi = alcaBeamSpotHarvester.clone()
0057 ALCAHARVESTBeamSpotByLumi.AlcaBeamSpotHarvesterParameters.BeamSpotOutputBase = cms.untracked.string("lumibased")
0058 ALCAHARVESTBeamSpotByLumi.AlcaBeamSpotHarvesterParameters.outputRecordName = cms.untracked.string("BeamSpotObjectsRcdByLumi")
0059 
0060 # configuration of DropBox metadata and DB output
0061 ALCAHARVESTBeamSpotByLumi_metadata = cms.PSet(record = cms.untracked.string('BeamSpotObjectsRcdByLumi'))
0062 
0063 ALCAHARVESTBeamSpotByLumi_dbOutput = cms.PSet(record = cms.string('BeamSpotObjectsRcdByLumi'),
0064                                               tag = cms.string('BeamSpotObject_ByLumi'),
0065                                               timetype   = cms.untracked.string('lumiid')
0066                                               )
0067 
0068 # --------------------------------------------------------------------------------------
0069 # BeamSpot HP by Run
0070 ALCAHARVESTBeamSpotHPByRun = alcaBeamSpotHarvester.clone()
0071 ALCAHARVESTBeamSpotHPByRun.AlcaBeamSpotHarvesterParameters.BeamSpotOutputBase = cms.untracked.string("runbased")
0072 ALCAHARVESTBeamSpotHPByRun.AlcaBeamSpotHarvesterParameters.outputRecordName = cms.untracked.string("BeamSpotObjectsRcdHPByRun")
0073 ALCAHARVESTBeamSpotHPByRun.AlcaBeamSpotHarvesterParameters.BeamSpotModuleName = cms.untracked.string('alcaBeamSpotProducerHP')
0074 
0075 ALCAHARVESTBeamSpotHPByRun_metadata = cms.PSet(record = cms.untracked.string('BeamSpotObjectsRcdHPByRun'))
0076 
0077 ALCAHARVESTBeamSpotHPByRun_dbOutput = cms.PSet(record = cms.string('BeamSpotObjectsRcdHPByRun'),
0078                                              tag = cms.string('BeamSpotObjectHP_ByRun'),
0079                                              timetype   = cms.untracked.string('runnumber')
0080                                              )
0081 
0082 # --------------------------------------------------------------------------------------
0083 # BeamSpot HP by Lumi
0084 ALCAHARVESTBeamSpotHPByLumi = alcaBeamSpotHarvester.clone()
0085 ALCAHARVESTBeamSpotHPByLumi.AlcaBeamSpotHarvesterParameters.BeamSpotOutputBase = cms.untracked.string("lumibased")
0086 ALCAHARVESTBeamSpotHPByLumi.AlcaBeamSpotHarvesterParameters.outputRecordName = cms.untracked.string("BeamSpotObjectsRcdHPByLumi")
0087 ALCAHARVESTBeamSpotHPByLumi.AlcaBeamSpotHarvesterParameters.BeamSpotModuleName = cms.untracked.string('alcaBeamSpotProducerHP')
0088 ALCAHARVESTBeamSpotHPByLumi.AlcaBeamSpotHarvesterParameters.DumpTxt = cms.untracked.bool(True)
0089 
0090 # configuration of DropBox metadata and DB output
0091 ALCAHARVESTBeamSpotHPByLumi_metadata = cms.PSet(record = cms.untracked.string('BeamSpotObjectsRcdHPByLumi'))
0092 
0093 ALCAHARVESTBeamSpotHPByLumi_dbOutput = cms.PSet(record = cms.string('BeamSpotObjectsRcdHPByLumi'),
0094                                               tag = cms.string('BeamSpotObjectHP_ByLumi'),
0095                                               timetype   = cms.untracked.string('lumiid')
0096                                               )
0097 
0098 
0099 # --------------------------------------------------------------------------------------
0100 # BeamSpot HP - Low PU - by Run
0101 ALCAHARVESTBeamSpotHPLowPUByRun = ALCAHARVESTBeamSpotHPByRun.clone()
0102 ALCAHARVESTBeamSpotHPLowPUByRun.AlcaBeamSpotHarvesterParameters.BeamSpotModuleName = cms.untracked.string('alcaBeamSpotProducerHPLowPU')
0103 
0104 # configuration of DropBox metadata and DB output
0105 ALCAHARVESTBeamSpotHPLowPUByRun_metadata = cms.PSet(record = cms.untracked.string('BeamSpotObjectsRcdHPByRun'))
0106 
0107 ALCAHARVESTBeamSpotHPLowPUByRun_dbOutput = cms.PSet(record = cms.string('BeamSpotObjectsRcdHPByRun'),
0108                                                     tag = cms.string('BeamSpotObjectHP_ByRun'),
0109                                                     timetype   = cms.untracked.string('runnumber')
0110                                                     )
0111 
0112 # --------------------------------------------------------------------------------------
0113 # BeamSpot HP - Low PU - by Lumi
0114 ALCAHARVESTBeamSpotHPLowPUByLumi = ALCAHARVESTBeamSpotHPByLumi.clone()
0115 ALCAHARVESTBeamSpotHPLowPUByLumi.AlcaBeamSpotHarvesterParameters.BeamSpotModuleName = cms.untracked.string('alcaBeamSpotProducerHPLowPU')
0116 
0117 
0118 # configuration of DropBox metadata and DB output
0119 ALCAHARVESTBeamSpotHPLowPUByLumi_metadata = cms.PSet(record = cms.untracked.string('BeamSpotObjectsRcdHPByLumi'))
0120 
0121 ALCAHARVESTBeamSpotHPLowPUByLumi_dbOutput = cms.PSet(record = cms.string('BeamSpotObjectsRcdHPByLumi'),
0122                                                      tag = cms.string('BeamSpotObjectHP_ByLumi'),
0123                                                      timetype   = cms.untracked.string('lumiid')
0124                                                      )
0125 
0126 # --------------------------------------------------------------------------------------
0127 # SiStrip Quality
0128 ALCAHARVESTSiStripQuality_metadata = cms.PSet(record = cms.untracked.string('SiStripBadStripRcd'))
0129 
0130 ALCAHARVESTSiStripQuality_dbOutput = cms.PSet(record = cms.string('SiStripBadStripRcd'),
0131                                               tag = cms.string('SiStripBadStrip_pcl'),
0132                                               timetype   = cms.untracked.string('runnumber')
0133                                               )
0134 
0135 # --------------------------------------------------------------------------------------
0136 # SiStrip Gains
0137 ALCAHARVESTSiStripGains_metadata = cms.PSet(record = cms.untracked.string('SiStripApvGainRcd'))
0138 
0139 ALCAHARVESTSiStripGains_dbOutput = cms.PSet(record = cms.string('SiStripApvGainRcd'),
0140                                             tag = cms.string('SiStripApvGain_pcl'),
0141                                             timetype   = cms.untracked.string('runnumber')
0142                                             )
0143 
0144 # --------------------------------------------------------------------------------------
0145 # SiStrip Gains (AAG)
0146 ALCAHARVESTSiStripGainsAAG_metadata = cms.PSet(record = cms.untracked.string('SiStripApvGainRcdAAG'))
0147 
0148 ALCAHARVESTSiStripGainsAAG_dbOutput = cms.PSet(record = cms.string('SiStripApvGainRcdAAG'),
0149                                                          tag = cms.string('SiStripApvGainAAG_pcl'),
0150                                                          timetype   = cms.untracked.string('runnumber')
0151                                                          )
0152 
0153 # --------------------------------------------------------------------------------------
0154 # SiStrip Bad Components from Hit Efficiency analysis
0155 ALCAHARVESTSiStripHitEff_metadata = cms.PSet(record = cms.untracked.string('SiStripBadStripFromHitEffRcd'))
0156 
0157 ALCAHARVESTSiStripHitEff_dbOutput = cms.PSet(record = cms.string('SiStripBadStripFromHitEffRcd'),
0158                                                     tag = cms.string('SiStripBadStripRcdHitEff_pcl'),
0159                                                     timetype   = cms.untracked.string('runnumber')
0160                                                     )
0161 
0162 # --------------------------------------------------------------------------------------
0163 # SiPixel Alignment
0164 ALCAHARVESTSiPixelAli_metadata = cms.PSet(record = cms.untracked.string('TrackerAlignmentRcd'))
0165 
0166 ALCAHARVESTSiPixelAli_dbOutput = cms.PSet(record = cms.string('TrackerAlignmentRcd'),
0167                                           tag = cms.string('SiPixelAli_pcl'),
0168                                           timetype   = cms.untracked.string('runnumber')
0169                                           )
0170 
0171 # --------------------------------------------------------------------------------------
0172 # SiPixel Alignment HG
0173 ALCAHARVESTSiPixelAliHG_metadata = cms.PSet(record = cms.untracked.string('TrackerAlignmentHGRcd'))
0174 
0175 ALCAHARVESTSiPixelAliHG_dbOutput = cms.PSet(record = cms.string('TrackerAlignmentHGRcd'),
0176                                           tag = cms.string('SiPixelAliHG_pcl'),
0177                                           timetype   = cms.untracked.string('runnumber')
0178                                           )
0179 
0180 # --------------------------------------------------------------------------------------
0181 # SiPixel Lorentz Angle
0182 ALCAHARVESTSiPixelLA_metadata = cms.PSet(record = cms.untracked.string('SiPixelLorentzAngleRcd'))
0183 
0184 ALCAHARVESTSiPixelLA_dbOutput = cms.PSet(record = cms.string('SiPixelLorentzAngleRcd'),
0185                                          tag = cms.string('SiPixelLA_pcl'),
0186                                          timetype   = cms.untracked.string('runnumber')
0187                                          )
0188 
0189 # --------------------------------------------------------------------------------------
0190 # ECAL Pedestals
0191 ALCAHARVESTEcalPedestals_metadata = cms.PSet(record = cms.untracked.string('EcalPedestalsRcd'))
0192 
0193 ALCAHARVESTEcalPedestals_dbOutput = cms.PSet(record = cms.string('EcalPedestalsRcd'),
0194                                              tag = cms.string('EcalPedestals_pcl'),
0195                                              timetype   = cms.untracked.string('runnumber')
0196                                              )
0197 
0198 # --------------------------------------------------------------------------------------
0199 # Lumi PCC
0200 ALCAHARVESTLumiPCC_metadata = cms.PSet(record = cms.untracked.string('LumiCorrectionsRcd'))
0201 
0202 ALCAHARVESTLumiPCC_dbOutput = cms.PSet(record = cms.string('LumiCorrectionsRcd'),
0203                                              tag = cms.string('LumiPCCCorrections_pcl'),
0204                                              timetype   = cms.untracked.string('lumiid')
0205                                              )
0206 
0207 
0208 
0209 # SiPixel Quality
0210 ALCAHARVESTSiPixelQuality = siPixelStatusHarvester.clone()
0211 ALCAHARVESTSiPixelQuality.SiPixelStatusManagerParameters.outputBase = cms.untracked.string("dynamicLumibased")
0212 ALCAHARVESTSiPixelQuality.SiPixelStatusManagerParameters.aveDigiOcc = cms.untracked.int32(20000)
0213 ALCAHARVESTSiPixelQuality.debug = cms.untracked.bool(False)
0214 
0215 ALCAHARVESTSiPixelQuality_metadata = cms.VPSet(cms.PSet(record = cms.untracked.string('SiPixelQualityFromDbRcd_prompt')),
0216                                                cms.PSet(record = cms.untracked.string('SiPixelQualityFromDbRcd_stuckTBM')),
0217                                                cms.PSet(record = cms.untracked.string('SiPixelQualityFromDbRcd_other')))
0218 ALCAHARVESTSiPixelQuality_dbOutput = cms.VPSet(cms.PSet(record = cms.string('SiPixelQualityFromDbRcd_prompt'),
0219                                                         tag = cms.string('SiPixelQualityFromDbRcd_prompt'),
0220                                                         timetype = cms.untracked.string('lumiid')
0221                                                         ),
0222                                                cms.PSet(record = cms.string('SiPixelQualityFromDbRcd_stuckTBM'),
0223                                                         tag = cms.string('SiPixelQualityFromDbRcd_stuckTBM'),
0224                                                         timetype = cms.untracked.string('lumiid'),
0225                                                         ),
0226                                                cms.PSet(record = cms.string('SiPixelQualityFromDbRcd_other'),
0227                                                         tag = cms.string('SiPixelQualityFromDbRcd_other'),
0228                                                         timetype = cms.untracked.string('lumiid')
0229                                                         )
0230                                                )
0231 
0232 if ALCAHARVESTSiPixelQuality.debug == cms.untracked.bool(True) :
0233    dbOutput_ext = cms.VPSet(
0234         cms.PSet(record = cms.string('SiPixelQualityFromDbRcd_PCL'),
0235                 tag = cms.string('SiPixelQualityFromDbRcd_PCL'),
0236                 timetype = cms.untracked.string('lumiid')
0237                 ),
0238         cms.PSet(record = cms.string('SiPixelQualityFromDbRcd_FEDerror25'),
0239                 tag = cms.string('SiPixelQualityFromDbRcd_FEDerror25'),
0240                 timetype = cms.untracked.string('lumiid'),
0241         ),
0242         cms.PSet(record = cms.string('SiPixelQualityFromDbRcd_permanentBad'),
0243                 tag = cms.string('SiPixelQualityFromDbRcd_permanentBad'),
0244                 timetype = cms.untracked.string('runnumber')
0245         )
0246    )
0247    ALCAHARVESTSiPixelQuality_dbOutput.extend(dbOutput_ext)
0248 
0249 # --------------------------------------------------------------------------------------
0250 # PPS calibration
0251 ALCAHARVESTPPSTimingCalibration_metadata = cms.PSet(record = cms.untracked.string('PPSTimingCalibrationRcd_HPTDC'))
0252 ALCAHARVESTPPSTimingCalibration_dbOutput = cms.PSet(record = cms.string('PPSTimingCalibrationRcd_HPTDC'),
0253                                                     tag = cms.string('PPSDiamondTimingCalibration_pcl'),
0254                                                     timetype = cms.untracked.string('runnumber')
0255                                                     )
0256 
0257 ALCAHARVESTPPSDiamondSampicTimingCalibration_metadata = cms.PSet(record = cms.untracked.string('PPSTimingCalibrationRcd_SAMPIC'))
0258 ALCAHARVESTPPSDiamondSampicTimingCalibration_dbOutput = cms.PSet(record = cms.string('PPSTimingCalibrationRcd_SAMPIC'),
0259                                             tag = cms.string('PPSDiamondSampicCalibration_pcl'),
0260                                             timetype = cms.untracked.string('runnumber'))
0261 
0262 ALCAHARVESTPPSAlignment_metadata = cms.PSet(record = cms.untracked.string('CTPPSRPAlignmentCorrectionsDataRcd'))
0263 ALCAHARVESTPPSAlignment_dbOutput = cms.PSet(record = cms.string('CTPPSRPAlignmentCorrectionsDataRcd'),
0264                                             tag = cms.string('CTPPSRPAlignment_real_pcl'),
0265                                             timetype = cms.untracked.string('runnumber'))
0266 
0267 # define all the paths
0268 BeamSpotByRun  = cms.Path(ALCAHARVESTBeamSpotByRun)
0269 BeamSpotByLumi = cms.Path(ALCAHARVESTBeamSpotByLumi)
0270 BeamSpotHPByRun  = cms.Path(ALCAHARVESTBeamSpotHPByRun)
0271 BeamSpotHPByLumi = cms.Path(ALCAHARVESTBeamSpotHPByLumi)
0272 BeamSpotHPLowPUByRun  = cms.Path(ALCAHARVESTBeamSpotHPLowPUByRun)
0273 BeamSpotHPLowPUByLumi = cms.Path(ALCAHARVESTBeamSpotHPLowPUByLumi)
0274 SiStripQuality = cms.Path(ALCAHARVESTSiStripQuality)
0275 SiStripGains   = cms.Path(ALCAHARVESTSiStripGains)
0276 SiStripGainsAAG = cms.Path(ALCAHARVESTSiStripGainsAAG)
0277 SiStripHitEff = cms.Path(ALCAHARVESTSiStripHitEfficiency)
0278 SiPixelAli     = cms.Path(ALCAHARVESTSiPixelAli)
0279 SiPixelAliHG     = cms.Path(ALCAHARVESTSiPixelAliHG)
0280 SiPixelLA      = cms.Path(ALCAHARVESTSiPixelLorentzAngle)
0281 EcalPedestals  = cms.Path(ALCAHARVESTEcalPedestals)
0282 LumiPCC = cms.Path(ALCAHARVESTLumiPCC)
0283 SiPixelQuality = cms.Path(dqmEnvSiPixelQuality+ALCAHARVESTSiPixelQuality)#+siPixelPhase1DQMHarvester)
0284 PPSTimingCalibration = cms.Path(ALCAHARVESTPPSTimingCalibration)
0285 PPSDiamondSampicTimingCalibration = cms.Path(ALCAHARVESTPPSDiamondSampicTimingCalibration)
0286 PPSAlignment = cms.Path(ALCAHARVESTPPSAlignment)
0287 
0288 ALCAHARVESTDQMSaveAndMetadataWriter = cms.Path(dqmSaver+pclMetadataWriter)
0289 
0290 #promptCalibHarvest = cms.Path(alcaBeamSpotHarvester)