Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:20:37

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 #
0008 #  This was adapted from unpackBuffers-CaloStage2.py.
0009 #    -Unpacking of the uGT raw data has been added
0010 #    -uGT Emulation starting with the Demux output and/or the uGT input 
0011 #    -Analysis for uGT objects using L1TGlobalAnalyzer
0012 #
0013 #   Brian Winer, March 16, 2015
0014 #  
0015 import FWCore.ParameterSet.Config as cms
0016 
0017 
0018 # options
0019 import FWCore.ParameterSet.VarParsing as VarParsing
0020 options = VarParsing.VarParsing('analysis')
0021 options.register('skipEvents',
0022                  0,
0023                  VarParsing.VarParsing.multiplicity.singleton,
0024                  VarParsing.VarParsing.varType.int,
0025                  "Number of events to skip")
0026 options.register('newXML',
0027                  False,
0028                  VarParsing.VarParsing.multiplicity.singleton,
0029                  VarParsing.VarParsing.varType.bool,
0030                  "New XML Grammar")      
0031                  
0032 options.parseArguments()
0033 
0034 #if (options.maxEvents == -1):
0035 #    options.maxEvents = 1
0036 
0037 
0038 process = cms.Process('uGTEmulation')
0039 
0040 # import of standard configurations
0041 process.load('Configuration.StandardSequences.Services_cff')
0042 process.load('FWCore.MessageService.MessageLogger_cfi')
0043 process.load('Configuration.StandardSequences.GeometryRecoDB_cff')
0044 process.load('Configuration.Geometry.GeometryDB_cff')
0045 process.load('Configuration.StandardSequences.MagneticField_38T_cff')
0046 process.load('Configuration.StandardSequences.SimL1Emulator_cff')
0047 process.load('Configuration.StandardSequences.EndOfProcess_cff')
0048 process.load('Configuration.StandardSequences.FrontierConditions_GlobalTag_cff')
0049 
0050 process.maxEvents = cms.untracked.PSet(
0051     input = cms.untracked.int32(options.maxEvents)
0052 )
0053 
0054 # Input source
0055 process.source = cms.Source("PoolSource",
0056     secondaryFileNames = cms.untracked.vstring(),
0057     skipEvents=cms.untracked.uint32(options.skipEvents),
0058     fileNames = cms.untracked.vstring(options.inputFiles) 
0059 )
0060 
0061 
0062 
0063 
0064 # Additional output definition
0065 # TTree output file
0066 process.load("CommonTools.UtilAlgos.TFileService_cfi")
0067 process.TFileService.fileName = cms.string('l1tCalo_2016_histos.root')
0068 
0069 
0070 # enable debug message logging for our modules
0071 #
0072 #
0073 #
0074 process.MessageLogger.debugModules = cms.untracked.vstring('simGlobalStage2Digis')
0075 process.MessageLogger.cerr.threshold = cms.untracked.string('DEBUG')
0076 
0077 process.MessageLogger.suppressInfo = cms.untracked.vstring('Geometry', 'AfterSource')
0078 
0079 
0080 # Other statements
0081 from Configuration.AlCa.GlobalTag import GlobalTag
0082 process.GlobalTag = GlobalTag(process.GlobalTag, 'auto:startup', '')
0083 
0084 
0085 ## Load our L1 menu
0086 process.load('L1Trigger.L1TGlobal.StableParametersConfig_cff')
0087 
0088 process.load('L1Trigger.L1TGlobal.TriggerMenuXml_cfi')
0089 process.TriggerMenuXml.TriggerMenuLuminosity = 'startup'
0090 #process.TriggerMenuXml.DefXmlFile = 'L1_Example_Menu_2013.xml'
0091 #process.TriggerMenuXml.DefXmlFile = 'L1Menu_Reference_2014.xml'
0092 process.TriggerMenuXml.DefXmlFile = 'L1Menu_Collisions2015_25nsStage1_v6_uGT_v2a.xml'
0093 #process.TriggerMenuXml.DefXmlFile = 'L1Menu_Collisions2015_25nsStage1_v6_uGT_v3.xml'
0094 process.TriggerMenuXml.newGrammar = cms.bool(options.newXML)
0095 if(options.newXML):
0096    print("Using new XML Grammar ")
0097    process.TriggerMenuXml.DefXmlFile = 'L1Menu_CollisionsHeavyIons2015_v4_uGT_v2.xml'
0098    #process.TriggerMenuXml.DefXmlFile = 'MuonTest.xml'
0099 
0100 
0101 process.load('L1Trigger.L1TGlobal.TriggerMenuConfig_cff')
0102 process.es_prefer_l1GtParameters = cms.ESPrefer('l1t::TriggerMenuXmlProducer','TriggerMenuXml')
0103 
0104 ## Run the Stage 2 uGT emulator
0105 process.load('L1Trigger.L1TGlobal.simGlobalStage2Digis_cff')
0106 process.simGlobalStage2Digis.caloInputTag = cms.InputTag("gtStage2Digis","GT")
0107 process.simGlobalStage2Digis.GmtInputTag = cms.InputTag("gtStage2Digis","GT")
0108 process.simGlobalStage2Digis.PrescaleSet = cms.uint32(1)
0109 process.simGlobalStage2Digis.Verbosity = cms.untracked.int32(0)
0110 
0111 
0112 
0113 # gt analyzer
0114 process.l1tGlobalAnalyzer = cms.EDAnalyzer('L1TGlobalAnalyzer',
0115     doText = cms.untracked.bool(False),
0116     dmxEGToken = cms.InputTag("None"),
0117     dmxTauToken = cms.InputTag("None"),
0118     dmxJetToken = cms.InputTag("None"),
0119     dmxEtSumToken = cms.InputTag("None"),
0120     muToken = cms.InputTag("gtStage2Digis","GT"),
0121     egToken = cms.InputTag("gtStage2Digis","GT"),
0122     tauToken = cms.InputTag("gtStage2Digis","GT"),
0123     jetToken = cms.InputTag("gtStage2Digis","GT"),
0124     etSumToken = cms.InputTag("gtStage2Digis","GT"),
0125     gtAlgToken = cms.InputTag("gtStage2Digis","GT"),
0126     emulDxAlgToken = cms.InputTag("None"),
0127     emulGtAlgToken = cms.InputTag("simGlobalStage2Digis")
0128 )
0129 
0130 
0131 # dump records
0132 process.dumpGTRecord = cms.EDAnalyzer("l1t::GtRecordDump",
0133         egInputTag    = cms.InputTag("gtStage2Digis","GT"),
0134         muInputTag    = cms.InputTag("gtStage2Digis","GT"),
0135         tauInputTag   = cms.InputTag("gtStage2Digis","GT"),
0136         jetInputTag   = cms.InputTag("gtStage2Digis","GT"),
0137         etsumInputTag = cms.InputTag("gtStage2Digis","GT"),
0138         uGtAlgInputTag = cms.InputTag("gtStage2Digis","GT"),
0139         uGtExtInputTag = cms.InputTag("gtStage2Digis","GT"),
0140         bxOffset       = cms.int32(0),
0141         minBx          = cms.int32(0),
0142         maxBx          = cms.int32(0),
0143         minBxVec       = cms.int32(0),
0144         maxBxVec       = cms.int32(0),      
0145         dumpGTRecord   = cms.bool(False),
0146                 dumpTrigResults= cms.bool(True),
0147         dumpVectors    = cms.bool(False),
0148         tvFileName     = cms.string( "TestVector_Data.txt" ),
0149                 psFileName     = cms.string( "prescale_L1TGlobal.csv" ),
0150                 psColumn       = cms.int32(1)
0151          )
0152          
0153 
0154 
0155 
0156 
0157 # Path and EndPath definitions
0158 process.path = cms.Path(
0159     process.simGlobalStage2Digis
0160     +process.l1tGlobalAnalyzer
0161     +process.dumpGTRecord
0162 )
0163 
0164