Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-03-25 10:58:18

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('dump',
0018                  False,
0019                  VarParsing.VarParsing.multiplicity.singleton,
0020                  VarParsing.VarParsing.varType.bool,
0021                  "Print RAW data")
0022 options.register('doLayer1',
0023                  False,
0024                  VarParsing.VarParsing.multiplicity.singleton,
0025                  VarParsing.VarParsing.varType.bool,
0026                  "Run layer 1 module")
0027 options.register('doLayer2',
0028                  True,
0029                  VarParsing.VarParsing.multiplicity.singleton,
0030                  VarParsing.VarParsing.varType.bool,
0031                  "Run layer 2 module")
0032 options.register('selMPBx',
0033                  0,
0034                  VarParsing.VarParsing.multiplicity.singleton,
0035                  VarParsing.VarParsing.varType.int,
0036                  "Select MP readout Bx")
0037 options.register('selDemuxBx',
0038                  0,
0039                  VarParsing.VarParsing.multiplicity.singleton,
0040                  VarParsing.VarParsing.varType.int,
0041                  "Select Demux readout Bx")
0042 options.register('selAllBx',
0043                  False,
0044                  VarParsing.VarParsing.multiplicity.singleton,
0045                  VarParsing.VarParsing.varType.bool,
0046                  "Run over all Bx in readout for MP and demux")
0047 options.register('evtDisp',
0048                  False,
0049                  VarParsing.VarParsing.multiplicity.singleton,
0050                  VarParsing.VarParsing.varType.bool,
0051                  'Produce histos for individual events')
0052 
0053                  
0054 options.parseArguments()
0055 
0056 
0057 process = cms.Process('L1Emulator')
0058 
0059 # import of standard configurations
0060 process.load('Configuration.StandardSequences.Services_cff')
0061 process.load('FWCore.MessageService.MessageLogger_cfi')
0062 process.load('Configuration.StandardSequences.GeometryRecoDB_cff')
0063 process.load('Configuration.Geometry.GeometryDB_cff')
0064 process.load('Configuration.StandardSequences.MagneticField_38T_cff')
0065 process.load('Configuration.StandardSequences.RawToDigi_cff')
0066 process.load('Configuration.StandardSequences.SimL1Emulator_cff')
0067 process.load('Configuration.StandardSequences.EndOfProcess_cff')
0068 process.load('Configuration.StandardSequences.FrontierConditions_GlobalTag_cff')
0069 
0070 process.maxEvents = cms.untracked.PSet(
0071     input = cms.untracked.int32(options.maxEvents)
0072 )
0073 
0074 # Input source
0075 #inFile = 'file:l1tCalo_2016_EDM.root'
0076 process.source = cms.Source("PoolSource",
0077     fileNames=cms.untracked.vstring(options.inputFiles),
0078     skipEvents=cms.untracked.uint32(options.skipEvents)
0079 )
0080 
0081 process.options = cms.untracked.PSet(
0082     SkipEvent = cms.untracked.vstring('ProductNotFound')
0083 )
0084 
0085 
0086 # Output definition
0087 process.output = cms.OutputModule(
0088     "PoolOutputModule",
0089     outputCommands = cms.untracked.vstring("keep *"),
0090     fileName = cms.untracked.string('l1tCalo_2016_simEDM.root')
0091 )
0092 
0093 # Additional output definition
0094 # TTree output file
0095 process.load("CommonTools.UtilAlgos.TFileService_cfi")
0096 process.TFileService.fileName = cms.string('l1tCalo_2016_simHistos.root')
0097 
0098 
0099 # enable debug message logging for our modules
0100 process.MessageLogger = cms.Service(
0101     "MessageLogger",
0102     threshold  = cms.untracked.string('DEBUG'),
0103     categories = cms.untracked.vstring('L1T'),
0104     debugModules = cms.untracked.vstring('*')
0105 #        'mp7BufferDumpToRaw',
0106 #        'l1tDigis',
0107 #        'caloStage1Digis'
0108 #    )
0109 )
0110 
0111 
0112 # Other statements
0113 from Configuration.AlCa.GlobalTag import GlobalTag
0114 process.GlobalTag = GlobalTag(process.GlobalTag, 'auto:startup', '')
0115 
0116 
0117 # emulator
0118 process.load('L1Trigger.L1TCalorimeter.simCaloStage2Layer1Digis_cfi')
0119 process.load('L1Trigger.L1TCalorimeter.simCaloStage2Digis_cfi')
0120 process.simCaloStage2Digis.useStaticConfig = True
0121 process.simCaloStage2Layer1Digis.ecalToken = cms.InputTag("ecalDigis:EcalTriggerPrimitives")
0122 process.simCaloStage2Layer1Digis.hcalToken = cms.InputTag("hcalDigis")
0123 
0124 # emulator ES
0125 process.load('L1Trigger.L1TCalorimeter.caloParams_2019_v1_0_cfi')
0126 
0127 # histograms
0128 process.load('L1Trigger.L1TCalorimeter.l1tStage2CaloAnalyzer_cfi')
0129 process.l1tStage2CaloAnalyzer.doEvtDisp = options.evtDisp
0130 process.l1tStage2CaloAnalyzer.mpBx = options.selMPBx
0131 process.l1tStage2CaloAnalyzer.dmxBx = options.selDemuxBx
0132 process.l1tStage2CaloAnalyzer.allBx = options.selAllBx
0133 process.l1tStage2CaloAnalyzer.towerToken = cms.InputTag("simCaloStage2Digis", "MP")
0134 process.l1tStage2CaloAnalyzer.clusterToken = cms.InputTag("None")
0135 process.l1tStage2CaloAnalyzer.mpEGToken = cms.InputTag("simCaloStage2Digis", "MP")
0136 process.l1tStage2CaloAnalyzer.mpTauToken = cms.InputTag("simCaloStage2Digis", "MP")
0137 process.l1tStage2CaloAnalyzer.mpJetToken = cms.InputTag("simCaloStage2Digis", "MP")
0138 process.l1tStage2CaloAnalyzer.mpEtSumToken = cms.InputTag("simCaloStage2Digis", "MP")
0139 process.l1tStage2CaloAnalyzer.egToken = cms.InputTag("simCaloStage2Digis")
0140 process.l1tStage2CaloAnalyzer.tauToken = cms.InputTag("simCaloStage2Digis")
0141 process.l1tStage2CaloAnalyzer.jetToken = cms.InputTag("simCaloStage2Digis")
0142 process.l1tStage2CaloAnalyzer.etSumToken = cms.InputTag("simCaloStage2Digis")
0143 
0144 import L1Trigger.L1TCalorimeter.l1tStage2CaloAnalyzer_cfi
0145 process.l1tCaloStage2HwHistos =  L1Trigger.L1TCalorimeter.l1tStage2CaloAnalyzer_cfi.l1tStage2CaloAnalyzer.clone()
0146 process.l1tStage2CaloAnalyzer.doEvtDisp = options.evtDisp
0147 process.l1tStage2CaloAnalyzer.mpBx = options.selMPBx
0148 process.l1tStage2CaloAnalyzer.dmxBx = options.selDemuxBx
0149 process.l1tStage2CaloAnalyzer.allBx = options.selAllBx
0150 process.l1tCaloStage2HwHistos.towerToken = cms.InputTag("caloStage2Digis","CaloTower")
0151 process.l1tCaloStage2HwHistos.clusterToken = cms.InputTag("None")
0152 process.l1tCaloStage2HwHistos.mpEGToken = cms.InputTag("caloStage2Digis", "MP")
0153 process.l1tCaloStage2HwHistos.mpTauToken = cms.InputTag("caloStage2Digis","MP")
0154 process.l1tCaloStage2HwHistos.mpJetToken = cms.InputTag("caloStage2Digis", "MP")
0155 process.l1tCaloStage2HwHistos.mpEtSumToken = cms.InputTag("caloStage2Digis", "MP")
0156 process.l1tCaloStage2HwHistos.egToken = cms.InputTag("caloStage2Digis","EGamma")
0157 process.l1tCaloStage2HwHistos.tauToken = cms.InputTag("caloStage2Digis","Tau")
0158 process.l1tCaloStage2HwHistos.jetToken = cms.InputTag("caloStage2Digis","Jet")
0159 process.l1tCaloStage2HwHistos.etSumToken = cms.InputTag("caloStage2Digis","EtSum")
0160 
0161 # Path and EndPath definitions
0162 process.path = cms.Path(
0163     process.ecalDigis
0164     +process.hcalDigis
0165     +process.simCaloStage2Layer1Digis
0166     +process.simCaloStage2Digis
0167     +process.l1tStage2CaloAnalyzer
0168     +process.l1tCaloStage2HwHistos
0169 )
0170 
0171 if (not options.doLayer1):
0172     process.path.remove(process.ecalDigis)
0173     process.path.remove(process.hcalDigis)
0174     process.path.remove(process.simCaloStage2Layer1Digis)
0175     process.simCaloStage2Digis.towerToken = cms.InputTag("caloStage2Digis","CaloTower")
0176 
0177 if (not options.doLayer2):
0178     process.path.remove(process.simCaloStage2Digis)
0179 
0180 
0181 #if (not options.doMP):
0182 #    process.path.remove(process.stage2MPRaw)
0183 
0184 #if (not options.-doDemux):
0185 #    process.path.remove(process.stage2DemuxRaw)
0186 
0187 process.out = cms.EndPath(
0188     process.output
0189 )
0190