Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-11-27 03:17:55

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