CMS 3D CMS Logo

l1ctLayer1_patternWriters_cff.py
Go to the documentation of this file.
1 import FWCore.ParameterSet.Config as cms
2 
3 eventsPerFile_ = 12
4 gttLatency_ = 156+120
5 gttNumberOfPVs_ = 10
6 
7 
9 barrelWriterOutputOnly_ = cms.PSet(
10  partition = cms.string("Barrel"),
11  outputLinksPuppi = cms.vuint32(*range(6)),
12  outputLinkEgamma = cms.int32(6),
13  nEgammaObjectsOut = cms.uint32(16),
14  nOutputFramesPerBX = cms.uint32(9),
15  fileFormat = cms.string("EMPv2"),
16  outputFileExtension = cms.string("txt.gz"),
17  maxLinesPerOutputFile = cms.uint32(1024),
18  eventsPerFile = cms.uint32(eventsPerFile_),
19 )
20 
21 barrelWriterOutputOnlyEtaConfigs = [
22  barrelWriterOutputOnly_.clone(
23  outputRegions = cms.vuint32(*[18*ie+i for i in range(18)]),
24  outputFileName = cms.string("l1BarrelEta%d-outputs-ideal" % (ie+1)),
25  outputBoard = cms.int32(-1),
26  outputLinkEgamma = cms.int32(-1),
27  ) for ie in range(3)
28 ]
29 
30 barrelWriterOutputOnlyPhiConfigs = [
31  barrelWriterOutputOnly_.clone(
32  outputRegions = cms.vuint32(*[3*ip+9*ie+i for ie in range(6) for i in range(3) ]),
33  outputBoard = cms.int32(ip),
34  outputFileName = cms.string("l1BarrelPhi%d-outputs-ideal" % (ip+1))
35  ) for ip in range(3)
36 ]
37 
38 barrel9WriterOutputOnlyPhiConfigs = [
39  barrelWriterOutputOnly_.clone(
40  outputRegions = cms.vuint32(*[3*ip+9*ie+i for ie in range(3) for i in range(3) ]),
41  outputBoard = cms.int32(ip),
42  outputFileName = cms.string("l1Barrel9Phi%d-outputs-ideal" % (ip+1))
43  ) for ip in range(3)
44 ]
45 
46 barrelWriterConfigs = barrelWriterOutputOnlyPhiConfigs # + barrelWriterOutputOnlyEtaConfigs
47 barrel9WriterConfigs = [] #barrel9WriterOutputOnlyPhiConfigs
48 
49 
50 
52 hgcalWriterConfig_ = cms.PSet(
53  partition = cms.string("HGCal"),
54  outputRegions = cms.vuint32(*[i+9 for i in range(9)]),
55  outputBoard = cms.int32(1),
56  nEgammaObjectsOut = cms.uint32(16),
57  nInputFramesPerBX = cms.uint32(9),
58  nOutputFramesPerBX = cms.uint32(9),
59  fileFormat = cms.string("EMPv2"),
60  inputFileExtension = cms.string("txt.gz"),
61  outputFileExtension = cms.string("txt.gz"),
62  maxLinesPerInputFile = cms.uint32(1024),
63  maxLinesPerOutputFile = cms.uint32(1024),
64  eventsPerFile = cms.uint32(eventsPerFile_),
65  tfTimeSlices = cms.VPSet(*[cms.PSet(tfSectors = cms.VPSet()) for i in range(3)]),
66  hgcTimeSlices = cms.VPSet(*[cms.PSet(hgcSectors = cms.VPSet()) for i in range(3)]),
67  gmtTimeSlices = cms.VPSet(cms.PSet(),cms.PSet(),cms.PSet()),
68  gmtNumberOfMuons = cms.uint32(12),
69  gttLink = cms.int32(-1),
70  gttLatency = cms.uint32(gttLatency_),
71  gttNumberOfPVs = cms.uint32(gttNumberOfPVs_)
72 )
73 
74 hgcalPosIdealWriterConfig = hgcalWriterConfig_.clone()
75 for t in range(3):
76  hgcalPosIdealWriterConfig.tfTimeSlices[t].tfSectors += [ cms.PSet(tfLink = cms.int32(-1)) for i in range(9) ] # neg
77  hgcalPosIdealWriterConfig.tfTimeSlices[t].tfSectors += [ cms.PSet(tfLink = cms.int32(3*i+t)) for i in range(9) ] # pos
78  hgcalPosIdealWriterConfig.hgcTimeSlices[t].hgcSectors += [ cms.PSet(hgcLinks = cms.vint32(-1,-1,-1,-1)) for i in range(3) ] # neg
79  hgcalPosIdealWriterConfig.hgcTimeSlices[t].hgcSectors += [ cms.PSet(hgcLinks = cms.vint32(*[27+12*i+4*t+j for j in range(4)])) for i in range(3) ] # pos
80  hgcalPosIdealWriterConfig.gmtTimeSlices[t].gmtLink = cms.int32(27+36+t)
81 hgcalPosIdealWriterConfig.gttLink = 27+36+3
82 hgcalPosIdealWriterConfig.outputLinksPuppi = cms.vuint32(0,1,2)
83 hgcalPosIdealWriterConfig.outputLinkEgamma = cms.int32(5)
84 hgcalPosIdealWriterConfig.inputFileName = cms.string("l1HGCalPos-inputs-ideal")
85 hgcalPosIdealWriterConfig.outputFileName = cms.string("l1HGCalPos-outputs-ideal")
86 hgcalNegIdealWriterConfig = hgcalPosIdealWriterConfig.clone(
87  inputFileName = "",
88  outputFileName = "l1HGCalNeg-outputs-ideal",
89  outputRegions = [i for i in range(9)],
90  outputBoard = 0,
91 )
92 
93 hgcalPosVU9PB904egWriterConfig = hgcalWriterConfig_.clone()
94 for t in range(3):
95  hgcalPosVU9PB904egWriterConfig.tfTimeSlices[t].tfSectors += [ cms.PSet(tfLink = cms.int32(-1)) for i in range(9) ] # neg
96  hgcalPosVU9PB904egWriterConfig.tfTimeSlices[t].tfSectors += [ cms.PSet(tfLink = cms.int32(3*i+t+4*2)) for i in range(4) ] # pos, left quads
97  hgcalPosVU9PB904egWriterConfig.tfTimeSlices[t].tfSectors += [ cms.PSet(tfLink = cms.int32(3*i+t+4*25)) for i in range(5) ] # pos, right quads
98  hgcalPosVU9PB904egWriterConfig.hgcTimeSlices[t].hgcSectors += [ cms.PSet(hgcLinks = cms.vint32(-1,-1,-1,-1)) for i in range(3) ] # neg
99  hgcalPosVU9PB904egWriterConfig.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) ] # pos
100  hgcalPosVU9PB904egWriterConfig.gmtTimeSlices[t].gmtLink = cms.int32(4+t)
101 hgcalPosVU9PB904egWriterConfig.gttLink = 4+3
102 hgcalPosVU9PB904egWriterConfig.outputLinksPuppi = cms.vuint32(56,57,58)
103 hgcalPosVU9PB904egWriterConfig.outputLinkEgamma = cms.int32(59)
104 hgcalPosVU9PB904egWriterConfig.inputFileName = cms.string("l1HGCalPos-inputs-vu9p_B904eg")
105 hgcalPosVU9PB904egWriterConfig.outputFileName = cms.string("l1HGCalPos-outputs-vu9p_B904eg")
106 
107 hgcalPosVU13PWriterConfig = hgcalWriterConfig_.clone()
108 for t in range(3):
109  hgcalPosVU13PWriterConfig.tfTimeSlices[t].tfSectors += [ cms.PSet(tfLink = cms.int32(-1)) for i in range(9) ] # neg
110  hgcalPosVU13PWriterConfig.tfTimeSlices[t].tfSectors += [ cms.PSet(tfLink = cms.int32(3*i+t+4*0)) for i in range(5) ] # pos, left quads
111  hgcalPosVU13PWriterConfig.tfTimeSlices[t].tfSectors += [ cms.PSet(tfLink = cms.int32(3*i+t+4*28)) for i in range(4) ] # pos, right quads
112  hgcalPosVU13PWriterConfig.hgcTimeSlices[t].hgcSectors += [ cms.PSet(hgcLinks = cms.vint32(-1,-1,-1,-1)) for i in range(3) ] # neg
113  for isec,q0 in (0,12),(1,17),(2,20):
114  hgcalPosVU13PWriterConfig.hgcTimeSlices[t].hgcSectors += [ cms.PSet(hgcLinks = cms.vint32(*[4*q0+4*t+j for j in range(4)])) ] # pos
115  hgcalPosVU13PWriterConfig.gmtTimeSlices[t].gmtLink = cms.int32(4*27+t)
116 hgcalPosVU13PWriterConfig.gttLink = 4*27+3
117 hgcalPosVU13PWriterConfig.outputLinksPuppi = cms.vuint32(0,1,2)
118 hgcalPosVU13PWriterConfig.outputLinkEgamma = cms.int32(3)
119 hgcalPosVU13PWriterConfig.inputFileName = cms.string("l1HGCalPos-inputs-vu13p")
120 hgcalPosVU13PWriterConfig.outputFileName = cms.string("l1HGCalPos-outputs-vu13p")
121 hgcalNegVU13PWriterConfig = hgcalWriterConfig_.clone()
122 for t in range(3):
123  hgcalNegVU13PWriterConfig.tfTimeSlices[t].tfSectors += [ cms.PSet(tfLink = cms.int32(3*i+t+4*0)) for i in range(5) ] # neg, left quads
124  hgcalNegVU13PWriterConfig.tfTimeSlices[t].tfSectors += [ cms.PSet(tfLink = cms.int32(3*i+t+4*28)) for i in range(4) ] # neg, right quads
125  hgcalNegVU13PWriterConfig.tfTimeSlices[t].tfSectors += [ cms.PSet(tfLink = cms.int32(-1)) for i in range(9) ] # pos
126  for isec,q0 in (0,12),(1,17),(2,20):
127  hgcalNegVU13PWriterConfig.hgcTimeSlices[t].hgcSectors += [ cms.PSet(hgcLinks = cms.vint32(*[4*q0+4*t+j for j in range(4)])) ] # neg
128  hgcalNegVU13PWriterConfig.hgcTimeSlices[t].hgcSectors += [ cms.PSet(hgcLinks = cms.vint32(-1,-1,-1,-1)) for i in range(3) ] # pos
129  hgcalNegVU13PWriterConfig.gmtTimeSlices[t].gmtLink = cms.int32(4*27+t)
130 hgcalNegVU13PWriterConfig.gttLink = 4*27+3
131 hgcalNegVU13PWriterConfig.outputLinksPuppi = cms.vuint32(0,1,2)
132 hgcalNegVU13PWriterConfig.outputLinkEgamma = cms.int32(3)
133 hgcalNegVU13PWriterConfig.inputFileName = cms.string("l1HGCalNeg-inputs-vu13p")
134 hgcalNegVU13PWriterConfig.outputFileName = cms.string("l1HGCalNeg-outputs-vu13p")
135 
136 
137 
138 hgcalWriterConfigs = [
139  hgcalPosIdealWriterConfig,
140  hgcalNegIdealWriterConfig,
141  hgcalPosVU9PB904egWriterConfig,
142  hgcalPosVU13PWriterConfig,
143  hgcalNegVU13PWriterConfig
144 ]
145 
146 
148 hgcalNoTKWriterOutputOnlyConfig = cms.PSet(
149  partition = cms.string("HGCalNoTk"),
150  outputRegions = cms.vuint32(*range(18)),
151  nOutputFramesPerBX = cms.uint32(9),
152  fileFormat = cms.string("EMPv2"),
153  inputFileExtension = cms.string("txt.gz"),
154  outputFileExtension = cms.string("txt.gz"),
155  maxLinesPerOutputFile = cms.uint32(1024),
156  eventsPerFile = cms.uint32(eventsPerFile_),
157  outputLinksPuppi = cms.vuint32(0,1,2,4),
158  outputFileName = cms.string("l1HGCalNoTk-outputs-ideal")
159 )
160 
161 hgcalNoTKWriterConfigs = [
162  hgcalNoTKWriterOutputOnlyConfig
163 ]
164 
165 
169 hfWriterOutputOnly_ = cms.PSet(
170  partition = cms.string("HF"),
171  outputLinksPuppi = cms.vuint32(*range(3)),
172  nOutputFramesPerBX = cms.uint32(9),
173  fileFormat = cms.string("EMPv2"),
174  outputFileExtension = cms.string("txt.gz"),
175  maxLinesPerOutputFile = cms.uint32(1024),
176  eventsPerFile = cms.uint32(eventsPerFile_),
177 )
178 hfWriterConfigs = [
179  hfWriterOutputOnly_.clone(
180  outputRegions = cms.vuint32(*[9*ie+i for i in range(9)]),
181  outputFileName = cms.string("l1HF%s-outputs-ideal" % ("Pos" if ie else "Neg")),
182  ) for ie in range(2)
183 ]
184 
185