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                  "Use streamer file as input")
0022 options.register('debug',
0023                  False,
0024                  VarParsing.VarParsing.multiplicity.singleton,
0025                  VarParsing.VarParsing.varType.bool,
0026                  "Print debug messages")
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                  False,
0039                  VarParsing.VarParsing.multiplicity.singleton,
0040                  VarParsing.VarParsing.varType.bool,
0041                  "Produce standard histograms")
0042 options.register('edm',
0043                  False,
0044                  VarParsing.VarParsing.multiplicity.singleton,
0045                  VarParsing.VarParsing.varType.bool,
0046                  "Produce EDM file")
0047 options.register('valEvents',
0048                  False,
0049                  VarParsing.VarParsing.multiplicity.singleton,
0050                  VarParsing.VarParsing.varType.bool,
0051                  "Filter on validation events")
0052 
0053                  
0054 options.parseArguments()
0055 
0056 process = cms.Process('Raw2Digi')
0057 
0058 # import of standard configurations
0059 process.load('Configuration.StandardSequences.Services_cff')
0060 process.load('FWCore.MessageService.MessageLogger_cfi')
0061 process.load('Configuration.StandardSequences.GeometryRecoDB_cff')
0062 process.load('Configuration.Geometry.GeometryDB_cff')
0063 process.load('Configuration.StandardSequences.MagneticField_38T_cff')
0064 process.load('Configuration.StandardSequences.SimL1Emulator_cff')
0065 process.load('Configuration.StandardSequences.EndOfProcess_cff')
0066 process.load('Configuration.StandardSequences.FrontierConditions_GlobalTag_cff')
0067 
0068 # Input source
0069 if (options.streamer) :
0070     process.source = cms.Source(
0071         "NewEventStreamFileReader",
0072         fileNames = cms.untracked.vstring (options.inputFiles),
0073         skipEvents=cms.untracked.uint32(options.skipEvents)
0074     )
0075 else :
0076     process.source = cms.Source (
0077         "PoolSource",
0078         fileNames = cms.untracked.vstring (options.inputFiles),
0079         skipEvents=cms.untracked.uint32(options.skipEvents)
0080     )
0081 
0082 # N events
0083 process.maxEvents = cms.untracked.PSet(
0084     input = cms.untracked.int32(options.maxEvents)
0085 )
0086 
0087 
0088 process.options = cms.untracked.PSet(
0089     SkipEvent = cms.untracked.vstring('ProductNotFound')
0090 )
0091 
0092 
0093 # enable debug message logging for our modules
0094 process.load('FWCore.MessageService.MessageLogger_cfi')
0095 process.MessageLogger.suppressInfo = cms.untracked.vstring('Geometry', 'AfterSource')
0096 if (options.dumpRaw or options.dumpDigis):
0097     process.MessageLogger.files.infos = cms.untracked.PSet(
0098                                                      INFO = cms.untracked.PSet(limit = cms.untracked.int32(0)),
0099                                                      L1TCaloEvents = cms.untracked.PSet(
0100                                                          limit = cms.untracked.int32(10000)
0101                                                      )
0102     )
0103 
0104 if (options.debug):
0105 #    process.MessageLogger.debugModules = cms.untracked.vstring('L1TRawToDigi:caloStage2Digis', 'MP7BufferDumpToRaw:stage2MPRaw', 'MP7BufferDumpToRaw:stage2DemuxRaw')
0106     process.MessageLogger.debugModules = cms.untracked.vstring('*')
0107     process.MessageLogger.cerr.threshold = cms.untracked.string('DEBUG')
0108 
0109 
0110 
0111 # Other statements
0112 from Configuration.AlCa.GlobalTag import GlobalTag
0113 process.GlobalTag = GlobalTag(process.GlobalTag, 'auto:startup', '')
0114 
0115 
0116 # dump raw data
0117 process.dumpRaw = cms.EDAnalyzer( 
0118     "DumpFEDRawDataProduct",
0119     label = cms.untracked.string("rawDataCollector"),
0120     feds = cms.untracked.vint32 ( 1352 ),
0121     dumpPayload = cms.untracked.bool ( options.dumpRaw )
0122 )
0123 
0124 # validation event filter
0125 process.load('EventFilter.L1TRawToDigi.validationEventFilter_cfi')
0126 
0127 # raw to digi
0128 process.load('EventFilter.L1TRawToDigi.caloStage1Digis_cfi')
0129 process.caloStage1Digis.InputLabel = cms.InputTag('rawDataCollector')
0130 
0131 # analyzer/dumper
0132 process.load('L1Trigger.L1TCalorimeter.l1tStage2CaloAnalyzer_cfi')
0133 process.load('L1Trigger.L1GctAnalyzer.dumpGctDigis_cfi')
0134 process.load('L1Trigger.RegionalCaloTrigger.L1RCTTestAnalyzer_cfi')
0135 
0136 # Path and EndPath definitions
0137 process.path = cms.Path(
0138     process.validationEventFilter
0139     +process.dumpRaw
0140     +process.caloStage1Digis
0141     +process.l1tStage2CaloAnalyzer
0142     +process.L1RCTTestAnalyzer
0143     +process.dumpGctDigis
0144 )
0145 
0146 # enable validation event filtering
0147 if (not options.valEvents):
0148     process.path.remove(process.validationEventFilter)
0149 
0150 # optional histograms & text dump
0151 if (options.dumpDigis or options.histos):
0152     process.load("CommonTools.UtilAlgos.TFileService_cfi")
0153     process.TFileService.fileName = cms.string('l1tCalo_histos.root')
0154 
0155     process.l1tStage2CaloAnalyzer.towerToken   = cms.InputTag("None")
0156     process.l1tStage2CaloAnalyzer.clusterToken = cms.InputTag("None")
0157     process.l1tStage2CaloAnalyzer.mpEGToken    = cms.InputTag("None")
0158     process.l1tStage2CaloAnalyzer.mpJetToken   = cms.InputTag("None")
0159     process.l1tStage2CaloAnalyzer.mpTauToken   = cms.InputTag("None")
0160     process.l1tStage2CaloAnalyzer.mpEtSumToken = cms.InputTag("None")
0161     process.l1tStage2CaloAnalyzer.egToken      = cms.InputTag("caloStage1Digis")
0162     process.l1tStage2CaloAnalyzer.jetToken     = cms.InputTag("caloStage1Digis")
0163     process.l1tStage2CaloAnalyzer.tauToken     = cms.InputTag("caloStage1Digis","rlxTaus")
0164     process.l1tStage2CaloAnalyzer.etSumToken   = cms.InputTag("caloStage1Digis")
0165     process.l1tStage2CaloAnalyzer.doText       = cms.untracked.bool(options.dumpDigis)
0166     process.l1tStage2CaloAnalyzer.doHistos     = cms.untracked.bool(options.histos)
0167     process.L1RCTTestAnalyzer.rctDigisLabel    = cms.InputTag("caloStage1Digis")
0168 else:
0169     process.path.remove(process.l1tStage2CaloAnalyzer)
0170     process.path.remove(process.L1RCTTestAnalyzer)
0171 
0172 if (options.dumpDigis):
0173         process.dumpGctDigis.doRctEm = cms.untracked.bool(True)
0174         process.dumpGctDigis.doRegions = cms.untracked.bool(True)
0175         process.dumpGctDigis.doInternEm = cms.untracked.bool(False)
0176         process.dumpGctDigis.doEm = cms.untracked.bool(False)
0177         process.dumpGctDigis.doJets = cms.untracked.bool(False)
0178         process.dumpGctDigis.doEnergySums = cms.untracked.bool(False)
0179         process.dumpGctDigis.doFibres = cms.untracked.bool(False)
0180         process.dumpGctDigis.doEmulated = cms.untracked.bool(False)
0181         process.dumpGctDigis.doHardware = cms.untracked.bool(True)
0182         process.dumpGctDigis.outFile = cms.untracked.string('')
0183         process.dumpGctDigis.rawInput = cms.untracked.InputTag("caloStage1Digis")
0184 else:
0185     process.path.remove(process.dumpGctDigis)
0186 
0187 
0188 # optional EDM file
0189 if (options.edm):
0190     process.output = cms.OutputModule(
0191         "PoolOutputModule",
0192         outputCommands = cms.untracked.vstring("keep *"),
0193         fileName = cms.untracked.string('l1tCalo_EDM.root')
0194     )
0195 
0196     process.out = cms.EndPath(
0197         process.output
0198     )
0199     
0200