Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2022-06-07 22:22:34

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('json',
0048                  '',
0049                  VarParsing.VarParsing.multiplicity.singleton,
0050                  VarParsing.VarParsing.varType.string,
0051                  "JSON file with list of good lumi sections")
0052 options.register('evtDisp',
0053                  False,
0054                  VarParsing.VarParsing.multiplicity.singleton,
0055                  VarParsing.VarParsing.varType.bool,
0056                  'Produce histos for individual events')
0057 options.register('trigger',
0058                  False,
0059                  VarParsing.VarParsing.multiplicity.singleton,
0060                  VarParsing.VarParsing.varType.bool,
0061                  'Trigger the data')
0062 options.register('reconstruct',
0063                  False,
0064                  VarParsing.VarParsing.multiplicity.singleton,
0065                  VarParsing.VarParsing.varType.bool,
0066                  'Reconstruct the data')
0067 options.register('feds',
0068                  [1467,1468],
0069                  VarParsing.VarParsing.multiplicity.list,
0070                  VarParsing.VarParsing.varType.int,
0071                  "List of FEDs")
0072 options.register('unpackerLabel',
0073                  'rawDataCollector',
0074                  VarParsing.VarParsing.multiplicity.singleton,
0075                  VarParsing.VarParsing.varType.string,
0076                  "Label for the GEM unpacker RAW input collection")
0077 options.register('useB904Data',
0078                  False,
0079                  VarParsing.VarParsing.multiplicity.singleton,
0080                  VarParsing.VarParsing.varType.bool)
0081 
0082 options.parseArguments()
0083 
0084 
0085 
0086 from Configuration.Eras.Era_Run3_cff import Run3
0087 process = cms.Process('RECO',Run3)
0088 
0089 process.load('Configuration.StandardSequences.L1Reco_cff')
0090 process.load('Configuration.StandardSequences.Reconstruction_cff')
0091 process.load('Configuration.StandardSequences.RecoSim_cff')
0092 process.load('Configuration.StandardSequences.Services_cff')
0093 process.load('FWCore.MessageService.MessageLogger_cfi')
0094 process.load('Configuration.StandardSequences.GeometryRecoDB_cff')
0095 process.load('Configuration.StandardSequences.MagneticField_AutoFromDBCurrent_cff')
0096 process.load('Configuration.StandardSequences.FrontierConditions_GlobalTag_cff')
0097 process.load('Configuration.StandardSequences.SimL1Emulator_cff')
0098 process.load('Configuration.StandardSequences.EndOfProcess_cff')
0099 process.load('Configuration.StandardSequences.FrontierConditions_GlobalTag_cff')
0100 process.load('EventFilter.GEMRawToDigi.muonGEMDigis_cfi')
0101 process.load('L1Trigger.L1TGEM.simGEMDigis_cff')
0102 process.load('EventFilter.L1TRawToDigi.validationEventFilter_cfi')
0103 process.load("CommonTools.UtilAlgos.TFileService_cfi")
0104 
0105 process.maxEvents = cms.untracked.PSet(
0106     input = cms.untracked.int32(options.maxEvents)
0107 )
0108 
0109 # Input source
0110 if (options.streamer) :
0111     process.source = cms.Source(
0112         "NewEventStreamFileReader",
0113         fileNames = cms.untracked.vstring(options.inputFiles),
0114         skipEvents=cms.untracked.uint32(options.skipEvents)
0115     )
0116 else :
0117     process.source = cms.Source(
0118         "PoolSource",
0119         fileNames = cms.untracked.vstring(options.inputFiles),
0120         skipEvents=cms.untracked.uint32(options.skipEvents),
0121         ## this line is needed to run the unpacker on output from AMC13SpyReadout.py
0122         labelRawDataLikeMC = cms.untracked.bool(False)
0123     )
0124 
0125 if (options.json):
0126     import FWCore.PythonUtilities.LumiList as LumiList
0127     process.source.lumisToProcess = LumiList.LumiList(filename = options.json).getVLuminosityBlockRange()
0128 
0129 process.options = cms.untracked.PSet(
0130     SkipEvent = cms.untracked.vstring('ProductNotFound')
0131 )
0132 
0133 # enable debug message logging for our modules
0134 if (options.dumpRaw):
0135     process.MessageLogger.files.infos = cms.untracked.PSet(INFO = cms.untracked.PSet(limit = cms.untracked.int32(0)))
0136 
0137 if (options.debug):
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, '112X_dataRun3_Prompt_v5', '')
0145 ## for the time being the mapping does not work with the data label. Use MC instead
0146 if options.useB904Data:
0147     process.GlobalTag = GlobalTag(process.GlobalTag, 'auto:phase1_2022_realistic', '')
0148 
0149 # dump raw data
0150 process.dumpRaw = cms.EDAnalyzer(
0151     "DumpFEDRawDataProduct",
0152     token = cms.untracked.InputTag(options.unpackerLabel),
0153     feds = cms.untracked.vint32(options.feds),
0154     dumpPayload = cms.untracked.bool(options.dumpRaw)
0155 )
0156 
0157 # optional EDM file
0158 process.output = cms.OutputModule(
0159     "PoolOutputModule",
0160     outputCommands = cms.untracked.vstring("keep *"),
0161     fileName = cms.untracked.string('output_edm.root')
0162 )
0163 
0164 process.muonGEMDigis.InputLabel = options.unpackerLabel
0165 process.simMuonGEMPadDigis.InputCollection = 'muonGEMDigis'
0166 
0167 ## schedule and path definition
0168 process.p1 = cms.Path(process.dumpRaw)
0169 process.p2 = cms.Path(process.muonGEMDigis)
0170 process.p3 = cms.Path(process.simMuonGEMPadDigis * process.simMuonGEMPadDigiClusters)
0171 process.p4 = cms.Path(process.gemRecHits * process.gemSegments)
0172 process.out = cms.EndPath(process.output)
0173 process.endjob_step = cms.EndPath(process.endOfProcess)
0174 
0175 process.schedule = cms.Schedule()
0176 
0177 # enable RAW printout
0178 if options.dumpRaw:
0179     process.schedule.extend([process.p1])
0180 
0181 # always add unpacker
0182 process.schedule.extend([process.p2])
0183 
0184 # triggers
0185 if options.trigger:
0186     process.schedule.extend([process.p3])
0187 
0188 # reconstruct rechits and segments
0189 if options.reconstruct:
0190     process.schedule.extend([process.p4])
0191 
0192 if options.edm:
0193     process.schedule.extend([process.out])
0194 
0195 process.schedule.extend([process.endjob_step])