Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
import FWCore.ParameterSet.Config as cms
import FWCore.ParameterSet.VarParsing as VarParsing
process = cms.Process("BadChannelMerge")
#prepare options
options = VarParsing.VarParsing("analysis")
options.register ('globalTag',
"DONOTEXIST",
VarParsing.VarParsing.multiplicity.singleton, # singleton or list
VarParsing.VarParsing.varType.string, # string, int, or float
"GlobalTag")
options.register ('dqmFile',
"",
VarParsing.VarParsing.multiplicity.singleton, # singleton or list
VarParsing.VarParsing.varType.string, # string, int, or float
"DQM root file")
options.register ('runNumber',
1,
VarParsing.VarParsing.multiplicity.singleton, # singleton or list
VarParsing.VarParsing.varType.int, # string, int, or float
"run number")
options.parseArguments()
process.MessageLogger = cms.Service("MessageLogger",
destinations = cms.untracked.vstring('cout','cerr','MergedBadComponents_withFEDBadChannel'), #Reader, cout
categories = cms.untracked.vstring('SiStripQualityStatistics'),
debugModules = cms.untracked.vstring('siStripDigis',
'siStripClusters',
'siStripZeroSuppression',
'SiStripClusterizer',
'siStripOfflineAnalyser'),
cerr = cms.untracked.PSet(threshold = cms.untracked.string('ERROR')
),
cout = cms.untracked.PSet(threshold = cms.untracked.string('INFO'),
default = cms.untracked.PSet(limit=cms.untracked.int32(0))
),
MergedBadComponents_withFEDBadChannel = cms.untracked.PSet(threshold = cms.untracked.string('INFO'),
default = cms.untracked.PSet(limit=cms.untracked.int32(0)),
SiStripQualityStatistics = cms.untracked.PSet(limit=cms.untracked.int32(100000))
)
)
process.load("Configuration.Geometry.GeometryRecoDB_cff")
process.load('Configuration.StandardSequences.FrontierConditions_GlobalTag_cff')
from Configuration.AlCa.GlobalTag import GlobalTag
process.GlobalTag = GlobalTag(process.GlobalTag, 'auto:run2_data_promptlike', '')
process.source = cms.Source("EmptySource",
firstRun = cms.untracked.uint32(305064),
numberEventsInRun = cms.untracked.uint32(1),
numberEventsInLuminosityBlock = cms.untracked.uint32(1),
firstTime = cms.untracked.uint64(6476731255819795072),
timeBetweenEvents = cms.untracked.uint64(1)
)
process.maxEvents = cms.untracked.PSet(
input = cms.untracked.int32(1)
)
process.load("CalibTracker.SiStripESProducers.SiStripBadModuleFedErrESSource_cfi")
process.siStripBadModuleFedErrESSource.appendToDataLabel = cms.string('BadModules_from_FEDBadChannel')
process.siStripBadModuleFedErrESSource.ReadFromFile = cms.bool(True)
process.siStripBadModuleFedErrESSource.FileName = cms.string('DQM_V0001_R000305064__Global__CMSSW_X_Y_Z__RECO.root')
process.siStripQualityESProducer.ListOfRecordToMerge = cms.VPSet(
cms.PSet(record = cms.string("SiStripDetVOffRcd"), tag = cms.string('')), # DCS information
cms.PSet(record = cms.string('SiStripDetCablingRcd'), tag = cms.string('')), # Use Detector cabling information to exclude detectors not connected
cms.PSet(record = cms.string('SiStripBadChannelRcd'), tag = cms.string('')), # Online Bad components
cms.PSet(record = cms.string('SiStripBadFiberRcd'), tag = cms.string('')), # Bad Channel list from the selected IOV as done at PCL
cms.PSet(record = cms.string('SiStripBadModuleFedErrRcd'), tag = cms.string('BadModules_from_FEDBadChannel')), # BadChannel list from FED erroes
cms.PSet(record = cms.string('RunInfoRcd'), tag = cms.string('')) # List of FEDs exluded during data taking
)
process.siStripQualityESProducer.ReduceGranularity = cms.bool(False)
process.siStripQualityESProducer.ThresholdForReducedGranularity = cms.double(0.3)
process.siStripQualityESProducer.appendToDataLabel = cms.string('MergedBadComponent_SD')
process.load("DQMServices.Core.DQMStore_cfg")
process.stat = cms.EDProducer("SiStripQualityStatistics",
TkMapFileName = cms.untracked.string('MergedBadComponentsTkMap.png'),
dataLabel = cms.untracked.string('MergedBadComponent_SD')
)
#### Add these lines to produce a tracker map
process.load("DQM.SiStripCommon.TkHistoMap_cff")
process.p = cms.Path(process.stat)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.