Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:03:44

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