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("ManyFEDErrors")
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("DEBUG")
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("eventtimedistribution")
0046 #------------------------------------------------------------------
0047 
0048 process.maxEvents = cms.untracked.PSet( input = cms.untracked.int32(-1) )
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.GeometryDB_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.l1TSDebugger_cfi")
0067 
0068 process.load("DPGAnalysis.SiStripTools.eventtimedistribution_cfi")
0069 process.eventtimedistribution.historyProduct = cms.InputTag("froml1abcHEs")
0070 process.eventtimedistribution.dbxHistosParams = cms.untracked.VPSet(
0071     cms.PSet(nbins=cms.int32(2000),min=cms.double(-0.5),max=cms.double(3999.5),firstEvent=cms.uint32(0),secondEvent=cms.uint32(7)),
0072     cms.PSet(nbins=cms.int32(2000),min=cms.double(-0.5),max=cms.double(3999.5),firstEvent=cms.uint32(1),secondEvent=cms.uint32(7)),
0073     cms.PSet(nbins=cms.int32(2000),min=cms.double(-0.5),max=cms.double(3999.5),firstEvent=cms.uint32(2),secondEvent=cms.uint32(7)),
0074     cms.PSet(nbins=cms.int32(2000),min=cms.double(-0.5),max=cms.double(3999.5),firstEvent=cms.uint32(3),secondEvent=cms.uint32(7)),
0075     cms.PSet(nbins=cms.int32(2000),min=cms.double(-0.5),max=cms.double(3999.5),firstEvent=cms.uint32(4),secondEvent=cms.uint32(7)),
0076     cms.PSet(nbins=cms.int32(2000),min=cms.double(-0.5),max=cms.double(3999.5),firstEvent=cms.uint32(5),secondEvent=cms.uint32(7)),
0077     cms.PSet(nbins=cms.int32(2000),min=cms.double(-0.5),max=cms.double(3999.5),firstEvent=cms.uint32(6),secondEvent=cms.uint32(7)),
0078     cms.PSet(nbins=cms.int32(2000),min=cms.double(-0.5),max=cms.double(3999.5),firstEvent=cms.uint32(0),secondEvent=cms.uint32(6)),
0079     cms.PSet(nbins=cms.int32(2000),min=cms.double(-0.5),max=cms.double(3999.5),firstEvent=cms.uint32(1),secondEvent=cms.uint32(6)),
0080     cms.PSet(nbins=cms.int32(2000),min=cms.double(-0.5),max=cms.double(3999.5),firstEvent=cms.uint32(2),secondEvent=cms.uint32(6)),
0081     cms.PSet(nbins=cms.int32(2000),min=cms.double(-0.5),max=cms.double(3999.5),firstEvent=cms.uint32(3),secondEvent=cms.uint32(6)),
0082     cms.PSet(nbins=cms.int32(2000),min=cms.double(-0.5),max=cms.double(3999.5),firstEvent=cms.uint32(4),secondEvent=cms.uint32(6)),
0083     cms.PSet(nbins=cms.int32(2000),min=cms.double(-0.5),max=cms.double(3999.5),firstEvent=cms.uint32(5),secondEvent=cms.uint32(6)),
0084     cms.PSet(nbins=cms.int32(2000),min=cms.double(-0.5),max=cms.double(3999.5),firstEvent=cms.uint32(0),secondEvent=cms.uint32(5)),
0085     cms.PSet(nbins=cms.int32(2000),min=cms.double(-0.5),max=cms.double(3999.5),firstEvent=cms.uint32(1),secondEvent=cms.uint32(5)),
0086     cms.PSet(nbins=cms.int32(2000),min=cms.double(-0.5),max=cms.double(3999.5),firstEvent=cms.uint32(2),secondEvent=cms.uint32(5)),
0087     cms.PSet(nbins=cms.int32(2000),min=cms.double(-0.5),max=cms.double(3999.5),firstEvent=cms.uint32(3),secondEvent=cms.uint32(5)),
0088     cms.PSet(nbins=cms.int32(2000),min=cms.double(-0.5),max=cms.double(3999.5),firstEvent=cms.uint32(4),secondEvent=cms.uint32(5)),
0089     cms.PSet(nbins=cms.int32(2000),min=cms.double(-0.5),max=cms.double(3999.5),firstEvent=cms.uint32(0),secondEvent=cms.uint32(4)),
0090     cms.PSet(nbins=cms.int32(2000),min=cms.double(-0.5),max=cms.double(3999.5),firstEvent=cms.uint32(1),secondEvent=cms.uint32(4)),
0091     cms.PSet(nbins=cms.int32(2000),min=cms.double(-0.5),max=cms.double(3999.5),firstEvent=cms.uint32(2),secondEvent=cms.uint32(4)),
0092     cms.PSet(nbins=cms.int32(2000),min=cms.double(-0.5),max=cms.double(3999.5),firstEvent=cms.uint32(3),secondEvent=cms.uint32(4)),
0093     cms.PSet(nbins=cms.int32(1000),min=cms.double(-0.5),max=cms.double(999.5),firstEvent=cms.uint32(0),secondEvent=cms.uint32(1)),
0094     )
0095 
0096 process.eventtimedistrmanyfederrorsallthr = process.eventtimedistribution.clone()
0097 process.eventtimedistrmanyfederrorshighthr = process.eventtimedistribution.clone()
0098 process.eventtimedistrmanyfederrorsmidthr = process.eventtimedistribution.clone()
0099 process.eventtimedistrmanyfederrorslowthr = process.eventtimedistribution.clone()
0100 process.eventtimedistrnomanyfederrors = process.eventtimedistribution.clone()
0101 
0102 process.seqEventHistoryReco = cms.Sequence(process.froml1abcHEs + process.APVPhases + process.l1TSDebugger)
0103 
0104 process.apvcyclephasemonitor = cms.EDAnalyzer('APVCyclePhaseMonitor',
0105                                               apvCyclePhaseCollection = cms.InputTag("APVPhases"),
0106                                               maxLSBeforeRebin = cms.untracked.uint32(250),
0107                                               startingLSFraction = cms.untracked.uint32(16),
0108                                               selectedPartitions = cms.untracked.vstring("TI","TO","TP","TM"),
0109                                               selectedVectorPartitions = cms.untracked.vstring("Any")
0110 )   
0111 
0112 
0113 process.seqEventHistory = cms.Sequence(process.eventtimedistribution + process.apvcyclephasemonitor)
0114 process.seqEventHistoryManyFEDErrorsAllThr = cms.Sequence(process.eventtimedistrmanyfederrorsallthr)
0115 process.seqEventHistoryManyFEDErrorsHighThr = cms.Sequence(process.eventtimedistrmanyfederrorshighthr)
0116 process.seqEventHistoryManyFEDErrorsMidThr = cms.Sequence(process.eventtimedistrmanyfederrorsmidthr)
0117 process.seqEventHistoryManyFEDErrorsLowThr = cms.Sequence(process.eventtimedistrmanyfederrorslowthr)
0118 process.seqEventHistoryNoManyFEDErrors = cms.Sequence(process.eventtimedistrnomanyfederrors)
0119 
0120 process.seqProducers = cms.Sequence(process.seqEventHistoryReco)
0121 
0122 #do not ignore APVe mismatches
0123 
0124 process.siStripDigis.DoAPVEmulatorCheck = cms.bool(True)
0125 #process.siStripDigis.ErrorThreshold = cms.uint32(30000)
0126 
0127 #process.siStripDigisMidThr = process.siStripDigis.clone(ErrorThreshold = cms.uint32(7174))
0128 #process.siStripDigisLowThr = process.siStripDigis.clone(ErrorThreshold = cms.uint32(2800))
0129 #process.siStripDigisAllThr = process.siStripDigis.clone(ErrorThreshold = cms.uint32(35500))
0130 
0131 #process.seqSiStripDigis = cms.Sequence(process.siStripDigis + process.siStripDigisLowThr + process.siStripDigisMidThr + process.siStripDigisAllThr)
0132 process.seqSiStripDigis = cms.Sequence(process.siStripDigis)
0133 
0134 process.seqRECO = cms.Sequence(process.seqSiStripDigis +
0135                                process.scalersRawToDigi +
0136                                process.logErrorHarvester 
0137                                )
0138 
0139 #process.logErrorTooManyErrors = cms.EDFilter("LogErrorEventFilter",
0140 #                                     src = cms.InputTag("logErrorHarvester"),
0141 #                                     maxErrorFractionInLumi = cms.double(1.0),
0142 #                                     maxErrorFractionInRun  = cms.double(1.0),
0143 #                                     maxSavedEventsPerLumiAndError = cms.uint32(1000000),
0144 #                                     #                                        categoriesToIgnore = cms.vstring("HLTConfigProvider","FastCloningDisabled")
0145 #                                     categoriesToWatch = cms.vstring("TooManyErrors"),
0146 #                                     modulesToWatch = cms.vstring("SiStripRawToDigiModule:siStripDigis")
0147 #                                     
0148 #                                     )
0149 
0150 #process.logErrorTooManyErrorsLowThr = process.logErrorTooManyErrors.clone(modulesToWatch = cms.vstring("SiStripRawToDigiModule:siStripDigisLowThr"))
0151 #process.logErrorTooManyErrorsMidThr = process.logErrorTooManyErrors.clone(modulesToWatch = cms.vstring("SiStripRawToDigiModule:siStripDigisMidThr"))
0152 #process.logErrorTooManyErrorsAllThr = process.logErrorTooManyErrors.clone(modulesToWatch = cms.vstring("SiStripRawToDigiModule:siStripDigisAllThr"))
0153 
0154 process.filterFEDBadModuleHighThr = cms.EDFilter("FEDBadModuleFilter",
0155                                                  collectionName=cms.InputTag("siStripDigis"),
0156                                                  badModThr = cms.uint32(30000),
0157                                                  wantedHisto=cms.untracked.bool(False),
0158                                                  maxLSBeforeRebin = cms.untracked.uint32(250),
0159                                                  startingLSFraction = cms.untracked.uint32(16)
0160                                                  )
0161 process.filterFEDBadModuleAllThr = process.filterFEDBadModuleHighThr.clone(badModThr = cms.uint32(35500),wantedHisto=cms.untracked.bool(True))
0162 process.filterFEDBadModuleMidThr = process.filterFEDBadModuleHighThr.clone(badModThr = cms.uint32(7174),wantedHisto=cms.untracked.bool(False))
0163 process.filterFEDBadModuleLowThr = process.filterFEDBadModuleHighThr.clone(badModThr = cms.uint32(2000),wantedHisto=cms.untracked.bool(False))
0164 
0165 process.badModuleFED74 = cms.EDFilter("FEDBadModuleFilter",
0166                                       collectionName=cms.InputTag("siStripDigis"),
0167                                       badModThr = cms.uint32(0),
0168                                       wantedHisto=cms.untracked.bool(True),
0169                                       moduleList = cms.untracked.vuint32(369158204),
0170                                       maxLSBeforeRebin = cms.untracked.uint32(250),
0171                                       startingLSFraction = cms.untracked.uint32(16)
0172                                       )
0173 process.badModuleFED102 = cms.EDFilter("FEDBadModuleFilter",
0174                                        collectionName=cms.InputTag("siStripDigis"),
0175                                        badModThr = cms.uint32(0),
0176                                        wantedHisto=cms.untracked.bool(True),
0177                                        moduleList = cms.untracked.vuint32(369141837,369141833,369141829),
0178                                        maxLSBeforeRebin = cms.untracked.uint32(250),
0179                                        startingLSFraction = cms.untracked.uint32(16)
0180                                       )
0181 process.badModuleFED108 = cms.EDFilter("FEDBadModuleFilter",
0182                                        collectionName=cms.InputTag("siStripDigis"),
0183                                        badModThr = cms.uint32(0),
0184                                        wantedHisto=cms.untracked.bool(True),
0185                                        moduleList = cms.untracked.vuint32(369142074,369142077,369142078),
0186                                        maxLSBeforeRebin = cms.untracked.uint32(250),
0187                                        startingLSFraction = cms.untracked.uint32(16)
0188                                        )
0189 
0190 
0191 #process.seqTooManyErrorsAllThr = cms.Sequence(process.logErrorTooManyErrorsAllThr)
0192 #process.seqTooManyErrorsHighThr = cms.Sequence(~process.logErrorTooManyErrorsAllThr + process.logErrorTooManyErrors)
0193 #process.seqTooManyErrorsMidThr = cms.Sequence(~process.logErrorTooManyErrorsAllThr + ~process.logErrorTooManyErrors + process.logErrorTooManyErrorsMidThr)
0194 #process.seqTooManyErrorsLowThr = cms.Sequence(~process.logErrorTooManyErrorsAllThr + ~process.logErrorTooManyErrors + ~process.logErrorTooManyErrorsMidThr +
0195 #                                              process.logErrorTooManyErrorsLowThr)
0196 #process.seqNoTooManyErrors = cms.Sequence(~process.logErrorTooManyErrorsAllThr + ~process.logErrorTooManyErrors + ~process.logErrorTooManyErrorsMidThr +
0197 #                                          ~process.logErrorTooManyErrorsLowThr)
0198 
0199 process.seqTooManyErrorsAllThr = cms.Sequence(process.filterFEDBadModuleAllThr)
0200 process.seqTooManyErrorsHighThr = cms.Sequence(~process.filterFEDBadModuleAllThr + process.filterFEDBadModuleHighThr)
0201 process.seqTooManyErrorsMidThr = cms.Sequence(~process.filterFEDBadModuleAllThr + ~process.filterFEDBadModuleHighThr +
0202                                               process.filterFEDBadModuleMidThr)
0203 process.seqTooManyErrorsLowThr = cms.Sequence(~process.filterFEDBadModuleAllThr + ~process.filterFEDBadModuleHighThr +
0204                                               ~process.filterFEDBadModuleMidThr +process.filterFEDBadModuleLowThr)
0205 process.seqNoTooManyErrors = cms.Sequence(~process.filterFEDBadModuleAllThr + ~process.filterFEDBadModuleHighThr +
0206                                           ~process.filterFEDBadModuleMidThr + ~process.filterFEDBadModuleLowThr)
0207 
0208 
0209 process.load("DQM.SiStripCommon.TkHistoMap_cff")
0210 
0211 process.load("DQM.SiStripMonitorHardware.siStripFEDMonitor_Tier0_cff")
0212 
0213 process.siStripFEDMonitor.BadMajorityInPartitionHistogramConfig.Enabled = True
0214 
0215 process.siStripFEDMonitorAllThr = process.siStripFEDMonitor.clone(  HistogramFolderName = cms.untracked.string('SiStrip/ReadoutView/FedSummaryAllThr'))
0216 process.siStripFEDMonitorHighThr = process.siStripFEDMonitor.clone(  HistogramFolderName = cms.untracked.string('SiStrip/ReadoutView/FedSummaryHighThr'))
0217 process.siStripFEDMonitorMidThr = process.siStripFEDMonitor.clone(  HistogramFolderName = cms.untracked.string('SiStrip/ReadoutView/FedSummaryMidThr'))
0218 process.siStripFEDMonitorLowThr = process.siStripFEDMonitor.clone(  HistogramFolderName = cms.untracked.string('SiStrip/ReadoutView/FedSummaryLowThr'))
0219 process.siStripFEDMonitorNoErr = process.siStripFEDMonitor.clone(  HistogramFolderName = cms.untracked.string('SiStrip/ReadoutView/FedSummaryNoErr'))
0220 
0221 process.load('Configuration.StandardSequences.EndOfProcess_cff')
0222 process.load("Configuration.EventContent.EventContent_cff")
0223 
0224 process.DQMoutput = cms.OutputModule("PoolOutputModule",
0225                                      splitLevel = cms.untracked.int32(0),
0226                                      outputCommands = process.DQMEventContent.outputCommands,
0227                                      fileName = cms.untracked.string('manyfederrors_DQM.root'),
0228                                      dataset = cms.untracked.PSet(
0229             filterName = cms.untracked.string(''),
0230                     dataTier = cms.untracked.string('DQM')
0231                 )
0232                                                   )
0233 
0234 process.endjob_step = cms.EndPath(process.endOfProcess)
0235 process.DQMoutput_step = cms.EndPath(process.DQMoutput)
0236              
0237 
0238 process.p0 = cms.Path(
0239     process.seqRECO +
0240     process.seqProducers +
0241     process.siStripFEDMonitor +
0242     process.seqEventHistory +
0243     process.badModuleFED74 +
0244     process.badModuleFED102 +
0245     process.badModuleFED108 
0246     )
0247 
0248 process.pnomanyfederrors = cms.Path(
0249     process.seqRECO +
0250     process.seqProducers +
0251     process.seqNoTooManyErrors +
0252     process.siStripFEDMonitorNoErr +
0253     process.seqEventHistoryNoManyFEDErrors 
0254     )
0255 
0256 process.pmanyfederrorslowthr = cms.Path(
0257     process.seqRECO +
0258     process.seqProducers +
0259     process.seqTooManyErrorsLowThr +
0260     process.siStripFEDMonitorLowThr +
0261     process.seqEventHistoryManyFEDErrorsLowThr 
0262     )
0263 
0264 process.pmanyfederrorsmidthr = cms.Path(
0265     process.seqRECO +
0266     process.seqProducers +
0267     process.seqTooManyErrorsMidThr +
0268     process.siStripFEDMonitorMidThr +
0269     process.seqEventHistoryManyFEDErrorsMidThr 
0270     )
0271 
0272 process.pmanyfederrorshighthr = cms.Path(
0273     process.seqRECO +
0274     process.seqProducers +
0275     process.seqTooManyErrorsHighThr +
0276     process.siStripFEDMonitorHighThr +
0277     process.seqEventHistoryManyFEDErrorsHighThr 
0278     )
0279 
0280 process.pmanyfederrorsallthr = cms.Path(
0281     process.seqRECO +
0282     process.seqProducers +
0283     process.seqTooManyErrorsAllThr +
0284     process.siStripFEDMonitorAllThr +
0285     process.seqEventHistoryManyFEDErrorsAllThr 
0286     )
0287 
0288 
0289 #----GlobalTag ------------------------
0290 
0291 process.load("Configuration.StandardSequences.FrontierConditions_GlobalTag_cff")
0292 from Configuration.AlCa.GlobalTag import GlobalTag
0293 process.GlobalTag = GlobalTag(process.GlobalTag, options.globalTag, '')
0294 
0295 
0296 process.TFileService = cms.Service('TFileService',
0297                                    fileName = cms.string('ManyFEDErrors.root')
0298                                    )
0299 
0300 #print process.dumpPython()