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(
"/store/relval/CMSSW_7_1_0_pre5/RelValTTbar_13/GEN-SIM-DIGI-RAW-HLTDEBUG/PU50ns_POSTLS171_V2-v2/00000/0E8CA3E5-94BC-E311-866D-02163E00EB85.root"),
88 skipEvents = cms.untracked.uint32(skip)
91 process.output =cms.OutputModule(
"PoolOutputModule",
92 outputCommands = cms.untracked.vstring(
'keep *'),
93 fileName = cms.untracked.string(
'testGlobalMCInputProducer_'+`job`+
'.root')
96 process.options = cms.untracked.PSet()
99 from Configuration.AlCa.GlobalTag
import GlobalTag
100 process.GlobalTag =
GlobalTag(process.GlobalTag,
'auto:upgradePLS1',
'')
105 process.dumpGT = cms.EDAnalyzer(
"l1t::GtInputDump",
106 egInputTag = cms.InputTag(
"gtInput"),
107 muInputTag = cms.InputTag(
"gtInput"),
108 tauInputTag = cms.InputTag(
"gtInput"),
109 jetInputTag = cms.InputTag(
"gtInput"),
110 etsumInputTag = cms.InputTag(
"gtInput")
112 process.dumpED = cms.EDAnalyzer(
"EventContentAnalyzer")
113 process.dumpES = cms.EDAnalyzer(
"PrintEventSetupContent")
115 process.mcL1GTinput = cms.EDProducer(
"l1t::GenToInputProducer",
116 bxFirst = cms.int32(-2),
117 bxLast = cms.int32(2),
118 maxMuCand = cms.int32(8),
119 maxJetCand = cms.int32(12),
120 maxEGCand = cms.int32(12),
121 maxTauCand = cms.int32(8),
122 jetEtThreshold = cms.double(1),
123 tauEtThreshold = cms.double(1),
124 egEtThreshold = cms.double(1),
125 muEtThreshold = cms.double(1),
126 emptyBxTrailer = cms.int32(5),
127 emptyBxEvt = cms.int32(neventsPerJob)
130 process.mcL1GTinput.maxMuCand = cms.int32(8)
131 process.mcL1GTinput.maxJetCand = cms.int32(12)
132 process.mcL1GTinput.maxEGCand = cms.int32(12)
133 process.mcL1GTinput.maxTauCand = cms.int32(8)
136 process.fakeL1GTinput = cms.EDProducer(
"l1t::FakeInputProducer",
139 egParams = cms.untracked.PSet(
140 egBx = cms.untracked.vint32(-2, -1, 0, 0, 1, 2),
141 egHwPt = cms.untracked.vint32(10, 20, 30, 61, 40, 50),
142 egHwPhi = cms.untracked.vint32(11, 21, 31, 61, 41, 51),
143 egHwEta = cms.untracked.vint32(12, 22, 32, 62, 42, 52),
144 egIso = cms.untracked.vint32( 0, 0, 1, 1, 0, 0)
147 muParams = cms.untracked.PSet(
148 muBx = cms.untracked.vint32(0, -1, 0, 0, 1, 2),
149 muHwPt = cms.untracked.vint32(5, 20, 30, 61, 40, 50),
150 muHwPhi = cms.untracked.vint32(11, 21, 31, 61, 41, 51),
151 muHwEta = cms.untracked.vint32(12, 22, 32, 62, 42, 52),
152 muIso = cms.untracked.vint32( 0, 0, 1, 1, 0, 0)
155 tauParams = cms.untracked.PSet(
156 tauBx = cms.untracked.vint32(),
157 tauHwPt = cms.untracked.vint32(),
158 tauHwPhi = cms.untracked.vint32(),
159 tauHwEta = cms.untracked.vint32(),
160 tauIso = cms.untracked.vint32()
163 jetParams = cms.untracked.PSet(
164 jetBx = cms.untracked.vint32( 0, 0, 2, 1, 1, 2),
165 jetHwPt = cms.untracked.vint32(100, 200, 130, 170, 85, 145),
166 jetHwPhi = cms.untracked.vint32( 2, 67, 10, 3, 78, 10),
167 jetHwEta = cms.untracked.vint32( 1, 19, 11, 0, 17, 11)
170 etsumParams = cms.untracked.PSet(
171 etsumBx = cms.untracked.vint32( -2, -1, 0, 1, 2),
172 etsumHwPt = cms.untracked.vint32( 2, 1, 204, 3, 4),
173 etsumHwPhi = cms.untracked.vint32( 2, 1, 20, 3, 4)
178 process.load(
'L1Trigger.L1TGlobal.StableParametersConfig_cff')
180 process.load(
'L1Trigger.L1TGlobal.TriggerMenuXml_cfi')
181 process.TriggerMenuXml.TriggerMenuLuminosity =
'startup'
183 process.TriggerMenuXml.DefXmlFile =
'L1Menu_Reference_2014.xml'
185 process.load(
'L1Trigger.L1TGlobal.TriggerMenuConfig_cff')
186 process.es_prefer_l1GtParameters = cms.ESPrefer(
'l1t::TriggerMenuXmlProducer',
'TriggerMenuXml')
189 process.simL1uGtDigis = cms.EDProducer(
"l1t::GtProducer",
191 ProduceL1GtObjectMapRecord = cms.bool(
True),
192 AlgorithmTriggersUnmasked = cms.bool(
False),
193 EmulateBxInEvent = cms.int32(1),
194 L1DataBxInEvent = cms.int32(5),
195 AlgorithmTriggersUnprescaled = cms.bool(
False),
196 ProduceL1GtDaqRecord = cms.bool(
True),
197 GmtInputTag = cms.InputTag(
"gtInput"),
198 caloInputTag = cms.InputTag(
"gtInput"),
199 AlternativeNrBxBoardDaq = cms.uint32(0),
201 BstLengthBytes = cms.int32(-1),
202 Verbosity = cms.untracked.int32(0)
205 process.dumpGTRecord = cms.EDAnalyzer(
"l1t::GtRecordDump",
206 egInputTag = cms.InputTag(
"gtInput"),
207 muInputTag = cms.InputTag(
"gtInput"),
208 tauInputTag = cms.InputTag(
"gtInput"),
209 jetInputTag = cms.InputTag(
"gtInput"),
210 etsumInputTag = cms.InputTag(
"gtInput"),
211 uGtRecInputTag = cms.InputTag(
"simL1uGtDigis"),
212 uGtAlgInputTag = cms.InputTag(
"simL1uGtDigis"),
213 uGtExtInputTag = cms.InputTag(
"simL1uGtDigis"),
214 bxOffset = cms.int32(skip),
215 minBx = cms.int32(-2),
216 maxBx = cms.int32(2),
217 minBxVec = cms.int32(0),
218 maxBxVec = cms.int32(0),
219 dumpGTRecord = cms.bool(
False),
220 dumpVectors = cms.bool(
True),
221 tvFileName = cms.string( (
"TestVector_%03d.txt") % job )
226 process.load(
"L1Trigger.GlobalTriggerAnalyzer.l1GtTrigReport_cfi")
227 process.l1GtTrigReport.L1GtRecordInputTag =
"simL1uGtDigis"
228 process.l1GtTrigReport.PrintVerbosity = 2
229 process.report = cms.Path(process.l1GtTrigReport)
231 process.MessageLogger.categories.append(
"MuConditon")
234 process.gtInput = process.mcL1GTinput.clone()
236 process.gtInput = process.fakeL1GTinput.clone()
238 process.p1 = cms.Path(
241 *process.simL1uGtDigis
242 *process.dumpGTRecord
248 process.schedule = cms.Schedule(
253 process.outpath = cms.EndPath(process.output)
254 process.schedule.append(process.outpath)
257 process.options = cms.untracked.PSet(wantSummary = cms.untracked.bool(
True))
260 outfile = open(
'dump_runGlobalFakeInputProducer_'+`job`+
'.py',
'w')
261 print >> outfile,process.dumpPython()