Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 13:26:10

0001 # Auto generated configuration file
0002 # using: 
0003 # Revision: 1.19 
0004 # Source: /local/reps/CMSSW/CMSSW/Configuration/Applications/python/ConfigBuilder.py,v 
0005 # with command line options: SingleElectronPt10_cfi.py -s GEN,SIM,DIGI,L1 --pileup=NoPileUp --geometry DB --conditions=auto:startup -n 1 --no_exec
0006 import FWCore.ParameterSet.Config as cms
0007 
0008 
0009 # options
0010 import FWCore.ParameterSet.VarParsing as VarParsing
0011 options = VarParsing.VarParsing('analysis')
0012 options.register('skipEvents',
0013                  0,
0014                  VarParsing.VarParsing.multiplicity.singleton,
0015                  VarParsing.VarParsing.varType.int,
0016                  "Number of events to skip")
0017 options.register('streamer',
0018                  False,
0019                  VarParsing.VarParsing.multiplicity.singleton,
0020                  VarParsing.VarParsing.varType.bool,
0021                  "Read input from streamer file")
0022 options.register('debug',
0023                  True,
0024                  VarParsing.VarParsing.multiplicity.singleton,
0025                  VarParsing.VarParsing.varType.bool,
0026                  "Enable debug data")
0027 options.register('dumpRaw',
0028                  False,
0029                  VarParsing.VarParsing.multiplicity.singleton,
0030                  VarParsing.VarParsing.varType.bool,
0031                  "Print RAW data")
0032 options.register('dumpDigis',
0033                  False,
0034                  VarParsing.VarParsing.multiplicity.singleton,
0035                  VarParsing.VarParsing.varType.bool,
0036                  "Print digis")
0037 options.register('histos',
0038                  True,
0039                  VarParsing.VarParsing.multiplicity.singleton,
0040                  VarParsing.VarParsing.varType.bool,
0041                  "Produce standard histograms")
0042 options.register('edm',
0043                  True,
0044                  VarParsing.VarParsing.multiplicity.singleton,
0045                  VarParsing.VarParsing.varType.bool,
0046                  "Produce EDM file")
0047 options.register('valEvents',
0048                  True,
0049                  VarParsing.VarParsing.multiplicity.singleton,
0050                  VarParsing.VarParsing.varType.bool,
0051                  "Filter on validation events")
0052 options.register('process',
0053                  '',
0054                  VarParsing.VarParsing.multiplicity.singleton,
0055                  VarParsing.VarParsing.varType.string,
0056                  "Rename process if used")
0057 options.register('mps',
0058                  '',
0059                  VarParsing.VarParsing.multiplicity.list,
0060                  VarParsing.VarParsing.varType.int,
0061                  "List of MPs to process")
0062 options.register('json',
0063                  '',
0064                  VarParsing.VarParsing.multiplicity.singleton,
0065                  VarParsing.VarParsing.varType.string,
0066                  "JSON file with list of good lumi sections")
0067 options.register('evtDisp',
0068                  False,
0069                  VarParsing.VarParsing.multiplicity.singleton,
0070                  VarParsing.VarParsing.varType.bool,
0071                  'Produce histos for individual events')
0072 
0073 options.parseArguments()
0074 
0075 
0076 pname="Raw2Digi"
0077 if (options.process!=""):
0078     pname=options.process
0079 
0080 process = cms.Process(pname)
0081 
0082 # import of standard configurations
0083 process.load('Configuration.StandardSequences.Services_cff')
0084 process.load('FWCore.MessageService.MessageLogger_cfi')
0085 process.load('Configuration.StandardSequences.GeometryRecoDB_cff')
0086 process.load('Configuration.Geometry.GeometryDB_cff')
0087 process.load('Configuration.StandardSequences.MagneticField_38T_cff')
0088 process.load('Configuration.StandardSequences.SimL1Emulator_cff')
0089 process.load('Configuration.StandardSequences.EndOfProcess_cff')
0090 process.load('Configuration.StandardSequences.FrontierConditions_GlobalTag_cff')
0091 
0092 process.maxEvents = cms.untracked.PSet(
0093     input = cms.untracked.int32(options.maxEvents)
0094 )
0095 
0096 # Input source
0097 if (options.streamer) :
0098     process.source = cms.Source(
0099         "NewEventStreamFileReader",
0100         fileNames = cms.untracked.vstring (options.inputFiles),
0101         skipEvents=cms.untracked.uint32(options.skipEvents)
0102     )
0103 else :
0104     process.source = cms.Source (
0105         "PoolSource",
0106         fileNames = cms.untracked.vstring (options.inputFiles),
0107         skipEvents=cms.untracked.uint32(options.skipEvents)
0108     )
0109 
0110 if (options.json):
0111     import FWCore.PythonUtilities.LumiList as LumiList
0112     process.source.lumisToProcess = LumiList.LumiList(filename = options.json).getVLuminosityBlockRange()
0113 
0114 process.options = cms.untracked.PSet(
0115     SkipEvent = cms.untracked.vstring('ProductNotFound')
0116 )
0117 
0118 
0119 # Additional output definition
0120 # TTree output file
0121 process.load("CommonTools.UtilAlgos.TFileService_cfi")
0122 process.TFileService.fileName = cms.string('l1tCalo_2016_histos.root')
0123 
0124 # enable debug message logging for our modules
0125 
0126 process.MessageLogger.suppressInfo = cms.untracked.vstring('Geometry', 'AfterSource')
0127 
0128 if (options.dumpRaw):
0129     process.MessageLogger.files.infos = cms.untracked.PSet(
0130         INFO = cms.untracked.PSet(limit = cms.untracked.int32(0)),
0131         L1TCaloEvents = cms.untracked.PSet(
0132             limit = cms.untracked.int32(10000)
0133         )
0134     )
0135 
0136 if (options.debug):
0137 #    process.MessageLogger.debugModules = cms.untracked.vstring('L1TRawToDigi:caloStage2Digis', 'MP7BufferDumpToRaw:stage2MPRaw', 'MP7BufferDumpToRaw:stage2DemuxRaw')
0138     process.MessageLogger.debugModules = cms.untracked.vstring('*')
0139     process.MessageLogger.cerr.threshold = cms.untracked.string('DEBUG')
0140 
0141 
0142 # Other statements
0143 from Configuration.AlCa.GlobalTag import GlobalTag
0144 process.GlobalTag = GlobalTag(process.GlobalTag, 'auto:startup', '')
0145 
0146 # validation event filter
0147 process.load('EventFilter.L1TRawToDigi.validationEventFilter_cfi')
0148 
0149 # MP selectah
0150 process.load('EventFilter.L1TRawToDigi.tmtFilter_cfi')
0151 process.tmtFilter.mpList = cms.untracked.vint32(options.mps)
0152 
0153 # dump raw data
0154 process.dumpRaw = cms.EDAnalyzer( 
0155     "DumpFEDRawDataProduct",
0156     token = cms.untracked.InputTag("rawDataCollector"),
0157     feds = cms.untracked.vint32 ( 1360, 1366, 1404 ),
0158     dumpPayload = cms.untracked.bool ( options.dumpRaw )
0159 )
0160 
0161 # raw to digi
0162 process.load('EventFilter.L1TRawToDigi.caloStage2Digis_cfi')
0163 process.caloStage2Digis.InputLabel = cms.InputTag('rawDataCollector')
0164 if (options.debug):
0165     process.caloStage2Digis.debug = cms.untracked.bool(True)
0166 
0167 process.load('EventFilter.L1TRawToDigi.gtStage2Digis_cfi')
0168 process.gtStage2Digis.InputLabel = cms.InputTag('rawDataCollector')
0169 
0170 # object analyser
0171 process.load('L1Trigger.L1TCalorimeter.l1tStage2CaloAnalyzer_cfi')
0172 process.l1tStage2CaloAnalyzer.clusterToken = cms.InputTag("None")
0173 process.l1tStage2CaloAnalyzer.doText       = cms.untracked.bool(options.dumpDigis)
0174 process.l1tStage2CaloAnalyzer.doHistos     = cms.untracked.bool(options.histos)
0175 process.l1tStage2CaloAnalyzer.doEvtDisp    = cms.bool(options.evtDisp)
0176 
0177 # Path and EndPath definitions
0178 process.path = cms.Path(
0179     process.validationEventFilter
0180     +process.dumpRaw
0181     +process.caloStage2Digis
0182     +process.gtStage2Digis
0183     +process.l1tStage2CaloAnalyzer
0184 )
0185 
0186 # enable validation event filtering
0187 if (not options.valEvents):
0188     process.path.remove(process.validationEventFilter)
0189 
0190 # enable validation event filtering
0191 if (len(options.mps)==0):
0192     process.path.remove(process.tmtFilter)
0193 
0194 # enable RAW printout
0195 if (not options.dumpRaw):
0196     process.path.remove(process.dumpRaw)
0197 
0198 # optional EDM file
0199 if (options.edm):
0200     process.output = cms.OutputModule(
0201         "PoolOutputModule",
0202         outputCommands = cms.untracked.vstring("keep *"),
0203         SelectEvents = cms.untracked.PSet(
0204             SelectEvents = cms.vstring('path')
0205         ),
0206         fileName = cms.untracked.string('l1tCalo_2016_EDM.root')
0207     )
0208 
0209     process.out = cms.EndPath(
0210         process.output
0211     )