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
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(),
81 fileNames = cms.untracked.vstring(
82 "/store/relval/CMSSW_7_1_0/RelValTTbar_13/GEN-SIM-DIGI-RAW-HLTDEBUG/PU50ns_POSTLS171_V16-v1/00000/0EF13A80-F2FE-E311-9565-003048FFD7D4.root",
83 "/store/relval/CMSSW_7_1_0/RelValTTbar_13/GEN-SIM-DIGI-RAW-HLTDEBUG/PU50ns_POSTLS171_V16-v1/00000/389E0C8A-EFFE-E311-86EA-0025905A6088.root",
84 "/store/relval/CMSSW_7_1_0/RelValTTbar_13/GEN-SIM-DIGI-RAW-HLTDEBUG/PU50ns_POSTLS171_V16-v1/00000/52F1C37C-F1FE-E311-89EA-00261894394D.root",
85 "/store/relval/CMSSW_7_1_0/RelValTTbar_13/GEN-SIM-DIGI-RAW-HLTDEBUG/PU50ns_POSTLS171_V16-v1/00000/545B93FA-F1FE-E311-8414-0025905A497A.root",
86 "/store/relval/CMSSW_7_1_0/RelValTTbar_13/GEN-SIM-DIGI-RAW-HLTDEBUG/PU50ns_POSTLS171_V16-v1/00000/5C8B9784-EFFE-E311-A37A-0025905A60B0.root",
87 "/store/relval/CMSSW_7_1_0/RelValTTbar_13/GEN-SIM-DIGI-RAW-HLTDEBUG/PU50ns_POSTLS171_V16-v1/00000/5E835FAA-F3FE-E311-8D88-0025905B8596.root",
88 "/store/relval/CMSSW_7_1_0/RelValTTbar_13/GEN-SIM-DIGI-RAW-HLTDEBUG/PU50ns_POSTLS171_V16-v1/00000/6C2B9503-F0FE-E311-858F-0025905A612A.root",
98 skipEvents = cms.untracked.uint32(skip)
101 process.output =cms.OutputModule(
"PoolOutputModule",
102 outputCommands = cms.untracked.vstring(
'keep *'),
103 fileName = cms.untracked.string(
'testGlobalMCInputProducer_'+`job`+
'.root')
106 process.options = cms.untracked.PSet()
109 from Configuration.AlCa.GlobalTag
import GlobalTag
110 process.GlobalTag =
GlobalTag(process.GlobalTag,
'auto:upgradePLS1',
'')
115 process.dumpGT = cms.EDAnalyzer(
"l1t::GtInputDump",
116 egInputTag = cms.InputTag(
"gtInput"),
117 muInputTag = cms.InputTag(
"gtInput"),
118 tauInputTag = cms.InputTag(
"gtInput"),
119 jetInputTag = cms.InputTag(
"gtInput"),
120 etsumInputTag = cms.InputTag(
"gtInput"),
121 minBx = cms.int32(0),
124 process.dumpED = cms.EDAnalyzer(
"EventContentAnalyzer")
125 process.dumpES = cms.EDAnalyzer(
"PrintEventSetupContent")
127 process.mcL1GTinput = cms.EDProducer(
"l1t::GenToInputProducer",
128 bxFirst = cms.int32(-2),
129 bxLast = cms.int32(2),
130 maxMuCand = cms.int32(8),
131 maxJetCand = cms.int32(12),
132 maxEGCand = cms.int32(12),
133 maxTauCand = cms.int32(8),
134 jetEtThreshold = cms.double(1),
135 tauEtThreshold = cms.double(1),
136 egEtThreshold = cms.double(1),
137 muEtThreshold = cms.double(1),
138 emptyBxTrailer = cms.int32(5),
139 emptyBxEvt = cms.int32(neventsPerJob)
142 process.mcL1GTinput.maxMuCand = cms.int32(8)
143 process.mcL1GTinput.maxJetCand = cms.int32(12)
144 process.mcL1GTinput.maxEGCand = cms.int32(12)
145 process.mcL1GTinput.maxTauCand = cms.int32(8)
148 process.fakeL1GTinput = cms.EDProducer(
"l1t::FakeInputProducer",
151 egParams = cms.untracked.PSet(
152 egBx = cms.untracked.vint32(-2, -1, 0, 0, 1, 2),
153 egHwPt = cms.untracked.vint32(10, 20, 30, 61, 40, 50),
154 egHwPhi = cms.untracked.vint32(11, 21, 31, 61, 41, 51),
155 egHwEta = cms.untracked.vint32(12, 22, 32, 62, 42, 52),
156 egIso = cms.untracked.vint32( 0, 0, 1, 1, 0, 0)
159 muParams = cms.untracked.PSet(
160 muBx = cms.untracked.vint32(0, -1, 0, 0, 1, 2),
161 muHwPt = cms.untracked.vint32(5, 20, 30, 61, 40, 50),
162 muHwPhi = cms.untracked.vint32(11, 21, 31, 61, 41, 51),
163 muHwEta = cms.untracked.vint32(12, 22, 32, 62, 42, 52),
164 muIso = cms.untracked.vint32( 0, 0, 1, 1, 0, 0)
167 tauParams = cms.untracked.PSet(
168 tauBx = cms.untracked.vint32(),
169 tauHwPt = cms.untracked.vint32(),
170 tauHwPhi = cms.untracked.vint32(),
171 tauHwEta = cms.untracked.vint32(),
172 tauIso = cms.untracked.vint32()
175 jetParams = cms.untracked.PSet(
176 jetBx = cms.untracked.vint32( 0, 0, 2, 1, 1, 2),
177 jetHwPt = cms.untracked.vint32(100, 200, 130, 170, 85, 145),
178 jetHwPhi = cms.untracked.vint32( 2, 67, 10, 3, 78, 10),
179 jetHwEta = cms.untracked.vint32( 1, 19, 11, 0, 17, 11)
182 etsumParams = cms.untracked.PSet(
183 etsumBx = cms.untracked.vint32( -2, -1, 0, 1, 2),
184 etsumHwPt = cms.untracked.vint32( 2, 1, 204, 3, 4),
185 etsumHwPhi = cms.untracked.vint32( 2, 1, 20, 3, 4)
190 process.load(
'L1Trigger.L1TGlobal.StableParametersConfig_cff')
192 process.load(
'L1Trigger.L1TGlobal.TriggerMenuXml_cfi')
193 process.TriggerMenuXml.TriggerMenuLuminosity =
'startup'
195 process.TriggerMenuXml.DefXmlFile =
'L1Menu_Reference_2014.xml'
197 process.load(
'L1Trigger.L1TGlobal.TriggerMenuConfig_cff')
198 process.es_prefer_l1GtParameters = cms.ESPrefer(
'l1t::TriggerMenuXmlProducer',
'TriggerMenuXml')
201 process.simL1uGtDigis = cms.EDProducer(
"l1t::GtProducer",
203 ProduceL1GtObjectMapRecord = cms.bool(
True),
204 AlgorithmTriggersUnmasked = cms.bool(
False),
205 EmulateBxInEvent = cms.int32(1),
206 L1DataBxInEvent = cms.int32(5),
207 AlgorithmTriggersUnprescaled = cms.bool(
False),
208 ProduceL1GtDaqRecord = cms.bool(
True),
209 GmtInputTag = cms.InputTag(
"gtInput"),
210 caloInputTag = cms.InputTag(
"gtInput"),
211 AlternativeNrBxBoardDaq = cms.uint32(0),
213 BstLengthBytes = cms.int32(-1),
214 Verbosity = cms.untracked.int32(0)
217 process.dumpGTRecord = cms.EDAnalyzer(
"l1t::GtRecordDump",
218 egInputTag = cms.InputTag(
"gtInput"),
219 muInputTag = cms.InputTag(
"gtInput"),
220 tauInputTag = cms.InputTag(
"gtInput"),
221 jetInputTag = cms.InputTag(
"gtInput"),
222 etsumInputTag = cms.InputTag(
"gtInput"),
223 uGtRecInputTag = cms.InputTag(
"simL1uGtDigis"),
224 uGtAlgInputTag = cms.InputTag(
"simL1uGtDigis"),
225 uGtExtInputTag = cms.InputTag(
"simL1uGtDigis"),
226 bxOffset = cms.int32(skip),
227 minBx = cms.int32(-2),
228 maxBx = cms.int32(2),
229 minBxVec = cms.int32(0),
230 maxBxVec = cms.int32(0),
231 dumpGTRecord = cms.bool(
False),
232 dumpVectors = cms.bool(
True),
233 tvFileName = cms.string( (
"TestVector_%03d.txt") % job )
238 process.load(
"L1Trigger.GlobalTriggerAnalyzer.l1GtTrigReport_cfi")
239 process.l1GtTrigReport.L1GtRecordInputTag =
"simL1uGtDigis"
240 process.l1GtTrigReport.PrintVerbosity = 2
241 process.report = cms.Path(process.l1GtTrigReport)
243 process.MessageLogger.categories.append(
"MuConditon")
246 process.gtInput = process.mcL1GTinput.clone()
248 process.gtInput = process.fakeL1GTinput.clone()
250 process.p1 = cms.Path(
253 *process.simL1uGtDigis
254 *process.dumpGTRecord
260 process.schedule = cms.Schedule(
265 process.outpath = cms.EndPath(process.output)
266 process.schedule.append(process.outpath)
269 process.options = cms.untracked.PSet(wantSummary = cms.untracked.bool(
True))
272 outfile = open(
'dump_runGlobalFakeInputProducer_'+`job`+
'.py',
'w')
273 print >> outfile,process.dumpPython()