Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 13:09:12

0001 import FWCore.ParameterSet.Config as cms
0002 import FWCore.ParameterSet.VarParsing as VarParsing
0003 
0004 process = cms.Process("CommonModeAnalyzer")
0005 
0006 #prepare options
0007 
0008 options = VarParsing.VarParsing("analysis")
0009 
0010 options.register ('globalTag',
0011                   "DONOTEXIST",
0012                   VarParsing.VarParsing.multiplicity.singleton, # singleton or list
0013                   VarParsing.VarParsing.varType.string,          # string, int, or float
0014                   "GlobalTag")
0015 
0016 options.parseArguments()
0017 
0018 #
0019 
0020 process.options = cms.untracked.PSet(
0021     wantSummary = cms.untracked.bool(True),
0022     fileMode = cms.untracked.string("FULLMERGE")
0023     )
0024 
0025 process.load("FWCore.MessageService.MessageLogger_cfi")
0026 
0027 process.MessageLogger.cout.enable = cms.untracked.bool(True)
0028 process.MessageLogger.cout.threshold = cms.untracked.string("INFO")
0029 process.MessageLogger.cout.default = cms.untracked.PSet(
0030     limit = cms.untracked.int32(10000000)
0031     )
0032 process.MessageLogger.cout.FwkReport = cms.untracked.PSet(
0033     reportEvery = cms.untracked.int32(10000)
0034     )
0035 
0036 process.MessageLogger.cerr.enable = cms.untracked.bool(True)
0037 process.MessageLogger.cerr.threshold = cms.untracked.string("WARNING")
0038 process.MessageLogger.cerr.default = cms.untracked.PSet(
0039     limit = cms.untracked.int32(10000000)
0040     )
0041 process.MessageLogger.cerr.FwkReport = cms.untracked.PSet(
0042     reportEvery = cms.untracked.int32(100000)
0043     )
0044 
0045 process.MessageLogger.debugModules=cms.untracked.vstring("commonmodeanalyzer")
0046 #------------------------------------------------------------------
0047 
0048 process.maxEvents = cms.untracked.PSet( input = cms.untracked.int32(options.maxEvents) )
0049 
0050 process.source = cms.Source("PoolSource",
0051                     fileNames = cms.untracked.vstring(options.inputFiles),
0052 #                    skipBadFiles = cms.untracked.bool(True),
0053                     inputCommands = cms.untracked.vstring("keep *", "drop *_MEtoEDMConverter_*_*")
0054                     )
0055 
0056 #--------------------------------------
0057 process.load("Configuration.StandardSequences.RawToDigi_Data_cff")
0058 process.load("Configuration.StandardSequences.MagneticField_cff")
0059 process.load("Configuration.StandardSequences.GeometryRecoDB_cff")
0060 process.load("Configuration.StandardSequences.Reconstruction_cff")
0061 
0062 process.froml1abcHEs = cms.EDProducer("EventWithHistoryProducerFromL1ABC",
0063                                       l1ABCCollection=cms.InputTag("scalersRawToDigi")
0064                                       )
0065 process.load("DPGAnalysis.SiStripTools.apvcyclephaseproducerfroml1tsDB_cfi")
0066 process.load("DPGAnalysis.SiStripTools.eventtimedistribution_cfi")
0067 process.eventtimedistribution.historyProduct = cms.InputTag("froml1abcHEs")
0068 
0069 process.seqEventHistoryReco = cms.Sequence(process.froml1abcHEs + process.APVPhases)
0070 process.seqEventHistory = cms.Sequence(process.eventtimedistribution)
0071 
0072 process.seqProducers = cms.Sequence(process.seqEventHistoryReco)
0073 
0074 process.load("DPGAnalysis.SiStripTools.commonmodeanalyzer_cfi")
0075 process.commonmodeanalyzer.historyProduct = cms.InputTag("froml1abcHEs")
0076 process.commonmodeanalyzer.selections = cms.VPSet(
0077         cms.PSet(label=cms.string("TIB"),selection=cms.untracked.vstring("0x1e000000-0x16000000")),
0078         cms.PSet(label=cms.string("TEC"),selection=cms.untracked.vstring("0x1e000000-0x1c000000")),
0079         cms.PSet(label=cms.string("TOB"),selection=cms.untracked.vstring("0x1e000000-0x1a000000")),
0080         cms.PSet(label=cms.string("TID"),selection=cms.untracked.vstring("0x1e000000-0x18000000")),
0081         cms.PSet(label=cms.string("TOB_L1"),selection=cms.untracked.vstring("0x1e01c000-0x1a004000")),
0082         cms.PSet(label=cms.string("TOB_L2"),selection=cms.untracked.vstring("0x1e01c000-0x1a008000")),
0083         cms.PSet(label=cms.string("TOBplus_1_4_1_4"),selection=cms.untracked.vstring("0x1e01ffe0-0x1a006460")),
0084         cms.PSet(label=cms.string("TOBplus_2_2_2_4"),selection=cms.untracked.vstring("0x1e01ffe0-0x1a00a280"))
0085 )
0086 process.commonmodenoignorebadfedmod = process.commonmodeanalyzer.clone(ignoreBadFEDMod=False)
0087 process.commonmodenoignore = process.commonmodenoignorebadfedmod.clone(ignoreNotConnected=False)
0088 
0089 process.siStripDigis.UnpackCommonModeValues=cms.bool(True)
0090 
0091 process.p0 = cms.Path(
0092    process.siStripDigis + process.siStripZeroSuppression +
0093    process.scalersRawToDigi +
0094    process.seqProducers +
0095    process.seqEventHistory +
0096    process.commonmodeanalyzer +
0097    process.commonmodenoignorebadfedmod + 
0098    process.commonmodenoignore 
0099    )
0100 
0101 #----GlobalTag ------------------------
0102 
0103 process.load("Configuration.StandardSequences.FrontierConditions_GlobalTag_cff")
0104 from Configuration.AlCa.GlobalTag import GlobalTag
0105 process.GlobalTag = GlobalTag(process.GlobalTag, options.globalTag, '')
0106 
0107 process.TFileService = cms.Service('TFileService',
0108                                    fileName = cms.string('CommonModeAnalyzer.root')
0109                                    )
0110 
0111 #print process.dumpPython()