Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2022-04-01 23:54:04

0001 
0002 import FWCore.ParameterSet.Config as cms
0003 import FWCore.Utilities.FileUtils as FileUtils
0004 import FWCore.ParameterSet.VarParsing as VarParsing
0005 
0006 
0007 # PART 1 : PARSE ARGUMENTS
0008 
0009 options = VarParsing.VarParsing ('analysis')
0010 options.register ('format',
0011                   'EMP', # default value
0012                   VarParsing.VarParsing.multiplicity.singleton,
0013                   VarParsing.VarParsing.varType.string,
0014                   "File format (APx, EMP or X20)")
0015 options.parseArguments()
0016 
0017 inputFiles = []
0018 for filePath in options.inputFiles:
0019     if filePath.endswith(".root"):
0020         inputFiles.append(filePath)
0021     else:
0022         inputFiles += FileUtils.loadListFromFile(filePath)
0023 
0024 
0025 # PART 2: SETUP MAIN CMSSW PROCESS 
0026 
0027 process = cms.Process("GTTValidation")
0028 
0029 process.load('Configuration.Geometry.GeometryExtended2026D49Reco_cff')
0030 process.load('Configuration.Geometry.GeometryExtended2026D49_cff')
0031 process.load('Configuration.StandardSequences.MagneticField_cff')
0032 process.load('Configuration.StandardSequences.FrontierConditions_GlobalTag_cff')
0033 from Configuration.AlCa.GlobalTag import GlobalTag
0034 process.GlobalTag = GlobalTag(process.GlobalTag, 'auto:upgradePLS3', '')
0035 process.load("FWCore.MessageLogger.MessageLogger_cfi")
0036 
0037 process.source = cms.Source("PoolSource", fileNames = cms.untracked.vstring(inputFiles) )
0038 process.maxEvents = cms.untracked.PSet( input = cms.untracked.int32(options.maxEvents) )
0039 
0040 process.load("L1Trigger.TrackFindingTracklet.L1HybridEmulationTracks_cff")
0041 process.load('L1Trigger.DemonstratorTools.GTTFileReader_cff')
0042 process.GTTFileReader.files = cms.vstring("test/gtt/example_vertex_apx.txt")
0043 process.GTTFileReader.format = cms.untracked.string(options.format)
0044 
0045 process.MessageLogger.cerr.FwkReport.reportEvery = 1
0046 process.Timing = cms.Service("Timing", summaryOnly = cms.untracked.bool(True))
0047 
0048 process.p = cms.Path(process.L1HybridTracks * process.GTTFileReader) # vertex emulator & FW-emulator comparsion module need to be added here