Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 14:14:40

0001 import FWCore.ParameterSet.Config as cms
0002 
0003 process = cms.Process("APVGAIN")
0004 
0005 process.load('Configuration.StandardSequences.GeometryRecoDB_cff')
0006 process.load("Configuration.StandardSequences.FrontierConditions_GlobalTag_cff")
0007 
0008 #this block is there to solve issue related to SiStripQualityRcd
0009 process.load("CalibTracker.SiStripESProducers.SiStripQualityESProducer_cfi")
0010 process.load("CalibTracker.SiStripESProducers.fake.SiStripDetVOffFakeESSource_cfi")
0011 process.es_prefer_fakeSiStripDetVOff = cms.ESPrefer("SiStripDetVOffFakeESSource","siStripDetVOffFakeESSource")
0012 
0013 process.MessageLogger = cms.Service("MessageLogger",
0014     cout = cms.untracked.PSet( threshold = cms.untracked.string('ERROR')  ),
0015     destinations = cms.untracked.vstring('cout')
0016 )
0017 
0018 process.options = cms.untracked.PSet(
0019     Rethrow = cms.untracked.vstring('ProductNotFound'),
0020     fileMode = cms.untracked.string('FULLMERGE')
0021 )
0022 
0023 process.maxEvents = cms.untracked.PSet(
0024     input = cms.untracked.int32(1)
0025 )
0026 
0027 from Configuration.AlCa.GlobalTag import GlobalTag
0028 process.GlobalTag = GlobalTag(process.GlobalTag, 'XXX_GT_XXX', '')
0029 
0030 from FileList_cfg import calibTreeList
0031 
0032 process.load("CalibTracker.SiStripChannelGain.computeGain_cff")
0033 process.SiStripCalib.FirstSetOfConstants = cms.untracked.bool(False)
0034 process.SiStripCalib.CalibrationLevel    = cms.untracked.int32(0) # 0==APV, 1==Laser, 2==module
0035 process.SiStripCalib.saveSummary         = cms.untracked.bool(True)
0036 process.SiStripCalib.calibrationMode     = cms.untracked.string( 'XXX_CALMODE_XXX' )
0037 
0038 
0039 if(XXX_PCL_XXX):
0040    process.SiStripCalib.AlgoMode = cms.untracked.string('PCL')
0041    process.SiStripCalib.harvestingMode = cms.untracked.bool(True)
0042    process.SiStripCalib.DQMdir         = cms.untracked.string('XXX_DQMDIR_XXX')
0043    process.source = cms.Source("PoolSource",
0044        secondaryFileNames = cms.untracked.vstring(),
0045        fileNames = calibTreeList,
0046        processingMode = cms.untracked.string('RunsAndLumis')
0047    )
0048 else:
0049    process.SiStripCalib.InputFiles          = calibTreeList
0050    process.source = cms.Source("EmptyIOVSource",
0051        timetype   = cms.string('runnumber'),
0052        interval   = cms.uint64(1),
0053        firstValue = cms.uint64(XXX_FIRSTRUN_XXX),
0054        lastValue  = cms.uint64(XXX_LASTRUN_XXX)
0055    )
0056 
0057 process.PoolDBOutputService = cms.Service("PoolDBOutputService",
0058     BlobStreamerName = cms.untracked.string('TBufferBlobStreamingService'),
0059     DBParameters = cms.PSet(
0060         messageLevel = cms.untracked.int32(2),
0061         authenticationPath = cms.untracked.string('/afs/cern.ch/cms/DB/conddb')
0062     ),
0063     timetype = cms.untracked.string('runnumber'),
0064     connect = cms.string('sqlite_file:Gains_Sqlite.db'),
0065     toPut = cms.VPSet(cms.PSet(
0066         record = cms.string('SiStripApvGainRcd'),
0067         tag = cms.string('SiStripGainFromParticles')
0068     ))
0069 )
0070 
0071 process.TFileService = cms.Service("TFileService",
0072         fileName = cms.string('Gains_Tree.root')  
0073 )
0074 
0075 process.DQMStore = cms.Service("DQMStore")
0076 
0077 
0078 if(XXX_PCL_XXX):
0079    process.load("DQMServices.Components.DQMFileSaver_cfi")
0080    process.dqmSaver.convention = 'Offline'
0081    process.dqmSaver.workflow = '/Express/PCLTest/ALCAPROMPT'
0082 
0083    from DQMServices.Components.EDMtoMEConverter_cfi import *
0084 
0085    process.EDMtoMEConvertSiStripGains = EDMtoMEConverter.clone()
0086    process.EDMtoMEConvertSiStripGains.lumiInputTag = cms.InputTag("MEtoEDMConvertSiStripGains","MEtoEDMConverterLumi")
0087    process.EDMtoMEConvertSiStripGains.runInputTag = cms.InputTag("MEtoEDMConvertSiStripGains","MEtoEDMConverterRun")
0088 
0089    process.EDMtoMEConvertSiStripGainsAAG = EDMtoMEConverter.clone()
0090    process.EDMtoMEConvertSiStripGainsAAG.lumiInputTag = cms.InputTag("MEtoEDMConvertSiStripGainsAAG","MEtoEDMConverterLumi")
0091    process.EDMtoMEConvertSiStripGainsAAG.runInputTag = cms.InputTag("MEtoEDMConvertSiStripGainsAAG","MEtoEDMConverterRun")
0092 
0093 
0094    ConvertersSiStripGains = cms.Sequence( process.EDMtoMEConvertSiStripGains +
0095                                           process.EDMtoMEConvertSiStripGainsAAG )
0096 
0097    process.p = cms.Path( ConvertersSiStripGains * process.SiStripCalib * process.dqmSaver)
0098 
0099 else:
0100    process.p = cms.Path(process.SiStripCalib)
0101 
0102 
0103 
0104 #import PhysicsTools.PythonAnalysis.LumiList as LumiList
0105 #process.source.lumisToProcess = LumiList.LumiList(filename = '/afs/cern.ch/cms/CAF/CMSCOMM/COMM_DQM/certification/Collisions15/13TeV/DCSOnly/json_DCSONLY_Run2015B.txt').getVLuminosityBlockRange()
0106