Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2022-05-05 01:44:54

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