Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2022-07-22 22:43:49

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('useB904GE11Long',
0078                  False,
0079                  VarParsing.VarParsing.multiplicity.singleton,
0080                  VarParsing.VarParsing.varType.bool,
0081                  "Set to True when using data from GE1/1 Long super chamber in B904.")
0082 options.register('useB904GE11Short',
0083                  False,
0084                  VarParsing.VarParsing.multiplicity.singleton,
0085                  VarParsing.VarParsing.varType.bool,
0086                  "Set to True when using data from GE1/1 Short super chamber in B904.")
0087 
0088 options.parseArguments()
0089 
0090 
0091 
0092 from Configuration.Eras.Era_Run3_cff import Run3
0093 process = cms.Process('RECO',Run3)
0094 
0095 process.load('Configuration.StandardSequences.L1Reco_cff')
0096 process.load('Configuration.StandardSequences.Reconstruction_cff')
0097 process.load('Configuration.StandardSequences.RecoSim_cff')
0098 process.load('Configuration.StandardSequences.Services_cff')
0099 process.load('FWCore.MessageService.MessageLogger_cfi')
0100 process.load('Configuration.StandardSequences.GeometryRecoDB_cff')
0101 process.load('Configuration.StandardSequences.MagneticField_AutoFromDBCurrent_cff')
0102 process.load('Configuration.StandardSequences.FrontierConditions_GlobalTag_cff')
0103 process.load('Configuration.StandardSequences.SimL1Emulator_cff')
0104 process.load('Configuration.StandardSequences.EndOfProcess_cff')
0105 process.load('Configuration.StandardSequences.FrontierConditions_GlobalTag_cff')
0106 process.load('EventFilter.GEMRawToDigi.muonGEMDigis_cfi')
0107 process.load('L1Trigger.L1TGEM.simGEMDigis_cff')
0108 process.load('EventFilter.L1TRawToDigi.validationEventFilter_cfi')
0109 process.load("CommonTools.UtilAlgos.TFileService_cfi")
0110 
0111 process.maxEvents = cms.untracked.PSet(
0112     input = cms.untracked.int32(options.maxEvents)
0113 )
0114 
0115 # Input source
0116 if (options.streamer) :
0117     process.source = cms.Source(
0118         "NewEventStreamFileReader",
0119         fileNames = cms.untracked.vstring(options.inputFiles),
0120         skipEvents=cms.untracked.uint32(options.skipEvents)
0121     )
0122 else :
0123     process.source = cms.Source(
0124         "PoolSource",
0125         fileNames = cms.untracked.vstring(options.inputFiles),
0126         skipEvents=cms.untracked.uint32(options.skipEvents),
0127         ## this line is needed to run the unpacker on output from AMC13SpyReadout.py
0128         labelRawDataLikeMC = cms.untracked.bool(False)
0129     )
0130 
0131 if (options.json):
0132     import FWCore.PythonUtilities.LumiList as LumiList
0133     process.source.lumisToProcess = LumiList.LumiList(filename = options.json).getVLuminosityBlockRange()
0134 
0135 process.options = cms.untracked.PSet(
0136     SkipEvent = cms.untracked.vstring('ProductNotFound')
0137 )
0138 
0139 # enable debug message logging for our modules
0140 if (options.dumpRaw):
0141     process.MessageLogger.files.infos = cms.untracked.PSet(INFO = cms.untracked.PSet(limit = cms.untracked.int32(0)))
0142 
0143 if (options.debug):
0144     process.MessageLogger.debugModules = cms.untracked.vstring('*')
0145     process.MessageLogger.cerr.threshold = cms.untracked.string('DEBUG')
0146 
0147 
0148 # Other statements
0149 from Configuration.AlCa.GlobalTag import GlobalTag
0150 process.GlobalTag = GlobalTag(process.GlobalTag, '112X_dataRun3_Prompt_v5', '')
0151 
0152 # Mapping for b904 GEM-CSC integration stand
0153 if (options.useB904GE11Long or options.useB904GE11Short):
0154     process.GlobalTag.toGet = cms.VPSet(
0155             cms.PSet(record = cms.string("GEMChMapRcd"),
0156                      tag = cms.string("GEMeMap_GE11_b904_v1"),
0157                      connect = cms.string("frontier://FrontierProd/CMS_CONDITIONS")
0158                     )
0159     )
0160     process.muonGEMDigis.useDBEMap = True
0161 
0162 # dump raw data
0163 process.dumpRaw = cms.EDAnalyzer(
0164     "DumpFEDRawDataProduct",
0165     token = cms.untracked.InputTag(options.unpackerLabel),
0166     feds = cms.untracked.vint32(options.feds),
0167     dumpPayload = cms.untracked.bool(options.dumpRaw)
0168 )
0169 
0170 # optional EDM file
0171 process.output = cms.OutputModule(
0172     "PoolOutputModule",
0173     outputCommands = cms.untracked.vstring("keep *"),
0174     fileName = cms.untracked.string('output_edm.root')
0175 )
0176 
0177 process.muonGEMDigis.InputLabel = options.unpackerLabel
0178 process.muonGEMDigis.fedIdStart = options.feds[0]
0179 process.muonGEMDigis.fedIdEnd = options.feds[-1]
0180 process.simMuonGEMPadDigis.InputCollection = 'muonGEMDigis'
0181 
0182 ## schedule and path definition
0183 process.p1 = cms.Path(process.dumpRaw)
0184 process.p2 = cms.Path(process.muonGEMDigis)
0185 process.p3 = cms.Path(process.simMuonGEMPadDigis * process.simMuonGEMPadDigiClusters)
0186 process.p4 = cms.Path(process.gemRecHits * process.gemSegments)
0187 process.out = cms.EndPath(process.output)
0188 process.endjob_step = cms.EndPath(process.endOfProcess)
0189 
0190 process.schedule = cms.Schedule()
0191 
0192 # enable RAW printout
0193 if options.dumpRaw:
0194     process.schedule.extend([process.p1])
0195 
0196 # always add unpacker
0197 process.schedule.extend([process.p2])
0198 
0199 # triggers
0200 if options.trigger:
0201     process.schedule.extend([process.p3])
0202 
0203 # reconstruct rechits and segments
0204 if options.reconstruct:
0205     process.schedule.extend([process.p4])
0206 
0207 if options.edm:
0208     process.schedule.extend([process.out])
0209 
0210 process.schedule.extend([process.endjob_step])