1 import FWCore.ParameterSet.Config
as cms
9 _barrelWriterOutputOnly = cms.PSet(
10 partition = cms.string(
"Barrel"),
11 tmuxFactor = cms.uint32(6),
12 outputLinksPuppi = cms.vuint32(*
range(6)),
13 outputLinkEgamma = cms.int32(6),
14 nEgammaObjectsOut = cms.uint32(16),
15 nInputFramesPerBX = cms.uint32(9),
16 nOutputFramesPerBX = cms.uint32(9),
17 fileFormat = cms.string(
"EMPv2"),
18 inputFileExtension = cms.string(
"txt.gz"),
19 outputFileExtension = cms.string(
"txt.gz"),
20 maxLinesPerInputFile = cms.uint32(1024),
21 maxLinesPerOutputFile = cms.uint32(1024),
22 eventsPerFile = cms.uint32(_eventsPerFile),
23 tfTimeSlices = cms.VPSet(),
24 gctNLinksEcal = cms.uint32(1),
25 gctNLinksHad = cms.uint32(2),
26 gctSectors = cms.VPSet(),
27 gmtTimeSlices = cms.VPSet(),
28 gmtNumberOfMuons = cms.uint32(12),
29 gttLink = cms.int32(-1),
30 gttLatency = cms.uint32(156+10),
31 gttNumberOfPVs = cms.uint32(_gttNumberOfPVs),
34 barrelWriterOutputOnlyPhiConfigs = [
35 _barrelWriterOutputOnly.clone(
36 outputRegions = cms.vuint32(*[3*ip+9*ie+i
for ie
in range(6)
for i
in range(3) ]),
37 outputBoard = cms.int32(ip),
38 outputFileName = cms.string(
"l1BarrelPhi%d-outputs" % (ip+1))
42 barrelSerenityPhi1Config = barrelWriterOutputOnlyPhiConfigs[0].
clone(
43 tfTimeSlices = cms.VPSet(*[cms.PSet(tfSectors = cms.VPSet(*[ cms.PSet(tfLink = cms.int32(-1))
for s
in range(18) ]))
for t
in range(3)]),
44 gctSectors = cms.VPSet(*[cms.PSet(
45 gctLinksHad = cms.vint32(-1,-1),
46 gctLinksEcal = cms.vint32(-1),
47 )
for s
in range(3)]),
48 gmtTimeSlices = cms.VPSet(*[cms.PSet(gmtLink = cms.int32(4*17+t))
for t
in range(3)]),
50 barrelSerenityVU9PPhi1Config = barrelSerenityPhi1Config.clone(
51 gttLink = cms.int32(4*28+3),
52 inputFileName = cms.string(
"l1BarrelPhi1Serenity-inputs-vu9p"),
53 outputFileName = cms.string(
"l1BarrelPhi1Serenity-outputs")
55 barrelSerenityVU13PPhi1Config = barrelSerenityPhi1Config.clone(
56 gttLink = cms.int32(4*25+3),
57 gmtTimeSlices = cms.VPSet(*[cms.PSet(gmtLink = cms.int32(4*18+t))
for t
in range(3)]),
58 inputFileName = cms.string(
"l1BarrelPhi1Serenity-inputs-vu13p"),
62 for i,s
in enumerate([8, 0, 1, 2, 3]):
63 loglink = 3*(i+5*ie)+t
64 physlink = loglink+4*1
if loglink < 15
else (loglink-15)+4*25
65 barrelSerenityVU9PPhi1Config.tfTimeSlices[t].tfSectors[s+9*ie].tfLink = physlink
66 physlink = loglink+4*0
if loglink < 15
else (loglink-15)+4*28
67 barrelSerenityVU13PPhi1Config.tfTimeSlices[t].tfSectors[s+9*ie].tfLink = physlink
68 for i,s
in enumerate([0,1]):
69 barrelSerenityVU9PPhi1Config.gctSectors[s].gctLinksHad = [3*i+4*18, 3*i+4*18+1]
70 barrelSerenityVU9PPhi1Config.gctSectors[s].gctLinksEcal = [3*i+4*18+2]
71 gctLinks = list(
range(4*17,4*17+4)) + list(
range(4*19,4*19+2))
72 barrelSerenityVU13PPhi1Config.gctSectors[s].gctLinksHad = [gctLinks[3*i], gctLinks[3*i+1]]
73 barrelSerenityVU13PPhi1Config.gctSectors[s].gctLinksEcal = [gctLinks[3*i+2]]
75 barrelWriterConfigs = barrelWriterOutputOnlyPhiConfigs
80 _hgcalWriterConfig = cms.PSet(
81 partition = cms.string(
"HGCal"),
82 tmuxFactor = cms.uint32(6),
83 nEgammaObjectsOut = cms.uint32(16),
84 nInputFramesPerBX = cms.uint32(9),
85 nOutputFramesPerBX = cms.uint32(9),
86 fileFormat = cms.string(
"EMPv2"),
87 inputFileExtension = cms.string(
"txt.gz"),
88 outputFileExtension = cms.string(
"txt.gz"),
89 maxLinesPerInputFile = cms.uint32(1024),
90 maxLinesPerOutputFile = cms.uint32(1024),
91 eventsPerFile = cms.uint32(_eventsPerFile),
92 tfTimeSlices = cms.VPSet(*[cms.PSet(tfSectors = cms.VPSet())
for i
in range(3)]),
93 hgcTimeSlices = cms.VPSet(*[cms.PSet(hgcSectors = cms.VPSet())
for i
in range(3)]),
94 gmtTimeSlices = cms.VPSet(*[cms.PSet(gmtLink = cms.int32(-1))
for i
in range(3)]),
95 gmtNumberOfMuons = cms.uint32(12),
96 gttLink = cms.int32(-1),
97 gttLatency = cms.uint32(_gttLatency),
98 gttNumberOfPVs = cms.uint32(_gttNumberOfPVs),
99 outputLinksPuppi = cms.vuint32(*
range(3)),
100 outputLinkEgamma = cms.int32(3),
103 _hgcalPosWriterConfig = _hgcalWriterConfig.clone(
104 outputRegions = cms.vuint32(*[i+9
for i
in range(9)]),
105 outputBoard = cms.int32(1),
107 _hgcalNegWriterConfig = _hgcalPosWriterConfig.clone(
108 outputRegions = [i
for i
in range(9)],
111 hgcalPosOutputWriterConfig = _hgcalPosWriterConfig.clone(
112 outputFileName = cms.string(
"l1HGCalPos-outputs")
114 hgcalNegOutputWriterConfig = _hgcalNegWriterConfig.clone(
115 outputFileName = cms.string(
"l1HGCalNeg-outputs")
118 hgcalPosVU9PWriterConfig = _hgcalPosWriterConfig.clone()
119 hgcalNegVU9PWriterConfig = _hgcalNegWriterConfig.clone()
121 hgcalPosVU9PWriterConfig.tfTimeSlices[t].tfSectors += [ cms.PSet(tfLink = cms.int32(-1))
for i
in range(9) ]
122 hgcalPosVU9PWriterConfig.tfTimeSlices[t].tfSectors += [ cms.PSet(tfLink = cms.int32(3*i+t+4*1))
for i
in range(4) ]
123 hgcalPosVU9PWriterConfig.tfTimeSlices[t].tfSectors += [ cms.PSet(tfLink = cms.int32(3*i+t+4*26))
for i
in range(5) ]
124 hgcalNegVU9PWriterConfig.tfTimeSlices[t].tfSectors += [ cms.PSet(tfLink = cms.int32(3*i+t+4*1))
for i
in range(4) ]
125 hgcalNegVU9PWriterConfig.tfTimeSlices[t].tfSectors += [ cms.PSet(tfLink = cms.int32(3*i+t+4*26))
for i
in range(5) ]
126 hgcalNegVU9PWriterConfig.tfTimeSlices[t].tfSectors += [ cms.PSet(tfLink = cms.int32(-1))
for i
in range(9) ]
127 hgcQuads = [list(
range(4*i,4*i+4))
for i
in [10,11,12,13]]
128 hgcQuads += [[4*14+1,4*14+2,4*14+3,4*15+3]]
129 hgcQuads += [list(
range(4*i,4*i+4))
for i
in [16,17,18,19]]
130 hgcalPosVU9PWriterConfig.hgcTimeSlices[t].hgcSectors += [ cms.PSet(hgcLinks = cms.vint32(-1,-1,-1,-1))
for i
in range(3) ]
131 hgcalPosVU9PWriterConfig.hgcTimeSlices[t].hgcSectors += [ cms.PSet(hgcLinks = cms.vint32(*hgcQuads[3*i+t]))
for i
in range(3) ]
132 hgcalNegVU9PWriterConfig.hgcTimeSlices[t].hgcSectors += [ cms.PSet(hgcLinks = cms.vint32(*hgcQuads[3*i+t]))
for i
in range(3) ]
133 hgcalNegVU9PWriterConfig.hgcTimeSlices[t].hgcSectors += [ cms.PSet(hgcLinks = cms.vint32(-1,-1,-1,-1))
for i
in range(3) ]
134 hgcalPosVU9PWriterConfig.gmtTimeSlices[t].gmtLink = cms.int32(4*15+((t+2)%3))
135 hgcalNegVU9PWriterConfig.gmtTimeSlices[t].gmtLink = cms.int32(4*15+((t+2)%3))
136 hgcalPosVU9PWriterConfig.gttLink = 4*14+0
137 hgcalNegVU9PWriterConfig.gttLink = 4*14+0
138 hgcalPosVU9PWriterConfig.inputFileName = cms.string(
"l1HGCalPos-inputs-vu9p")
139 hgcalNegVU9PWriterConfig.inputFileName = cms.string(
"l1HGCalNeg-inputs-vu9p")
141 hgcalPosVU13PWriterConfig = _hgcalPosWriterConfig.clone()
142 hgcalNegVU13PWriterConfig = _hgcalNegWriterConfig.clone()
144 hgcalPosVU13PWriterConfig.tfTimeSlices[t].tfSectors += [ cms.PSet(tfLink = cms.int32(-1))
for i
in range(9) ]
145 hgcalPosVU13PWriterConfig.tfTimeSlices[t].tfSectors += [ cms.PSet(tfLink = cms.int32(3*i+t+4*0))
for i
in range(5) ]
146 hgcalPosVU13PWriterConfig.tfTimeSlices[t].tfSectors += [ cms.PSet(tfLink = cms.int32(3*i+t+4*28))
for i
in range(4) ]
147 hgcalNegVU13PWriterConfig.tfTimeSlices[t].tfSectors += [ cms.PSet(tfLink = cms.int32(3*i+t+4*0))
for i
in range(5) ]
148 hgcalNegVU13PWriterConfig.tfTimeSlices[t].tfSectors += [ cms.PSet(tfLink = cms.int32(3*i+t+4*28))
for i
in range(4) ]
149 hgcalNegVU13PWriterConfig.tfTimeSlices[t].tfSectors += [ cms.PSet(tfLink = cms.int32(-1))
for i
in range(9) ]
150 hgcQuads = [list(
range(4*i,4*i+4))
for i
in [12,13,14, 16,17, 19,20,21,22]]
151 hgcalPosVU13PWriterConfig.hgcTimeSlices[t].hgcSectors += [ cms.PSet(hgcLinks = cms.vint32(-1,-1,-1,-1))
for i
in range(3) ]
152 hgcalPosVU13PWriterConfig.hgcTimeSlices[t].hgcSectors += [ cms.PSet(hgcLinks = cms.vint32(*hgcQuads[3*i+t]))
for i
in range(3) ]
153 hgcalNegVU13PWriterConfig.hgcTimeSlices[t].hgcSectors += [ cms.PSet(hgcLinks = cms.vint32(*hgcQuads[3*i+t]))
for i
in range(3) ]
154 hgcalNegVU13PWriterConfig.hgcTimeSlices[t].hgcSectors += [ cms.PSet(hgcLinks = cms.vint32(-1,-1,-1,-1))
for i
in range(3) ]
155 hgcalPosVU13PWriterConfig.gmtTimeSlices[t].gmtLink = cms.int32(4*18+t)
156 hgcalNegVU13PWriterConfig.gmtTimeSlices[t].gmtLink = cms.int32(4*18+t)
157 hgcalPosVU13PWriterConfig.gttLink = 4*25+3
158 hgcalNegVU13PWriterConfig.gttLink = 4*25+3
159 hgcalPosVU13PWriterConfig.inputFileName = cms.string(
"l1HGCalPos-inputs-vu13p")
160 hgcalNegVU13PWriterConfig.inputFileName = cms.string(
"l1HGCalNeg-inputs-vu13p")
163 hgcalWriterConfigs = [
164 hgcalPosOutputWriterConfig,
165 hgcalNegOutputWriterConfig,
166 hgcalPosVU9PWriterConfig,
167 hgcalNegVU9PWriterConfig,
168 hgcalPosVU13PWriterConfig,
169 hgcalNegVU13PWriterConfig
174 _hgcalNoTKWriterConfig = cms.PSet(
175 partition = cms.string(
"HGCalNoTk"),
176 tmuxFactor = cms.uint32(6),
177 outputRegions = cms.vuint32(*
range(18)),
178 nInputFramesPerBX = cms.uint32(9),
179 nOutputFramesPerBX = cms.uint32(9),
180 fileFormat = cms.string(
"EMPv2"),
181 inputFileExtension = cms.string(
"txt.gz"),
182 outputFileExtension = cms.string(
"txt.gz"),
183 maxLinesPerInputFile = cms.uint32(1024),
184 maxLinesPerOutputFile = cms.uint32(1024),
185 eventsPerFile = cms.uint32(_eventsPerFile),
186 hgcTimeSlices = cms.VPSet(*[cms.PSet(hgcSectors = cms.VPSet())
for i
in range(3)]),
187 gmtTimeSlices = cms.VPSet(*[cms.PSet(gmtLink = cms.int32(-1))
for i
in range(3)]),
188 gmtNumberOfMuons = cms.uint32(12),
193 hgcalNoTKOutputWriterConfig = _hgcalNoTKWriterConfig.clone(
194 outputLinksPuppi = cms.vuint32(*
range(4)),
195 outputFileName = cms.string(
"l1HGCalNoTK-outputs")
197 hgcalNoTKVU13PWriterConfig = _hgcalNoTKWriterConfig.clone()
199 for isec
in range(6):
200 q0 = 3*isec + (6
if isec < 3
else 8)
201 hgcalNoTKVU13PWriterConfig.hgcTimeSlices[t].hgcSectors += [ cms.PSet(hgcLinks = cms.vint32(*[4*q0+4*t+j
for j
in range(4)])) ]
202 hgcalNoTKVU13PWriterConfig.inputFileName = cms.string(
"l1HGCalNoTK-inputs-vu13p")
204 hgcalNoTKWriterConfigs = [
205 hgcalNoTKOutputWriterConfig,
206 hgcalNoTKVU13PWriterConfig
211 _barrelSerenityTM18 = _barrelWriterOutputOnly.clone(
212 tmuxFactor = cms.uint32(18),
214 tfSectors = cms.VPSet(*[cms.PSet(tfLink = cms.int32(-1))
for i
in range(18)]),
215 gmtTimeSlices =
None,
216 gmtLink = cms.int32(4*18+0),
220 barrelSerenityOutputTM18WriterConfig = _barrelSerenityTM18.clone(
221 outputRegions = cms.vuint32(*
range(54)),
222 outputBoard = cms.int32(0),
223 outputFileName = cms.string(
"l1BarrelSerenityTM18-outputs")
225 barrelSerenityVU13PTM18WriterConfig = _barrelSerenityTM18.clone(
226 inputFileName = cms.string(
"l1BarrelSerenityTM18-inputs-vu13p"),
227 gttLatency = cms.uint32(167),
228 maxLinesPerInputFile = cms.uint32(1024+167),
231 gctSectors = cms.VPSet(*[cms.PSet(
232 gctLinksHad = cms.vint32(4*18+1+s),
233 gctLinksEcal = cms.vint32(4*18+1+s),
234 )
for s
in range(3)]),
237 for iphi
in range(9):
239 barrelSerenityVU13PTM18WriterConfig.tfSectors[isec].tfLink = (isec
if isec < 12
else (4*30+(isec-12)))
241 barrelSerenityTM18WriterConfigs = [
242 barrelSerenityOutputTM18WriterConfig,
243 barrelSerenityVU13PTM18WriterConfig
246 _hgcalWriterTM18 = _hgcalWriterConfig.clone(
247 tmuxFactor = cms.uint32(18),
249 tfSectors = cms.VPSet(*[cms.PSet(tfLink = cms.int32(-1))
for i
in range(18)]),
250 hgcTimeSlices =
None,
251 hgcSectors = cms.VPSet(*[cms.PSet(hgcLinks = cms.vint32())
for i
in range(6)]),
252 gmtTimeSlices =
None,
253 gmtLink = cms.int32(4*27+0),
257 hgcalWriterOutputTM18WriterConfig = _hgcalWriterTM18.clone(
258 outputFileName = cms.string(
"l1HGCalTM18-outputs"),
259 outputRegions = cms.vuint32(*
range(18)),
260 outputLinksPuppi = cms.vuint32(*
range(2)),
261 outputLinkEgamma = cms.int32(2),
263 hgcalWriterVU9PTM18WriterConfig = _hgcalWriterTM18.clone(
264 inputFileName = cms.string(
"l1HGCalTM18-inputs-vu9p"),
265 gttLatency = cms.uint32(167),
266 maxLinesPerInputFile = cms.uint32(1024+167),
270 hgcalWriterVU13PTM18WriterConfig = hgcalWriterVU9PTM18WriterConfig.clone(
271 inputFileName = cms.string(
"l1HGCalTM18-inputs-vu13p"),
276 for iphi
in range(9):
277 isec, ilink = 9*ie+iphi, 2*iphi+ie
278 hgcalWriterVU9PTM18WriterConfig.tfSectors[isec].tfLink = (ilink+2
if ilink < 10
else (4*28+(ilink-10)))
279 hgcalWriterVU13PTM18WriterConfig.tfSectors[isec].tfLink = (ilink
if ilink < 12
else (4*30+(ilink-12)))
280 for iphi
in range(3):
281 isec, ilink = 3*ie+iphi, 2*iphi+ie
283 hgcalWriterVU9PTM18WriterConfig.hgcSectors[isec].hgcLinks +=
range(4*(12+ilink),4*(12+ilink)+4)
285 hgcalWriterVU9PTM18WriterConfig.hgcSectors[isec].hgcLinks +=
range(4*(14+ilink),4*(14+ilink)+4)
287 hgcalWriterVU13PTM18WriterConfig.hgcSectors[isec].hgcLinks +=
range(4*(12+ilink),4*(12+ilink)+4)
289 hgcalWriterVU13PTM18WriterConfig.hgcSectors[isec].hgcLinks +=
range(4*(13+ilink),4*(13+ilink)+4)
291 hgcalWriterVU13PTM18WriterConfig.hgcSectors[isec].hgcLinks +=
range(4*(14+ilink),4*(14+ilink)+4)
293 hgcalTM18WriterConfigs = [
294 hgcalWriterOutputTM18WriterConfig,
295 hgcalWriterVU9PTM18WriterConfig,
296 hgcalWriterVU13PTM18WriterConfig
298 hgcalNoTKOutputTM18WriterConfig = _hgcalWriterTM18.clone(
299 outputFileName = cms.string(
"l1HGCalTM18-outputs-fwd"),
300 outputRegions = cms.vuint32(*
range(18)),
301 outputBoard = cms.int32(-1),
302 outputLinksPuppi = cms.vuint32(*
range(2)),
303 outputLinkEgamma = cms.int32(-1),
310 _hfWriterOutputOnly = cms.PSet(
311 partition = cms.string(
"HF"),
312 tmuxFactor = cms.uint32(6),
313 outputLinksPuppi = cms.vuint32(*
range(3)),
314 nOutputFramesPerBX = cms.uint32(9),
315 fileFormat = cms.string(
"EMPv2"),
316 outputFileExtension = cms.string(
"txt.gz"),
317 maxLinesPerOutputFile = cms.uint32(1024),
318 eventsPerFile = cms.uint32(_eventsPerFile),
321 _hfWriterOutputOnly.clone(
322 outputRegions = cms.vuint32(*[9*ie+i
for i
in range(9)]),
323 outputFileName = cms.string(
"l1HF%s-outputs" % (
"Pos" if ie
else "Neg")),
TEveGeoShape * clone(const TEveElement *element, TEveElement *parent)