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 gctSectors = cms.VPSet(),
25 gmtTimeSlices = cms.VPSet(),
26 gmtNumberOfMuons = cms.uint32(12),
27 gttLink = cms.int32(-1),
28 gttLatency = cms.uint32(156+10),
29 gttNumberOfPVs = cms.uint32(_gttNumberOfPVs),
32 barrelWriterOutputOnlyPhiConfigs = [
33 _barrelWriterOutputOnly.clone(
34 outputRegions = cms.vuint32(*[3*ip+9*ie+i
for ie
in range(6)
for i
in range(3) ]),
35 outputBoard = cms.int32(ip),
36 outputFileName = cms.string(
"l1BarrelPhi%d-outputs" % (ip+1))
40 barrelSerenityPhi1Config = barrelWriterOutputOnlyPhiConfigs[0].
clone(
41 tfTimeSlices = cms.VPSet(*[cms.PSet(tfSectors = cms.VPSet(*[ cms.PSet(tfLink = cms.int32(-1))
for s
in range(18) ]))
for t
in range(3)]),
42 gctSectors = cms.VPSet(*[cms.PSet(
43 gctLinksHad = cms.vint32(-1,-1),
44 gctLinksEcal = cms.vint32(-1),
45 )
for s
in range(3)]),
46 gmtTimeSlices = cms.VPSet(*[cms.PSet(gmtLink = cms.int32(4*17+t))
for t
in range(3)]),
48 barrelSerenityVU9PPhi1Config = barrelSerenityPhi1Config.clone(
49 gttLink = cms.int32(4*28+3),
50 inputFileName = cms.string(
"l1BarrelPhi1Serenity-inputs-vu9p"),
51 outputFileName = cms.string(
"l1BarrelPhi1Serenity-outputs")
53 barrelSerenityVU13PPhi1Config = barrelSerenityPhi1Config.clone(
54 gttLink = cms.int32(4*31+3),
55 inputFileName = cms.string(
"l1BarrelPhi1Serenity-inputs-vu13p"),
59 for i,s
in enumerate([8, 0, 1, 2, 3]):
60 loglink = 3*(i+5*ie)+t
61 physlink = loglink+4*1
if loglink < 15
else (loglink-15)+4*25
62 barrelSerenityVU9PPhi1Config.tfTimeSlices[t].tfSectors[s+9*ie].tfLink = physlink
63 physlink = loglink+4*0
if loglink < 15
else (loglink-15)+4*28
64 barrelSerenityVU13PPhi1Config.tfTimeSlices[t].tfSectors[s+9*ie].tfLink = physlink
65 for i,s
in enumerate([0,1]):
66 barrelSerenityVU9PPhi1Config.gctSectors[s].gctLinksHad = [3*i+4*18, 3*i+4*18+1]
67 barrelSerenityVU9PPhi1Config.gctSectors[s].gctLinksEcal = [3*i+4*18+2]
68 barrelSerenityVU13PPhi1Config.gctSectors[s].gctLinksHad = [3*i+4*18, 3*i+4*18+1]
69 barrelSerenityVU13PPhi1Config.gctSectors[s].gctLinksEcal = [3*i+4*18+2]
71 barrelWriterConfigs = barrelWriterOutputOnlyPhiConfigs
76 _hgcalWriterConfig = cms.PSet(
77 partition = cms.string(
"HGCal"),
78 tmuxFactor = cms.uint32(6),
79 nEgammaObjectsOut = cms.uint32(16),
80 nInputFramesPerBX = cms.uint32(9),
81 nOutputFramesPerBX = cms.uint32(9),
82 fileFormat = cms.string(
"EMPv2"),
83 inputFileExtension = cms.string(
"txt.gz"),
84 outputFileExtension = cms.string(
"txt.gz"),
85 maxLinesPerInputFile = cms.uint32(1024),
86 maxLinesPerOutputFile = cms.uint32(1024),
87 eventsPerFile = cms.uint32(_eventsPerFile),
88 tfTimeSlices = cms.VPSet(*[cms.PSet(tfSectors = cms.VPSet())
for i
in range(3)]),
89 hgcTimeSlices = cms.VPSet(*[cms.PSet(hgcSectors = cms.VPSet())
for i
in range(3)]),
90 gmtTimeSlices = cms.VPSet(*[cms.PSet(gmtLink = cms.int32(-1))
for i
in range(3)]),
91 gmtNumberOfMuons = cms.uint32(12),
92 gttLink = cms.int32(-1),
93 gttLatency = cms.uint32(_gttLatency),
94 gttNumberOfPVs = cms.uint32(_gttNumberOfPVs),
95 outputLinksPuppi = cms.vuint32(*
range(3)),
96 outputLinkEgamma = cms.int32(3),
99 _hgcalPosWriterConfig = _hgcalWriterConfig.clone(
100 outputRegions = cms.vuint32(*[i+9
for i
in range(9)]),
101 outputBoard = cms.int32(1),
103 _hgcalNegWriterConfig = _hgcalPosWriterConfig.clone(
104 outputRegions = [i
for i
in range(9)],
107 hgcalPosOutputWriterConfig = _hgcalPosWriterConfig.clone(
108 outputFileName = cms.string(
"l1HGCalPos-outputs")
110 hgcalNegOutputWriterConfig = _hgcalNegWriterConfig.clone(
111 outputFileName = cms.string(
"l1HGCalNeg-outputs")
114 hgcalPosVU9PWriterConfig = _hgcalPosWriterConfig.clone()
115 hgcalNegVU9PWriterConfig = _hgcalNegWriterConfig.clone()
117 hgcalPosVU9PWriterConfig.tfTimeSlices[t].tfSectors += [ cms.PSet(tfLink = cms.int32(-1))
for i
in range(9) ]
118 hgcalPosVU9PWriterConfig.tfTimeSlices[t].tfSectors += [ cms.PSet(tfLink = cms.int32(3*i+t+4*2))
for i
in range(4) ]
119 hgcalPosVU9PWriterConfig.tfTimeSlices[t].tfSectors += [ cms.PSet(tfLink = cms.int32(3*i+t+4*25))
for i
in range(5) ]
120 hgcalNegVU9PWriterConfig.tfTimeSlices[t].tfSectors += [ cms.PSet(tfLink = cms.int32(3*i+t+4*2))
for i
in range(4) ]
121 hgcalNegVU9PWriterConfig.tfTimeSlices[t].tfSectors += [ cms.PSet(tfLink = cms.int32(3*i+t+4*25))
for i
in range(5) ]
122 hgcalNegVU9PWriterConfig.tfTimeSlices[t].tfSectors += [ cms.PSet(tfLink = cms.int32(-1))
for i
in range(9) ]
123 hgcalPosVU9PWriterConfig.hgcTimeSlices[t].hgcSectors += [ cms.PSet(hgcLinks = cms.vint32(-1,-1,-1,-1))
for i
in range(3) ]
124 hgcalPosVU9PWriterConfig.hgcTimeSlices[t].hgcSectors += [ cms.PSet(hgcLinks = cms.vint32(*[4*11+12*i+4*t+j
for j
in range(4)]))
for i
in range(3) ]
125 hgcalNegVU9PWriterConfig.hgcTimeSlices[t].hgcSectors += [ cms.PSet(hgcLinks = cms.vint32(*[4*11+12*i+4*t+j
for j
in range(4)]))
for i
in range(3) ]
126 hgcalNegVU9PWriterConfig.hgcTimeSlices[t].hgcSectors += [ cms.PSet(hgcLinks = cms.vint32(-1,-1,-1,-1))
for i
in range(3) ]
127 hgcalPosVU9PWriterConfig.gmtTimeSlices[t].gmtLink = cms.int32(4+t)
128 hgcalNegVU9PWriterConfig.gmtTimeSlices[t].gmtLink = cms.int32(4+t)
129 hgcalPosVU9PWriterConfig.gttLink = 4+3
130 hgcalNegVU9PWriterConfig.gttLink = 4+3
131 hgcalPosVU9PWriterConfig.inputFileName = cms.string(
"l1HGCalPos-inputs-vu9p")
132 hgcalNegVU9PWriterConfig.inputFileName = cms.string(
"l1HGCalNeg-inputs-vu9p")
134 hgcalPosVU13PWriterConfig = _hgcalPosWriterConfig.clone()
135 hgcalNegVU13PWriterConfig = _hgcalNegWriterConfig.clone()
137 hgcalPosVU13PWriterConfig.tfTimeSlices[t].tfSectors += [ cms.PSet(tfLink = cms.int32(-1))
for i
in range(9) ]
138 hgcalPosVU13PWriterConfig.tfTimeSlices[t].tfSectors += [ cms.PSet(tfLink = cms.int32(3*i+t+4*0))
for i
in range(5) ]
139 hgcalPosVU13PWriterConfig.tfTimeSlices[t].tfSectors += [ cms.PSet(tfLink = cms.int32(3*i+t+4*28))
for i
in range(4) ]
140 hgcalNegVU13PWriterConfig.tfTimeSlices[t].tfSectors += [ cms.PSet(tfLink = cms.int32(3*i+t+4*0))
for i
in range(5) ]
141 hgcalNegVU13PWriterConfig.tfTimeSlices[t].tfSectors += [ cms.PSet(tfLink = cms.int32(3*i+t+4*28))
for i
in range(4) ]
142 hgcalNegVU13PWriterConfig.tfTimeSlices[t].tfSectors += [ cms.PSet(tfLink = cms.int32(-1))
for i
in range(9) ]
143 hgcalPosVU13PWriterConfig.hgcTimeSlices[t].hgcSectors += [ cms.PSet(hgcLinks = cms.vint32(-1,-1,-1,-1))
for i
in range(3) ]
144 for isec,q0
in (0,12),(1,17),(2,20):
145 hgcalPosVU13PWriterConfig.hgcTimeSlices[t].hgcSectors += [ cms.PSet(hgcLinks = cms.vint32(*[4*q0+4*t+j
for j
in range(4)])) ]
146 hgcalNegVU13PWriterConfig.hgcTimeSlices[t].hgcSectors += [ cms.PSet(hgcLinks = cms.vint32(*[4*q0+4*t+j
for j
in range(4)])) ]
147 hgcalNegVU13PWriterConfig.hgcTimeSlices[t].hgcSectors += [ cms.PSet(hgcLinks = cms.vint32(-1,-1,-1,-1))
for i
in range(3) ]
148 hgcalPosVU13PWriterConfig.gmtTimeSlices[t].gmtLink = cms.int32(4*27+t)
149 hgcalNegVU13PWriterConfig.gmtTimeSlices[t].gmtLink = cms.int32(4*27+t)
150 hgcalPosVU13PWriterConfig.gttLink = 4*27+3
151 hgcalNegVU13PWriterConfig.gttLink = 4*27+3
152 hgcalPosVU13PWriterConfig.inputFileName = cms.string(
"l1HGCalPos-inputs-vu13p")
153 hgcalNegVU13PWriterConfig.inputFileName = cms.string(
"l1HGCalNeg-inputs-vu13p")
156 hgcalWriterConfigs = [
157 hgcalPosOutputWriterConfig,
158 hgcalNegOutputWriterConfig,
159 hgcalPosVU9PWriterConfig,
160 hgcalNegVU9PWriterConfig,
161 hgcalPosVU13PWriterConfig,
162 hgcalNegVU13PWriterConfig
167 _hgcalNoTKWriterConfig = cms.PSet(
168 partition = cms.string(
"HGCalNoTk"),
169 tmuxFactor = cms.uint32(6),
170 outputRegions = cms.vuint32(*
range(18)),
171 nInputFramesPerBX = cms.uint32(9),
172 nOutputFramesPerBX = cms.uint32(9),
173 fileFormat = cms.string(
"EMPv2"),
174 inputFileExtension = cms.string(
"txt.gz"),
175 outputFileExtension = cms.string(
"txt.gz"),
176 maxLinesPerInputFile = cms.uint32(1024),
177 maxLinesPerOutputFile = cms.uint32(1024),
178 eventsPerFile = cms.uint32(_eventsPerFile),
179 hgcTimeSlices = cms.VPSet(*[cms.PSet(hgcSectors = cms.VPSet())
for i
in range(3)]),
180 gmtTimeSlices = cms.VPSet(*[cms.PSet(gmtLink = cms.int32(-1))
for i
in range(3)]),
181 gmtNumberOfMuons = cms.uint32(12),
186 hgcalNoTKOutputWriterConfig = _hgcalNoTKWriterConfig.clone(
187 outputLinksPuppi = cms.vuint32(*
range(4)),
188 outputFileName = cms.string(
"l1HGCalNoTK-outputs")
190 hgcalNoTKVU13PWriterConfig = _hgcalNoTKWriterConfig.clone()
192 for isec
in range(6):
194 hgcalNoTKVU13PWriterConfig.hgcTimeSlices[t].hgcSectors += [ cms.PSet(hgcLinks = cms.vint32(*[4*q0+4*t+j
for j
in range(4)])) ]
195 hgcalNoTKVU13PWriterConfig.inputFileName = cms.string(
"l1HGCalNoTK-inputs-vu13p")
197 hgcalNoTKWriterConfigs = [
198 hgcalNoTKOutputWriterConfig,
199 hgcalNoTKVU13PWriterConfig
204 _hgcalWriterTM18 = _hgcalWriterConfig.clone(
205 tmuxFactor = cms.uint32(18),
207 tfSectors = cms.VPSet(*[cms.PSet(tfLink = cms.int32(-1))
for i
in range(18)]),
208 hgcTimeSlices =
None,
209 hgcSectors = cms.VPSet(*[cms.PSet(hgcLinks = cms.vint32())
for i
in range(6)]),
210 gmtTimeSlices =
None,
211 gmtLink = cms.int32(4*27+0),
215 hgcalWriterOutputTM18WriterConfig = _hgcalWriterTM18.clone(
216 outputFileName = cms.string(
"l1HGCalTM18-outputs"),
217 outputRegions = cms.vuint32(*
range(18)),
218 outputLinksPuppi = cms.vuint32(*
range(2)),
219 outputLinkEgamma = cms.int32(2),
221 hgcalWriterVU9PTM18WriterConfig = _hgcalWriterTM18.clone(
222 inputFileName = cms.string(
"l1HGCalTM18-inputs-vu9p"),
223 gttLatency = cms.uint32(167),
224 maxLinesPerInputFile = cms.uint32(1024+167),
226 hgcalWriterVU13PTM18WriterConfig = hgcalWriterVU9PTM18WriterConfig.clone(
227 inputFileName = cms.string(
"l1HGCalTM18-inputs-vu13p"),
230 for iphi
in range(9):
231 isec, ilink = 9*ie+iphi, 2*iphi+ie
232 hgcalWriterVU9PTM18WriterConfig.tfSectors[isec].tfLink = (ilink
if ilink < 12
else (4*28+(ilink-12)))
233 hgcalWriterVU13PTM18WriterConfig.tfSectors[isec].tfLink = (ilink
if ilink < 12
else (4*30+(ilink-12)))
234 for iphi
in range(3):
235 isec, ilink = 3*ie+iphi, 2*iphi+ie
236 hgcalWriterVU9PTM18WriterConfig.hgcSectors[isec].hgcLinks +=
range(4*(12+ilink),4*(12+ilink)+4)
237 hgcalWriterVU13PTM18WriterConfig.hgcSectors[isec].hgcLinks +=
range(4*(13+ilink),4*(13+ilink)+4)
239 hgcalTM18WriterConfigs = [
240 hgcalWriterOutputTM18WriterConfig,
241 hgcalWriterVU9PTM18WriterConfig,
242 hgcalWriterVU13PTM18WriterConfig
244 hgcalNoTKOutputTM18WriterConfig = _hgcalWriterTM18.clone(
245 outputFileName = cms.string(
"l1HGCalTM18-outputs-fwd"),
246 outputRegions = cms.vuint32(*
range(18)),
247 outputBoard = cms.int32(-1),
248 outputLinksPuppi = cms.vuint32(*
range(2)),
249 outputLinkEgamma = cms.int32(-1),
256 _hfWriterOutputOnly = cms.PSet(
257 partition = cms.string(
"HF"),
258 tmuxFactor = cms.uint32(6),
259 outputLinksPuppi = cms.vuint32(*
range(3)),
260 nOutputFramesPerBX = cms.uint32(9),
261 fileFormat = cms.string(
"EMPv2"),
262 outputFileExtension = cms.string(
"txt.gz"),
263 maxLinesPerOutputFile = cms.uint32(1024),
264 eventsPerFile = cms.uint32(_eventsPerFile),
267 _hfWriterOutputOnly.clone(
268 outputRegions = cms.vuint32(*[9*ie+i
for i
in range(9)]),
269 outputFileName = cms.string(
"l1HF%s-outputs" % (
"Pos" if ie
else "Neg")),
TEveGeoShape * clone(const TEveElement *element, TEveElement *parent)