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 #    -Dropped formation of RAW data from MP7 Buffer txt files.
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('dump',
0027                  False,
0028                  VarParsing.VarParsing.multiplicity.singleton,
0029                  VarParsing.VarParsing.varType.bool,
0030                  "Print RAW data")
0031 options.register('debug',
0032                  False,
0033                  VarParsing.VarParsing.multiplicity.singleton,
0034                  VarParsing.VarParsing.varType.bool,
0035                  "Enable debug data")
0036                  
0037 options.parseArguments()
0038 
0039 if (options.maxEvents == -1):
0040     options.maxEvents = 1
0041 
0042 
0043 process = cms.Process('Raw2DigiuGTEmul')
0044 
0045 # import of standard configurations
0046 process.load('Configuration.StandardSequences.Services_cff')
0047 process.load('FWCore.MessageService.MessageLogger_cfi')
0048 process.load('Configuration.StandardSequences.GeometryRecoDB_cff')
0049 process.load('Configuration.Geometry.GeometryDB_cff')
0050 process.load('Configuration.StandardSequences.MagneticField_38T_cff')
0051 process.load('Configuration.StandardSequences.SimL1Emulator_cff')
0052 process.load('Configuration.StandardSequences.EndOfProcess_cff')
0053 process.load('Configuration.StandardSequences.FrontierConditions_GlobalTag_cff')
0054 
0055 process.maxEvents = cms.untracked.PSet(
0056     input = cms.untracked.int32(options.maxEvents)
0057 )
0058 
0059 
0060 # Input source
0061 process.source = cms.Source("PoolSource",
0062     secondaryFileNames = cms.untracked.vstring(),
0063 #    inputCommands = cms.untracked.vstring("drop BXVector*_*_*_*"),
0064     fileNames = cms.untracked.vstring("file:l1tCalo_Test.root"),
0065     skipEvents = cms.untracked.uint32(options.skipEvents) 
0066 )
0067 
0068 
0069 
0070 # Additional output definition
0071 # TTree output file
0072 process.load("CommonTools.UtilAlgos.TFileService_cfi")
0073 process.TFileService.fileName = cms.string('l1t_histos.root')
0074 
0075 
0076 # enable debug message logging for our modules
0077 
0078 process.MessageLogger.L1TCaloEvents=dict()
0079 process.MessageLogger.L1TGlobalEvents=dict()
0080 
0081 process.MessageLogger.suppressInfo = cms.untracked.vstring('Geometry', 'AfterSource')
0082 
0083 if (options.dump):
0084     process.MessageLogger.files.infos = cms.untracked.PSet(
0085         INFO = cms.untracked.PSet(limit = cms.untracked.int32(0)),
0086         L1TCaloEvents = cms.untracked.PSet(
0087             limit = cms.untracked.int32(10000)
0088         )
0089     )
0090 
0091 if (options.debug):
0092 #    process.MessageLogger.debugModules = cms.untracked.vstring('L1TRawToDigi:caloStage2Digis', 'MP7BufferDumpToRaw:stage2MPRaw', 'MP7BufferDumpToRaw:stage2DemuxRaw')
0093     process.MessageLogger.debugModules = cms.untracked.vstring('*')
0094     process.MessageLogger.cerr.threshold = cms.untracked.string('DEBUG')
0095 
0096 
0097 
0098 # Other statements
0099 from Configuration.AlCa.GlobalTag import GlobalTag
0100 process.GlobalTag = GlobalTag(process.GlobalTag, 'auto:startup', '')
0101 
0102 # print some debug info
0103 print("Job config :")
0104 print("maxEvents     = ", options.maxEvents)
0105 print("skipEvents    = ", options.skipEvents)
0106 print("dump          = ", options.dump)
0107 print("debug         = ", options.debug)
0108 print(" ")
0109 
0110 
0111 # dump raw data
0112 process.dumpRaw = cms.EDAnalyzer( 
0113     "DumpFEDRawDataProduct",
0114     label = cms.untracked.string("rawDataCollector"),
0115     feds = cms.untracked.vint32 ( 1360, 1366, 1404 ),
0116     dumpPayload = cms.untracked.bool ( options.dump )
0117 )
0118 
0119 # raw to digi
0120 process.load('EventFilter.L1TRawToDigi.caloStage2Digis_cfi')
0121 process.caloStage2Digis.InputLabel = cms.InputTag('rawDataCollector')
0122 
0123 process.load('EventFilter.L1TRawToDigi.gtStage2Digis_cfi')
0124 process.gtStage2Digis.InputLabel = cms.InputTag('rawDataCollector')
0125 
0126 
0127 # Setup for Emulation of uGT
0128 process.load('L1Trigger.L1TGlobal.StableParametersConfig_cff')
0129 process.load('L1Trigger.L1TGlobal.TriggerMenuXml_cfi')
0130 process.TriggerMenuXml.TriggerMenuLuminosity = 'startup'
0131 process.TriggerMenuXml.DefXmlFile = 'L1Menu_CaloSliceTest_2015.xml'
0132 
0133 process.load('L1Trigger.L1TGlobal.TriggerMenuConfig_cff')
0134 process.es_prefer_l1GtParameters = cms.ESPrefer('l1t::TriggerMenuXmlProducer','TriggerMenuXml')
0135 
0136 process.emL1uGtFromGtInput = cms.EDProducer("L1TGlobalProducer",
0137     ProduceL1GtObjectMapRecord = cms.bool(False),
0138     AlgorithmTriggersUnmasked = cms.bool(False),
0139     EmulateBxInEvent = cms.int32(1),
0140     L1DataBxInEvent = cms.int32(1),
0141     AlgorithmTriggersUnprescaled = cms.bool(False),
0142     ProduceL1GtDaqRecord = cms.bool(True),
0143     GmtInputTag = cms.InputTag(""),
0144     caloInputTag = cms.InputTag("gtStage2Digis"),
0145     AlternativeNrBxBoardDaq = cms.uint32(0),
0146     BstLengthBytes = cms.int32(-1),
0147     Verbosity = cms.untracked.int32(5)
0148 )
0149 
0150 process.emL1uGtFromDemuxOutput = cms.EDProducer("L1TGlobalProducer",
0151     ProduceL1GtObjectMapRecord = cms.bool(False),
0152     AlgorithmTriggersUnmasked = cms.bool(False),
0153     EmulateBxInEvent = cms.int32(1),
0154     L1DataBxInEvent = cms.int32(1),
0155     AlgorithmTriggersUnprescaled = cms.bool(False),
0156     ProduceL1GtDaqRecord = cms.bool(True),
0157     GmtInputTag = cms.InputTag(""),
0158     caloInputTag = cms.InputTag("caloStage2Digis"),
0159     AlternativeNrBxBoardDaq = cms.uint32(0),
0160     BstLengthBytes = cms.int32(-1),
0161     Verbosity = cms.untracked.int32(5)
0162 )
0163 
0164 
0165 
0166 # object analyser
0167 process.load('L1Trigger.L1TCalorimeter.l1tStage2CaloAnalyzer_cfi')
0168 process.l1tStage2CaloAnalyzer.doText = cms.untracked.bool(options.debug)
0169 process.l1tStage2CaloAnalyzer.towerToken = cms.InputTag("caloStage2Digis")
0170 process.l1tStage2CaloAnalyzer.clusterToken = cms.InputTag("None")
0171 process.l1tStage2CaloAnalyzer.mpEGToken = cms.InputTag("None")
0172 process.l1tStage2CaloAnalyzer.mpTauToken = cms.InputTag("None")
0173 
0174 
0175 # gt analyzer
0176 process.l1tGlobalAnalyzer = cms.EDAnalyzer('L1TGlobalAnalyzer',
0177     doText = cms.untracked.bool(options.debug),
0178     dmxEGToken = cms.InputTag("None"),
0179     dmxTauToken = cms.InputTag("None"),
0180     dmxJetToken = cms.InputTag("caloStage2Digis"),
0181     dmxEtSumToken = cms.InputTag("caloStage2Digis"),
0182     egToken = cms.InputTag("None"),
0183     tauToken = cms.InputTag("None"),
0184     jetToken = cms.InputTag("None"),
0185     etSumToken = cms.InputTag("None"),
0186     gtAlgToken = cms.InputTag("gtStage2Digis"),
0187     emulDxAlgToken = cms.InputTag("emL1uGtFromDemuxOutput"),
0188     emulGtAlgToken = cms.InputTag("None")
0189 )
0190 
0191 
0192 # Path and EndPath definitions
0193 process.path = cms.Path(
0194      process.dumpRaw
0195     +process.caloStage2Digis
0196     +process.gtStage2Digis
0197 #    +process.emL1uGtFromGtInput
0198     +process.emL1uGtFromDemuxOutput
0199     +process.l1tStage2CaloAnalyzer
0200     +process.l1tGlobalAnalyzer
0201 )
0202 
0203 
0204