Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:19:25

0001 import FWCore.ParameterSet.Config as cms
0002 
0003 process = cms.Process("TauJecSQLliteReader")
0004 
0005 process.load('Configuration.StandardSequences.Services_cff')
0006 process.load('Configuration.StandardSequences.FrontierConditions_GlobalTag_cff')
0007 process.GlobalTag.globaltag = 'START42_V13::All'
0008 
0009 process.source = cms.Source("EmptySource")
0010 
0011 process.maxEvents = cms.untracked.PSet(
0012     input = cms.untracked.int32(1)
0013 )
0014 
0015 payloads = [
0016     # generic tau-jet energy corrections parameters,
0017     # not specific to any reconstructed tau decay mode 
0018     'AK5tauHPSlooseCombDBcorr',
0019     # tau-jet energy corrections parameters specific to one-prong, no pi0 decay mode
0020     'AK5tauHPSlooseCombDBcorrOneProng0Pi0',
0021     # tau-jet energy corrections parameters specific to one-prong, one pi0 decay mode
0022     'AK5tauHPSlooseCombDBcorrOneProng1Pi0',
0023     # tau-jet energy corrections parameters specific to one-prong, two pi0 decay mode
0024     'AK5tauHPSlooseCombDBcorrOneProng2Pi0',
0025     # tau-jet energy corrections parameters specific to three-prong, no pi0 decay mode
0026     'AK5tauHPSlooseCombDBcorrThreeProng0Pi0'
0027 ]    
0028 
0029 process.dbReaderSequence = cms.Sequence()
0030 
0031 PoolDBESSource_toGet = []
0032 
0033 for payload in payloads:
0034     dbReader = cms.EDAnalyzer('JetCorrectorDBReader', 
0035         payloadName    = cms.untracked.string(payload),
0036         globalTag      = cms.untracked.string('START42_V13'),  
0037         printScreen    = cms.untracked.bool(False),
0038         createTextFile = cms.untracked.bool(True)
0039     )
0040     dbReaderName = "dbReader%s" % payload
0041     setattr(process, dbReaderName, dbReader)
0042     process.dbReaderSequence += getattr(process, dbReaderName)
0043 
0044     PoolDBESSource_toGet.append(cms.PSet(
0045         record = cms.string('JetCorrectionsRecord'),
0046         tag    = cms.string('JetCorrectorParametersCollection_TauJec11_V1_%s' % payload),
0047         label  = cms.untracked.string(payload)
0048     ))
0049 
0050 process.load("CondCore.DBCommon.CondDBCommon_cfi")
0051 process.SQLliteInput = cms.ESSource("PoolDBESSource",
0052     DBParameters = cms.PSet(
0053         messageLevel = cms.untracked.int32(0)
0054     ),
0055     timetype = cms.string('runnumber'),
0056     toGet = cms.VPSet(PoolDBESSource_toGet),
0057     connect = cms.string('sqlite_fip:JetMETCorrections/Modules/test/TauJec11_V1.db')
0058 )
0059 process.es_prefer_jec = cms.ESPrefer('PoolDBESSource', 'SQLliteInput')
0060 
0061 process.p = cms.Path(process.dbReaderSequence)