Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:06:43

0001 import FWCore.ParameterSet.Config as cms
0002 import FWCore.ParameterSet.VarParsing as VarParsing
0003 
0004 #This config files produces plots to debug APV shots
0005 
0006 process = cms.Process("APVShotAnalyzer")
0007 
0008 
0009 from Configuration.Eras.Era_Run2_2016_cff import Run2_2016
0010 process = cms.Process('APVShotAnalyzer',Run2_2016)
0011 
0012 #prepare options
0013 
0014 process.load("DQM.SiStripCommon.TkHistoMap_cff")
0015 
0016 options = VarParsing.VarParsing("analysis")
0017 
0018 options.register ('globalTag',
0019                   "DONOTEXIST",
0020                   VarParsing.VarParsing.multiplicity.singleton, # singleton or list
0021                   VarParsing.VarParsing.varType.string,          # string, int, or float
0022                   "GlobalTag")
0023 
0024 
0025 options.parseArguments()
0026 
0027 #
0028 
0029 process.options = cms.untracked.PSet(
0030     wantSummary = cms.untracked.bool(False),
0031     fileMode = cms.untracked.string("FULLMERGE")
0032     )
0033 
0034 process.load("FWCore.MessageService.MessageLogger_cfi")
0035 
0036 
0037 process.MessageLogger.debugModules=cms.untracked.vstring("apvshotfilter")
0038 #------------------------------------------------------------------
0039 
0040 process.maxEvents = cms.untracked.PSet( input = cms.untracked.int32(-1) )
0041 
0042 process.source = cms.Source("PoolSource",
0043                     fileNames = cms.untracked.vstring(options.inputFiles),
0044 #                    skipBadFiles = cms.untracked.bool(True),
0045                     inputCommands = cms.untracked.vstring("keep *", "drop *_MEtoEDMConverter_*_*")
0046                     )
0047 
0048 #--------------------------------------
0049 process.load("Configuration.StandardSequences.RawToDigi_Data_cff")
0050 process.load("Configuration.StandardSequences.MagneticField_cff")
0051 process.load("Configuration.StandardSequences.GeometryRecoDB_cff")
0052 process.load("Configuration.StandardSequences.Reconstruction_Data_cff")
0053 process.load('Configuration.StandardSequences.L1Reco_cff')
0054 
0055 process.froml1abcHEs = cms.EDProducer("EventWithHistoryProducerFromL1ABC",
0056                                       l1ABCCollection=cms.InputTag("scalersRawToDigi")
0057                                       )
0058 process.load("DPGAnalysis.SiStripTools.apvcyclephaseproducerfroml1tsDB_cfi")
0059 process.load("DPGAnalysis.SiStripTools.eventtimedistribution_cfi")
0060 
0061 process.seqEventHistoryReco = process.seqEventHistoryReco = cms.Sequence(process.froml1abcHEs + process.APVPhases)
0062 process.seqEventHistory = cms.Sequence(process.eventtimedistribution)
0063 
0064 process.eventtimedistribution.historyProduct = cms.InputTag("froml1abcHEs")
0065 
0066 
0067 process.load("DPGAnalysis.SiStripTools.digibigeventsdebugger_cfi")
0068 
0069 process.digibigeventsdebugger.collection=cms.InputTag("siStripDigis","ZeroSuppressed")
0070 
0071 #with the following option set to True, the configuration produces a set of histograms for each even with APV shots, setting to false it produces only one summary histograms where all the APV shots in data are folded
0072 process.digibigeventsdebugger.singleEvents=cms.bool(True)
0073 process.digibigeventsdebugger.selections=cms.VPSet(
0074 
0075 #an example to consider only the module with the detId indicated (in this case 369141946), the hexadecimal number in the selection are as follow: the first is a bit mask to select single modules, the second is the detId in hexadecimal format
0076 cms.PSet(label=cms.string("369141946"),selection=cms.untracked.vstring("0x1FFFFFFF-0x1600A8BA"))
0077 #cms.PSet(label=cms.string("369141949"),selection=cms.untracked.vstring("0x1FFFFFFF-0x1600A8BD")),
0078 
0079 #Examples below can be used to filter a single partition
0080 #cms.PSet(label=cms.string("TIB"),selection=cms.untracked.vstring("0x1e000000-0x16000000")),
0081 #cms.PSet(label=cms.string("TEC"),selection=cms.untracked.vstring("0x1e000000-0x1c000000")),
0082 #cms.PSet(label=cms.string("TOB"),selection=cms.untracked.vstring("0x1e000000-0x1a000000")),
0083 #cms.PSet(label=cms.string("TID"),selection=cms.untracked.vstring("0x1e000000-0x18000000"))
0084 
0085 )
0086 
0087 process.load("DPGAnalysis.SiStripTools.apvshotsfilter_cfi")
0088 process.apvshotsfilter.useCabling = cms.untracked.bool(True)
0089 
0090 process.load("DPGAnalysis.SiStripTools.apvshotsanalyzer_cfi")
0091 process.apvshotsanalyzer.historyProduct = cms.InputTag("froml1abcHEs")
0092 process.apvshotsanalyzer.useCabling = cms.untracked.bool(True)
0093 
0094 process.load("DPGAnalysis.SiStripTools.eventtimedistribution_cfi")
0095 
0096 
0097 import DPGAnalysis.SiStripTools.apvcyclephaseproducerfroml1tsDB_cfi 
0098 process.APVPhases = DPGAnalysis.SiStripTools.apvcyclephaseproducerfroml1tsDB_cfi.APVPhases 
0099 
0100 process.load("DPGAnalysis.SiStripTools.eventwithhistoryproducerfroml1abc_cfi")
0101 
0102 process.eventtimedistributionAfter= process.eventtimedistribution.clone()
0103 
0104 
0105 #----GlobalTag ------------------------
0106 
0107 process.load("Configuration.StandardSequences.FrontierConditions_GlobalTag_cff")
0108 from Configuration.AlCa.GlobalTag import GlobalTag
0109 process.GlobalTag = GlobalTag(process.GlobalTag,options.globalTag, '')
0110 
0111 process.p0 = cms.Path(
0112    process.siStripDigis + process.siStripZeroSuppression +
0113    process.scalersRawToDigi +
0114    process.seqEventHistoryReco +
0115    process.seqEventHistory +
0116    process.eventtimedistribution +
0117    process.apvshotsfilter +
0118    process.apvshotsanalyzer +
0119    process.eventtimedistributionAfter +
0120    process.digibigeventsdebugger
0121 
0122    )
0123 
0124 process.TFileService = cms.Service('TFileService',
0125                                    fileName = cms.string('APVShotAnalyzer.root')
0126                                    )
0127