Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 14:22:29

0001 from __future__ import print_function
0002 # Auto generated configuration file
0003 # using: 
0004 # Revision: 1.19 
0005 # Source: /local/reps/CMSSW/CMSSW/Configuration/Applications/python/ConfigBuilder.py,v 
0006 # with command line options: SingleElectronPt10_cfi.py -s GEN,SIM,DIGI,L1 --pileup=NoPileUp --geometry DB --conditions=auto:startup -n 1 --no_exec
0007 import FWCore.ParameterSet.Config as cms
0008 import FWCore.Utilities.FileUtils as FileUtils # ADDED
0009 
0010 import os
0011 
0012 # options
0013 import FWCore.ParameterSet.VarParsing as VarParsing
0014 options = VarParsing.VarParsing('analysis')
0015 options.register('filename',
0016                  "rx_summary",
0017                  VarParsing.VarParsing.multiplicity.singleton,
0018                  VarParsing.VarParsing.varType.string,
0019                  "Filename string")
0020 options.register('outDir',
0021                  "rxFiles",
0022                  VarParsing.VarParsing.multiplicity.singleton,
0023                  VarParsing.VarParsing.varType.string,
0024                  "Output directory for buffer files")
0025 options.register('nPayloadFrames',
0026                  13,
0027                  VarParsing.VarParsing.multiplicity.singleton,
0028                  VarParsing.VarParsing.varType.int,
0029                  "N payload frames per event")
0030 options.register('nHeaderFrames',
0031                  0,
0032                  VarParsing.VarParsing.multiplicity.singleton,
0033                  VarParsing.VarParsing.varType.int,
0034                  "N header frames per event")
0035 options.register('nClearFrames',
0036                  0,
0037                  VarParsing.VarParsing.multiplicity.singleton,
0038                  VarParsing.VarParsing.varType.int,
0039                  "N clear frames between events")
0040 options.register('dump',
0041                  True,
0042                  VarParsing.VarParsing.multiplicity.singleton,
0043                  VarParsing.VarParsing.varType.bool,
0044                  "Dump messages")
0045 options.register('pattern',
0046                  True,
0047                  VarParsing.VarParsing.multiplicity.singleton,
0048                  VarParsing.VarParsing.varType.bool,
0049                  "Save pattern file")
0050 options.register('edm',
0051                  False,
0052                  VarParsing.VarParsing.multiplicity.singleton,
0053                  VarParsing.VarParsing.varType.bool,
0054                  "Save EDM file")
0055 options.register('debug',
0056                  False,
0057                  VarParsing.VarParsing.multiplicity.singleton,
0058                  VarParsing.VarParsing.varType.bool,
0059                  "Enable debug data")
0060 
0061 options.parseArguments()
0062 
0063 if (options.maxEvents == -1):
0064     options.maxEvents = 1
0065 
0066 fileList = FileUtils.loadListFromFile('ttbar.list')
0067 readFiles = cms.untracked.vstring(*fileList)
0068 
0069 # make output directory if it doesn't already exist
0070 if not os.path.isdir(options.outDir): os.mkdir(options.outDir)
0071 
0072 process = cms.Process('L1Emulator')
0073 
0074 # import of standard configurations
0075 process.load('FWCore.MessageService.MessageLogger_cfi')
0076 process.load('Configuration.Geometry.GeometryDB_cff')
0077 process.load('Configuration.StandardSequences.Digi_cff')
0078 process.load('Configuration.StandardSequences.FrontierConditions_GlobalTag_cff')
0079 process.load('Configuration.StandardSequences.RawToDigi_cff')
0080 
0081 process.maxEvents = cms.untracked.PSet(
0082     input = cms.untracked.int32(options.maxEvents)
0083 )
0084 
0085 # Input source
0086 process.source = cms.Source("PoolSource",
0087     fileNames = readFiles,
0088 )
0089 
0090 process.options = cms.untracked.PSet(
0091 
0092 )
0093 
0094 from Configuration.AlCa.GlobalTag import GlobalTag
0095 process.GlobalTag = GlobalTag(process.GlobalTag, 'auto:startup', '')
0096 
0097 
0098 # Output definition
0099 process.output = cms.OutputModule("PoolOutputModule",
0100     splitLevel = cms.untracked.int32(0),
0101     eventAutoFlushCompressedSize = cms.untracked.int32(5242880),
0102     outputCommands = cms.untracked.vstring("keep *",
0103                        "drop *_mix_*_*"),
0104     fileName = cms.untracked.string('SingleElectronPt10_cfi_py_GEN_SIM_DIGI_L1.root'),
0105     dataset = cms.untracked.PSet(
0106         filterName = cms.untracked.string(''),
0107         dataTier = cms.untracked.string('')
0108     ),
0109     SelectEvents = cms.untracked.PSet(
0110         SelectEvents = cms.vstring('generation_step')
0111     )
0112 )
0113 
0114 
0115 # enable debug message logging for our modules
0116 process.MessageLogger.categories.append('L1TCaloEvents')
0117 
0118 process.MessageLogger.suppressInfo = cms.untracked.vstring('Geometry', 'AfterSource')
0119 
0120 if (options.dump):
0121     process.MessageLogger.infos.placeholder = cms.untracked.bool(False)
0122     process.MessageLogger.infos.INFO = cms.untracked.PSet(limit = cms.untracked.int32(0))
0123     process.MessageLogger.infos.L1TCaloEvents = cms.untracked.PSet(
0124       optionalPSet = cms.untracked.bool(True),
0125       limit = cms.untracked.int32(10000)
0126     )
0127 
0128 if (options.debug):
0129     process.MessageLogger.debugModules = cms.untracked.vstring('*')
0130     process.MessageLogger.cerr.threshold = cms.untracked.string('DEBUG')
0131 
0132 
0133 # TTree output file
0134 process.load("CommonTools.UtilAlgos.TFileService_cfi")
0135 process.TFileService.fileName = cms.string('l1tCalo_2019_histos.root')
0136 
0137 process.load('L1Trigger.L1CaloTrigger.l1tS2PFJetInputPatternWriter_cfi')
0138 process.l1tS2PFJetInputPatternWriter.pfTag = cms.InputTag("l1pfCandidates", "Puppi", "IN")#"REPR")
0139 process.l1tS2PFJetInputPatternWriter.filename = cms.untracked.string(options.filename)
0140 process.l1tS2PFJetInputPatternWriter.outDir = cms.untracked.string(options.outDir)
0141 process.l1tS2PFJetInputPatternWriter.nPayloadFrames = cms.untracked.uint32(options.nPayloadFrames)
0142 process.l1tS2PFJetInputPatternWriter.nHeaderFrames = cms.untracked.uint32(options.nHeaderFrames)
0143 process.l1tS2PFJetInputPatternWriter.nClearFrames = cms.untracked.uint32(options.nClearFrames)
0144 
0145 # Path and EndPath definitions
0146 process.path = cms.Path(
0147     process.l1tS2PFJetInputPatternWriter)
0148 
0149 if (options.edm):
0150     process.output_step = cms.EndPath(process.output)
0151