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