5 The parameters can be changed by adding commandline arguments of the form
8 runGlobalFakeInputProducer.py nevents=-1
10 The latter can be used to change parameters in crab.
22 if len(sys.argv) > 1
and sys.argv[1].endswith(
'.py'):
24 if len(sys.argv) == 2
and ':' in sys.argv[1]:
30 (k, v) =
map(str.strip, arg.split(
'='))
31 if k
not in globals():
32 raise "Unknown argument '%s'!" % (k,)
33 if type(globals()[k]) == bool:
34 globals()[k] = v.lower()
in (
'y',
'yes',
'true',
't',
'1')
35 elif type(globals()[k]) == int:
40 neventsPerJob = nevents/njob
41 skip = job * neventsPerJob
45 neventsPerJob = neventsPerJob+4
47 import FWCore.ParameterSet.Config
as cms
49 process = cms.Process(
'L1TEMULATION')
51 process.load(
'Configuration.StandardSequences.Services_cff')
52 process.load(
'FWCore.MessageService.MessageLogger_cfi')
53 process.load(
'Configuration/StandardSequences/FrontierConditions_GlobalTag_cff')
59 process.load(
'FWCore.MessageService.MessageLogger_cfi')
63 process.load(
'L1Trigger/L1TGlobal/debug_messages_cfi')
64 process.MessageLogger.l1t_debug.l1t.limit = cms.untracked.int32(100000)
66 process.maxEvents = cms.untracked.PSet(
67 input = cms.untracked.int32(neventsPerJob)
71 process.source = cms.Source(
"PoolSource",
72 secondaryFileNames = cms.untracked.vstring(),
73 fileNames = cms.untracked.vstring(
74 "root://cmsxrootd-site.fnal.gov//store/relval/CMSSW_7_5_0_pre1/RelValTTbar_13/GEN-SIM-DIGI-RAW-HLTDEBUG/PU50ns_MCRUN2_74_V6-v1/00000/06801062-95EA-E411-BAA4-002618943832.root",
75 "root://cmsxrootd-site.fnal.gov//store/relval/CMSSW_7_5_0_pre1/RelValTTbar_13/GEN-SIM-DIGI-RAW-HLTDEBUG/PU50ns_MCRUN2_74_V6-v1/00000/069BD085-9BEA-E411-B063-002618943985.root",
76 "root://cmsxrootd-site.fnal.gov//store/relval/CMSSW_7_5_0_pre1/RelValTTbar_13/GEN-SIM-DIGI-RAW-HLTDEBUG/PU50ns_MCRUN2_74_V6-v1/00000/0EABD22E-97EA-E411-9187-0025905A6068.root",
77 "root://cmsxrootd-site.fnal.gov//store/relval/CMSSW_7_5_0_pre1/RelValTTbar_13/GEN-SIM-DIGI-RAW-HLTDEBUG/PU50ns_MCRUN2_74_V6-v1/00000/10E5C59E-9DEA-E411-B378-00261894385D.root",
78 "root://cmsxrootd-site.fnal.gov//store/relval/CMSSW_7_5_0_pre1/RelValTTbar_13/GEN-SIM-DIGI-RAW-HLTDEBUG/PU50ns_MCRUN2_74_V6-v1/00000/14C238D9-96EA-E411-B343-00261894387E.root",
79 "root://cmsxrootd-site.fnal.gov//store/relval/CMSSW_7_5_0_pre1/RelValTTbar_13/GEN-SIM-DIGI-RAW-HLTDEBUG/PU50ns_MCRUN2_74_V6-v1/00000/2634383A-94EA-E411-B274-002590596486.root",
80 "root://cmsxrootd-site.fnal.gov//store/relval/CMSSW_7_5_0_pre1/RelValTTbar_13/GEN-SIM-DIGI-RAW-HLTDEBUG/PU50ns_MCRUN2_74_V6-v1/00000/36F53C7D-99EA-E411-995F-0026189437EB.root",
81 "root://cmsxrootd-site.fnal.gov//store/relval/CMSSW_7_5_0_pre1/RelValTTbar_13/GEN-SIM-DIGI-RAW-HLTDEBUG/PU50ns_MCRUN2_74_V6-v1/00000/3EC53EC3-A1EA-E411-A30F-002618943826.root",
82 "root://cmsxrootd-site.fnal.gov//store/relval/CMSSW_7_5_0_pre1/RelValTTbar_13/GEN-SIM-DIGI-RAW-HLTDEBUG/PU50ns_MCRUN2_74_V6-v1/00000/42B2E0FF-95EA-E411-9743-0025905B860C.root",
83 "root://cmsxrootd-site.fnal.gov//store/relval/CMSSW_7_5_0_pre1/RelValTTbar_13/GEN-SIM-DIGI-RAW-HLTDEBUG/PU50ns_MCRUN2_74_V6-v1/00000/444664B9-95EA-E411-844B-00261894391B.root",
84 "root://cmsxrootd-site.fnal.gov//store/relval/CMSSW_7_5_0_pre1/RelValTTbar_13/GEN-SIM-DIGI-RAW-HLTDEBUG/PU50ns_MCRUN2_74_V6-v1/00000/48D2AF08-98EA-E411-B556-002618943869.root",
85 "root://cmsxrootd-site.fnal.gov//store/relval/CMSSW_7_5_0_pre1/RelValTTbar_13/GEN-SIM-DIGI-RAW-HLTDEBUG/PU50ns_MCRUN2_74_V6-v1/00000/4A5FFFC2-95EA-E411-B62F-0025905B858C.root",
86 "root://cmsxrootd-site.fnal.gov//store/relval/CMSSW_7_5_0_pre1/RelValTTbar_13/GEN-SIM-DIGI-RAW-HLTDEBUG/PU50ns_MCRUN2_74_V6-v1/00000/5419CE7B-9AEA-E411-AE7C-002618943923.root",
87 "root://cmsxrootd-site.fnal.gov//store/relval/CMSSW_7_5_0_pre1/RelValTTbar_13/GEN-SIM-DIGI-RAW-HLTDEBUG/PU50ns_MCRUN2_74_V6-v1/00000/583FA9B9-98EA-E411-B867-0025905A7786.root",
88 "root://cmsxrootd-site.fnal.gov//store/relval/CMSSW_7_5_0_pre1/RelValTTbar_13/GEN-SIM-DIGI-RAW-HLTDEBUG/PU50ns_MCRUN2_74_V6-v1/00000/60CD47B5-95EA-E411-9469-00261894382D.root",
89 "root://cmsxrootd-site.fnal.gov//store/relval/CMSSW_7_5_0_pre1/RelValTTbar_13/GEN-SIM-DIGI-RAW-HLTDEBUG/PU50ns_MCRUN2_74_V6-v1/00000/647E2B80-A0EA-E411-80CB-002618943950.root",
90 "root://cmsxrootd-site.fnal.gov//store/relval/CMSSW_7_5_0_pre1/RelValTTbar_13/GEN-SIM-DIGI-RAW-HLTDEBUG/PU50ns_MCRUN2_74_V6-v1/00000/78A02D9A-94EA-E411-8625-0025905A6082.root",
91 "root://cmsxrootd-site.fnal.gov//store/relval/CMSSW_7_5_0_pre1/RelValTTbar_13/GEN-SIM-DIGI-RAW-HLTDEBUG/PU50ns_MCRUN2_74_V6-v1/00000/88637A5A-A0EA-E411-916B-0025905A6094.root",
92 "root://cmsxrootd-site.fnal.gov//store/relval/CMSSW_7_5_0_pre1/RelValTTbar_13/GEN-SIM-DIGI-RAW-HLTDEBUG/PU50ns_MCRUN2_74_V6-v1/00000/8E93F5C6-A0EA-E411-A4ED-0025905A6126.root",
93 "root://cmsxrootd-site.fnal.gov//store/relval/CMSSW_7_5_0_pre1/RelValTTbar_13/GEN-SIM-DIGI-RAW-HLTDEBUG/PU50ns_MCRUN2_74_V6-v1/00000/908AF505-96EA-E411-9C1D-003048FFD756.root",
95 skipEvents = cms.untracked.uint32(skip)
98 process.output =cms.OutputModule(
"PoolOutputModule",
99 outputCommands = cms.untracked.vstring(
'keep *'),
100 fileName = cms.untracked.string(
'testGlobalMCInputProducer_'+`job`+
'.root')
103 process.options = cms.untracked.PSet()
107 process.GlobalTag =
GlobalTag(process.GlobalTag,
'auto:upgradePLS1',
'')
112 process.dumpGT = cms.EDAnalyzer(
"l1t::GtInputDump",
113 egInputTag = cms.InputTag(
"gtInput"),
114 muInputTag = cms.InputTag(
"gtInput"),
115 tauInputTag = cms.InputTag(
"gtInput"),
116 jetInputTag = cms.InputTag(
"gtInput"),
117 etsumInputTag = cms.InputTag(
"gtInput"),
118 minBx = cms.int32(0),
121 process.dumpED = cms.EDAnalyzer(
"EventContentAnalyzer")
122 process.dumpES = cms.EDAnalyzer(
"PrintEventSetupContent")
124 process.mcL1GTinput = cms.EDProducer(
"l1t::GenToInputProducer",
125 bxFirst = cms.int32(-2),
126 bxLast = cms.int32(2),
127 maxMuCand = cms.int32(8),
128 maxJetCand = cms.int32(12),
129 maxEGCand = cms.int32(12),
130 maxTauCand = cms.int32(8),
131 jetEtThreshold = cms.double(1),
132 tauEtThreshold = cms.double(1),
133 egEtThreshold = cms.double(1),
134 muEtThreshold = cms.double(1),
135 emptyBxTrailer = cms.int32(5),
136 emptyBxEvt = cms.int32(neventsPerJob)
139 process.mcL1GTinput.maxMuCand = cms.int32(8)
140 process.mcL1GTinput.maxJetCand = cms.int32(12)
141 process.mcL1GTinput.maxEGCand = cms.int32(12)
142 process.mcL1GTinput.maxTauCand = cms.int32(8)
145 process.fakeL1GTinput = cms.EDProducer(
"l1t::FakeInputProducer",
148 egParams = cms.untracked.PSet(
149 egBx = cms.untracked.vint32(-2, -1, 0, 0, 1, 2),
150 egHwPt = cms.untracked.vint32(10, 20, 30, 61, 40, 50),
151 egHwPhi = cms.untracked.vint32(11, 21, 31, 61, 41, 51),
152 egHwEta = cms.untracked.vint32(12, 22, 32, 62, 42, 52),
153 egIso = cms.untracked.vint32( 0, 0, 1, 1, 0, 0)
156 muParams = cms.untracked.PSet(
157 muBx = cms.untracked.vint32(0, -1, 0, 0, 1, 2),
158 muHwPt = cms.untracked.vint32(5, 20, 30, 61, 40, 50),
159 muHwPhi = cms.untracked.vint32(11, 21, 31, 61, 41, 51),
160 muHwEta = cms.untracked.vint32(12, 22, 32, 62, 42, 52),
161 muIso = cms.untracked.vint32( 0, 0, 1, 1, 0, 0)
164 tauParams = cms.untracked.PSet(
165 tauBx = cms.untracked.vint32(),
166 tauHwPt = cms.untracked.vint32(),
167 tauHwPhi = cms.untracked.vint32(),
168 tauHwEta = cms.untracked.vint32(),
169 tauIso = cms.untracked.vint32()
172 jetParams = cms.untracked.PSet(
173 jetBx = cms.untracked.vint32( 0, 0, 2, 1, 1, 2),
174 jetHwPt = cms.untracked.vint32(100, 200, 130, 170, 85, 145),
175 jetHwPhi = cms.untracked.vint32( 2, 67, 10, 3, 78, 10),
176 jetHwEta = cms.untracked.vint32( 1, 19, 11, 0, 17, 11)
179 etsumParams = cms.untracked.PSet(
180 etsumBx = cms.untracked.vint32( -2, -1, 0, 1, 2),
181 etsumHwPt = cms.untracked.vint32( 2, 1, 204, 3, 4),
182 etsumHwPhi = cms.untracked.vint32( 2, 1, 20, 3, 4)
187 process.load(
'L1Trigger.L1TGlobal.StableParametersConfig_cff')
189 process.load(
'L1Trigger.L1TGlobal.TriggerMenuXml_cfi')
190 process.TriggerMenuXml.TriggerMenuLuminosity =
'startup'
192 process.TriggerMenuXml.DefXmlFile =
'L1Menu_Reference_2014.xml'
194 process.load(
'L1Trigger.L1TGlobal.TriggerMenuConfig_cff')
195 process.es_prefer_l1GtParameters = cms.ESPrefer(
'l1t::TriggerMenuXmlProducer',
'TriggerMenuXml')
198 process.simL1uGtDigis = cms.EDProducer(
"l1t::GtProducer",
200 ProduceL1GtObjectMapRecord = cms.bool(
True),
201 AlgorithmTriggersUnmasked = cms.bool(
False),
202 EmulateBxInEvent = cms.int32(1),
203 L1DataBxInEvent = cms.int32(5),
204 AlgorithmTriggersUnprescaled = cms.bool(
False),
205 ProduceL1GtDaqRecord = cms.bool(
True),
206 GmtInputTag = cms.InputTag(
"gtInput"),
207 caloInputTag = cms.InputTag(
"gtInput"),
208 AlternativeNrBxBoardDaq = cms.uint32(0),
210 BstLengthBytes = cms.int32(-1),
211 Verbosity = cms.untracked.int32(0)
214 process.dumpGTRecord = cms.EDAnalyzer(
"l1t::GtRecordDump",
215 egInputTag = cms.InputTag(
"gtInput"),
216 muInputTag = cms.InputTag(
"gtInput"),
217 tauInputTag = cms.InputTag(
"gtInput"),
218 jetInputTag = cms.InputTag(
"gtInput"),
219 etsumInputTag = cms.InputTag(
"gtInput"),
220 uGtRecInputTag = cms.InputTag(
"simL1uGtDigis"),
221 uGtAlgInputTag = cms.InputTag(
"simL1uGtDigis"),
222 uGtExtInputTag = cms.InputTag(
"simL1uGtDigis"),
223 bxOffset = cms.int32(skip),
224 minBx = cms.int32(-2),
225 maxBx = cms.int32(2),
226 minBxVec = cms.int32(0),
227 maxBxVec = cms.int32(0),
228 dumpGTRecord = cms.bool(
False),
229 dumpVectors = cms.bool(
True),
230 tvFileName = cms.string( (
"TestVector_%03d.txt") % job )
235 process.load(
"L1Trigger.GlobalTriggerAnalyzer.l1GtTrigReport_cfi")
236 process.l1GtTrigReport.L1GtRecordInputTag =
"simL1uGtDigis"
237 process.l1GtTrigReport.PrintVerbosity = 2
238 process.report = cms.Path(process.l1GtTrigReport)
240 process.MessageLogger.categories.append(
"MuConditon")
243 process.gtInput = process.mcL1GTinput.clone()
245 process.gtInput = process.fakeL1GTinput.clone()
247 process.p1 = cms.Path(
250 *process.simL1uGtDigis
251 *process.dumpGTRecord
257 process.schedule = cms.Schedule(
262 process.outpath = cms.EndPath(process.output)
263 process.schedule.append(process.outpath)
266 process.options = cms.untracked.PSet(wantSummary = cms.untracked.bool(
True))
269 outfile = open(
'dump_runGlobalFakeInputProducer_'+`job`+
'.py',
'w')
270 print >> outfile,process.dumpPython()