CMS 3D CMS Logo

l1ctLayer2EG_cff.py
Go to the documentation of this file.
1 import FWCore.ParameterSet.Config as cms
2 
3 from L1Trigger.Phase2L1ParticleFlow.l1tDeregionizerProducer_cfi import l1tDeregionizerProducer as l1tLayer2Deregionizer
4 
5 l1tLayer2EG = cms.EDProducer(
6  "L1TCtL2EgProducer",
7  tkElectrons=cms.VPSet(
8  cms.PSet(
9  pfProducer=cms.InputTag("l1tLayer1HGCal", 'L1TkElePerBoard'),
10  regions=cms.vint32(3, 4)
11  ),
12  cms.PSet(
13  pfProducer=cms.InputTag("l1tLayer1Barrel", 'L1TkElePerBoard'),
14  regions=cms.vint32(0, 1, 2)
15  ),
16  ),
17  tkEms=cms.VPSet(
18  cms.PSet(
19  pfProducer=cms.InputTag("l1tLayer1HGCal", 'L1TkEmPerBoard'),
20  regions=cms.vint32(3, 4)
21  ),
22  cms.PSet(
23  pfProducer=cms.InputTag("l1tLayer1HGCalNoTK", 'L1TkEmPerBoard'),
24  regions=cms.vint32(-1)
25  ),
26  cms.PSet(
27  pfProducer=cms.InputTag("l1tLayer1Barrel", 'L1TkEmPerBoard'),
28  regions=cms.vint32(0, 1, 2)
29  ),
30  ),
31  tkEgs=cms.VPSet(
32  cms.PSet(
33  pfProducer=cms.InputTag("l1tLayer1HGCal", 'L1Eg'),
34  regions=cms.vint32(-1)
35  ),
36  cms.PSet(
37  pfProducer=cms.InputTag("l1tLayer1HGCalNoTK", 'L1Eg'),
38  regions=cms.vint32(-1)
39  ),
40  ),
41  l1PFObjects = cms.InputTag("l1tLayer2Deregionizer", "Puppi"),
42  egStaInstanceLabel=cms.string("L1CtEgEE"),
43  tkEmInstanceLabel=cms.string("L1CtTkEm"),
44  tkEleInstanceLabel=cms.string("L1CtTkElectron"),
45  sorter=cms.PSet(
46  nREGIONS=cms.uint32(5),
47  nEGPerRegion=cms.uint32(16),
48  nEGOut=cms.uint32(12),
49  debug=cms.untracked.uint32(0),
50  ),
51  encoder=cms.PSet(
52  nTKELE_OUT=cms.uint32(12),
53  nTKPHO_OUT=cms.uint32(12),
54  ),
55  puppiIsoParametersTkEm = cms.PSet(
56  pfIsoType = cms.string("PUPPI"),
57  pfPtMin = cms.double(1.),
58  dZ = cms.double(0.6),
59  dRMin = cms.double(0.07),
60  dRMax = cms.double(0.3),
61  pfCandReuse = cms.bool(True)
62  ),
63  puppiIsoParametersTkEle = cms.PSet(
64  pfIsoType = cms.string("PUPPI"),
65  pfPtMin = cms.double(1.),
66  dZ = cms.double(0.6),
67  dRMin = cms.double(0.03),
68  dRMax = cms.double(0.2),
69  pfCandReuse = cms.bool(True)
70  ),
71  writeInPattern=cms.bool(False),
72  writeOutPattern=cms.bool(False),
73  inPatternFile=cms.PSet(
74  nFramesPerBX=cms.uint32(9), # 360 MHz clock or 25 Gb/s link
75  format=cms.string("EMPv2"),
76  outputFilename=cms.string("L1TCTL2EG_InPattern"),
77  outputFileExtension=cms.string("txt.gz"),
78  TMUX=cms.uint32(6),
79  maxLinesPerFile=cms.uint32(1024),
80  eventsPerFile=cms.uint32(12),
81  channels=cms.VPSet(
82  cms.PSet(
83  TMUX=cms.uint32(6),
84  nWords=cms.uint32(48), # = 16*2words ele + 16words photons
85  interface=cms.string("eglayer1Barrel"),
86  id=cms.uint32(0),
87  channels=cms.vuint32(0)
88  ),
89  cms.PSet(
90  TMUX=cms.uint32(6),
91  nWords=cms.uint32(48),
92  interface=cms.string("eglayer1Barrel"),
93  id=cms.uint32(1),
94  channels=cms.vuint32(1)
95  ),
96  cms.PSet(
97  TMUX=cms.uint32(6),
98  nWords=cms.uint32(48),
99  interface=cms.string("eglayer1Barrel"),
100  id=cms.uint32(2),
101  channels=cms.vuint32(2)
102  ),
103  cms.PSet(
104  TMUX=cms.uint32(6),
105  nWords=cms.uint32(48),
106  interface=cms.string("eglayer1Endcap"),
107  id=cms.uint32(3),
108  channels=cms.vuint32(3)
109  ),
110  cms.PSet(
111  TMUX=cms.uint32(6),
112  nWords=cms.uint32(48),
113  interface=cms.string("eglayer1Endcap"),
114  id=cms.uint32(4),
115  channels=cms.vuint32(4)
116  ),
117 
118  )
119  ),
120  outPatternFile=cms.PSet(
121  nFramesPerBX=cms.uint32(9), # 360 MHz clock or 25 Gb/s link
122  format=cms.string("EMPv2"),
123  outputFilename=cms.string("L1TCTL2EG_OutPattern"),
124  outputFileExtension=cms.string("txt.gz"),
125  TMUX=cms.uint32(6),
126  maxLinesPerFile=cms.uint32(1024),
127  eventsPerFile=cms.uint32(12),
128  channels=cms.VPSet(
129  cms.PSet(
130  TMUX=cms.uint32(6),
131  nWords=cms.uint32(36), # 36 = 12*3/2words ele + 12*3/2words photons
132  interface=cms.string("eglayer2"),
133  id=cms.uint32(0),
134  channels=cms.vuint32(0)
135  )
136  )
137  ),
138  # NOTE: to write out the GT input from 6TS
139  # outPatternFile=cms.PSet(
140  # nFramesPerBX=cms.uint32(9), # 360 MHz clock or 25 Gb/s link
141  # format=cms.string("EMPv2"),
142  # outputFilename=cms.string("L1TCTL2EG_ToGTPattern"),
143  # outputFileExtension=cms.string("txt.gz"),
144  # TMUX=cms.uint32(1),
145  # maxLinesPerFile=cms.uint32(1024),
146  # channels=cms.VPSet(
147  # cms.PSet(
148  # TMUX=cms.uint32(6),
149  # nWords=cms.uint32(36), # 36 = 12*3/2words ele + 12*3/2words phhotons
150  # interface=cms.string("eglayer2"),
151  # id=cms.uint32(0),
152  # channels=cms.vuint32(0, 1, 2, 3, 4, 5)
153  # )
154  # )
155  # )
156 )
157 
158 l1tLayer2EGElliptic = l1tLayer2EG.clone(
159  tkElectrons=cms.VPSet(
160  cms.PSet(
161  pfProducer=cms.InputTag("l1tLayer1HGCalElliptic", 'L1TkElePerBoard'),
162  regions=cms.vint32(3, 4)
163  ),
164  cms.PSet(
165  pfProducer=cms.InputTag("l1tLayer1Barrel", 'L1TkElePerBoard'),
166  regions=cms.vint32(0, 1, 2)
167  ),
168  ),
169  tkEms=cms.VPSet(
170  cms.PSet(
171  pfProducer=cms.InputTag("l1tLayer1HGCalElliptic", 'L1TkEmPerBoard'),
172  regions=cms.vint32(3, 4)
173  ),
174  cms.PSet(
175  pfProducer=cms.InputTag("l1tLayer1HGCalNoTK", 'L1TkEmPerBoard'),
176  regions=cms.vint32(-1)
177  ),
178  cms.PSet(
179  pfProducer=cms.InputTag("l1tLayer1Barrel", 'L1TkEmPerBoard'),
180  regions=cms.vint32(0, 1, 2)
181  ),
182  ),
183  tkEgs=cms.VPSet(
184  cms.PSet(
185  pfProducer=cms.InputTag("l1tLayer1HGCalElliptic", 'L1Eg'),
186  regions=cms.vint32(-1)
187  ),
188  cms.PSet(
189  pfProducer=cms.InputTag("l1tLayer1HGCalNoTK", 'L1Eg'),
190  regions=cms.vint32(-1)
191  ),
192  ),
193 )
194 
195 # EG Layer2 with Layer1 @ TMUX18
196 l1tLayer2EGTM18 = l1tLayer2EG.clone(
197  tkElectrons=cms.VPSet(
198  cms.PSet(
199  pfProducer=cms.InputTag("l1tLayer1HGCalTM18", 'L1TkElePerBoard'),
200  regions=cms.vint32(3, 4)
201  ),
202  cms.PSet(
203  pfProducer=cms.InputTag("l1tLayer1BarrelSerenityTM18", 'L1TkElePerBoard'),
204  regions=cms.vint32(0, 1, 2)
205  ),
206  ),
207  tkEms=cms.VPSet(
208  cms.PSet(
209  pfProducer=cms.InputTag("l1tLayer1HGCalTM18", 'L1TkEmPerBoard'),
210  regions=cms.vint32(3, 4)
211  ),
212  cms.PSet(
213  pfProducer=cms.InputTag("l1tLayer1HGCalNoTKTM18", 'L1TkEmPerBoard'),
214  regions=cms.vint32(-1)
215  ),
216  cms.PSet(
217  pfProducer=cms.InputTag("l1tLayer1BarrelSerenityTM18", 'L1TkEmPerBoard'),
218  regions=cms.vint32(0, 1, 2)
219  ),
220  ),
221  tkEgs=cms.VPSet(
222  cms.PSet(
223  pfProducer=cms.InputTag("l1tLayer1HGCalTM18", 'L1Eg'),
224  regions=cms.vint32(-1)
225  ),
226  cms.PSet(
227  pfProducer=cms.InputTag("l1tLayer1HGCalNoTKTM18", 'L1Eg'),
228  regions=cms.vint32(-1)
229  ),
230  ),
231 )
232 
233 l1tLayer2EGTM18.inPatternFile.outputFilename = "L1TCTL2EG_TMUX18_InPattern"
234 l1tLayer2EGTM18.inPatternFile.channels = cms.VPSet(
235  cms.PSet(
236  TMUX=cms.uint32(18),
237  nWords=cms.uint32(156), # = (16*2words ele + 16words photons) * 3 (regions) every 6 BX (54 words) = 48+6(empty)+48+6(empty)+48 = 156
238  interface=cms.string("eglayer1Barrel"),
239  id=cms.uint32(0),
240  channels=cms.vuint32(0,2,4)
241  ),
242  cms.PSet(
243  TMUX=cms.uint32(18),
244  nWords=cms.uint32(129), # (16*2words ele + 16words photons) * 2 (regions) every 9 BX (81 words) = 48+33(empty)+48
245  interface=cms.string("eglayer1Endcap"),
246  id=cms.uint32(1),
247  channels=cms.vuint32(1,3,5)
248  ),
249 )
250 l1tLayer2EGTM18.outPatternFile.outputFilename = 'L1TCTL2EG_TMUX18_OutPattern'
251 # FIXME: we need to schedule a new deregionizer for TM18
252 # l1tLayer2EGTM18.l1PFObjects = cms.InputTag("l1tLayer2Deregionizer", "Puppi"),
253 
254 
255 L1TLayer2EGTask = cms.Task(
256  l1tLayer2Deregionizer,
257  l1tLayer2EG,
258  l1tLayer2EGElliptic
259 )