L1Trigger
Phase2L1ParticleFlow
src
firmware
data.h
Go to the documentation of this file.
1
#ifndef L1Trigger_Phase2L1ParticleFlow_FIRMWARE_DATA_H
2
#define L1Trigger_Phase2L1ParticleFlow_FIRMWARE_DATA_H
3
4
#include <ap_int.h>
5
6
typedef
ap_int<16>
pt_t
;
7
typedef
ap_int<10>
etaphi_t
;
8
typedef
ap_int<5>
vtx_t
;
9
typedef
ap_uint<3>
particleid_t
;
10
typedef
ap_int<10>
z0_t
;
// 40cm / 0.1
11
typedef
ap_uint<14>
tk2em_dr_t
;
12
typedef
ap_uint<14>
tk2calo_dr_t
;
13
typedef
ap_uint<10>
em2calo_dr_t
;
14
typedef
ap_uint<13>
tk2calo_dq_t
;
15
16
enum
PID
{
PID_Charged
= 0,
PID_Neutral
= 1,
PID_Photon
= 2,
PID_Electron
= 3,
PID_Muon
= 4 };
17
18
// DEFINE MULTIPLICITIES
19
#if defined(REG_HGCal)
20
#define NTRACK 25
21
#define NCALO 20
22
#define NMU 4
23
#define NSELCALO 15
24
#define NALLNEUTRALS NSELCALO
25
// dummy
26
#define NEMCALO 1
27
#define NPHOTON NEMCALO
28
// not used but must be there because used in header files
29
#define NNEUTRALS 1
30
//--------------------------------
31
#elif defined(REG_HGCalNoTK)
32
#define NCALO 12
33
#define NNEUTRALS 8
34
#define NALLNEUTRALS NCALO
35
// dummy
36
#define NMU 1
37
#define NTRACK 1
38
#define NEMCALO 1
39
#define NPHOTON NEMCALO
40
#define NSELCALO 1
41
//--------------------------------
42
#elif defined(REG_HF)
43
#define NCALO 18
44
#define NNEUTRALS 10
45
#define NALLNEUTRALS NCALO
46
// dummy
47
#define NMU 1
48
#define NTRACK 1
49
#define NEMCALO 1
50
#define NPHOTON NEMCALO
51
#define NSELCALO 1
52
//--------------------------------
53
#else // BARREL
54
#ifndef REG_Barrel
55
#ifndef CMSSW_GIT_HASH
56
#warning "No region defined, assuming it's barrel (#define REG_Barrel to suppress this)"
57
#endif
58
#endif
59
#if defined(BOARD_MP7)
60
#warning "MP7 NOT SUPPORTED ANYMORE"
61
#define NTRACK 14
62
#define NCALO 10
63
#define NMU 2
64
#define NEMCALO 10
65
#define NPHOTON NEMCALO
66
#define NSELCALO 10
67
#define NALLNEUTRALS (NPHOTON + NSELCALO)
68
#define NNEUTRALS 15
69
#elif defined(BOARD_CTP7)
70
#error "NOT SUPPORTED ANYMORE"
71
#elif defined(BOARD_KU15P)
72
#define NTRACK 14
73
#define NCALO 10
74
#define NMU 2
75
#define NEMCALO 10
76
#define NPHOTON NEMCALO
77
#define NSELCALO 10
78
#define NALLNEUTRALS (NPHOTON + NSELCALO)
79
#define NNEUTRALS 15
80
#elif defined(BOARD_VCU118)
81
#define NTRACK 22
82
#define NCALO 15
83
#define NEMCALO 13
84
#define NMU 2
85
#define NPHOTON NEMCALO
86
#define NSELCALO 10
87
#define NALLNEUTRALS (NPHOTON + NSELCALO)
88
#define NNEUTRALS 25
89
#else
90
#define NTRACK 22
91
#define NCALO 15
92
#define NEMCALO 13
93
#define NMU 2
94
#define NPHOTON NEMCALO
95
#define NSELCALO 10
96
#define NALLNEUTRALS (NPHOTON + NSELCALO)
97
#define NNEUTRALS 25
98
#endif
99
100
#endif // region
101
102
#if defined(BOARD_MP7)
103
#define PACKING_DATA_SIZE 32
104
#define PACKING_NCHANN 72
105
#elif defined(BOARD_KU15P)
106
#define PACKING_DATA_SIZE 64
107
#define PACKING_NCHANN 42
108
#elif defined(BOARD_VCU118)
109
#define PACKING_DATA_SIZE 64
110
#define PACKING_NCHANN 96
111
#elif defined(BOARD_APD1)
112
#define PACKING_DATA_SIZE 64
113
#define PACKING_NCHANN 96
114
#endif
115
116
struct
CaloObj
{
117
pt_t
hwPt
;
118
etaphi_t
hwEta
,
hwPhi
;
// relative to the region center, at calo
119
};
120
struct
HadCaloObj
:
public
CaloObj
{
121
pt_t
hwEmPt
;
122
bool
hwIsEM
;
123
};
124
inline
void
clear
(
HadCaloObj
&
c
) {
125
c
.hwPt = 0;
126
c
.hwEta = 0;
127
c
.hwPhi = 0;
128
c
.hwEmPt = 0;
129
c
.hwIsEM =
false
;
130
}
131
132
struct
EmCaloObj
{
133
pt_t
hwPt
,
hwPtErr
;
134
etaphi_t
hwEta
,
hwPhi
;
// relative to the region center, at calo
135
};
136
inline
void
clear
(
EmCaloObj
&
c
) {
137
c
.hwPt = 0;
138
c
.hwPtErr = 0;
139
c
.hwEta = 0;
140
c
.hwPhi = 0;
141
}
142
143
struct
TkObj
{
144
pt_t
hwPt
,
hwPtErr
;
145
etaphi_t
hwEta
,
hwPhi
;
// relative to the region center, at calo
146
z0_t
hwZ0
;
147
bool
hwTightQuality
;
148
};
149
inline
void
clear
(
TkObj
&
c
) {
150
c
.hwPt = 0;
151
c
.hwPtErr = 0;
152
c
.hwEta = 0;
153
c
.hwPhi = 0;
154
c
.hwZ0 = 0;
155
c
.hwTightQuality =
false
;
156
}
157
158
struct
MuObj
{
159
pt_t
hwPt
,
hwPtErr
;
160
etaphi_t
hwEta
,
hwPhi
;
// relative to the region center, at vtx(?)
161
};
162
inline
void
clear
(
MuObj
&
c
) {
163
c
.hwPt = 0;
164
c
.hwPtErr = 0;
165
c
.hwEta = 0;
166
c
.hwPhi = 0;
167
}
168
169
struct
PFChargedObj
{
170
pt_t
hwPt
;
171
etaphi_t
hwEta
,
hwPhi
;
// relative to the region center, at calo
172
particleid_t
hwId
;
173
z0_t
hwZ0
;
174
};
175
inline
void
clear
(
PFChargedObj
&
c
) {
176
c
.hwPt = 0;
177
c
.hwEta = 0;
178
c
.hwPhi = 0;
179
c
.hwId = 0;
180
c
.hwZ0 = 0;
181
}
182
183
struct
PFNeutralObj
{
184
pt_t
hwPt
;
185
etaphi_t
hwEta
,
hwPhi
;
// relative to the region center, at calo
186
particleid_t
hwId
;
187
pt_t
hwPtPuppi
;
188
};
189
inline
void
clear
(
PFNeutralObj
&
c
) {
190
c
.hwPt = 0;
191
c
.hwEta = 0;
192
c
.hwPhi = 0;
193
c
.hwId = 0;
194
c
.hwPtPuppi = 0;
195
}
196
197
//TMUX
198
#define NETA_TMUX 2
199
#define NPHI_TMUX 1
200
/* #define TMUX_IN 36 */
201
/* #define TMUX_OUT 18 */
202
#define TMUX_IN 18
203
#define TMUX_OUT 6
204
#define NTRACK_TMUX (NTRACK * TMUX_OUT * NETA_TMUX * NPHI_TMUX)
205
#define NCALO_TMUX (NCALO * TMUX_OUT * NETA_TMUX * NPHI_TMUX)
206
#define NEMCALO_TMUX (NEMCALO * TMUX_OUT * NETA_TMUX * NPHI_TMUX)
207
#define NMU_TMUX (NMU * TMUX_OUT * NETA_TMUX * NPHI_TMUX)
208
209
#endif
PID_Muon
Definition:
data.h:16
CaloObj::hwEta
etaphi_t hwEta
Definition:
data.h:118
TkObj::hwZ0
z0_t hwZ0
Definition:
data.h:146
TkObj::hwPhi
etaphi_t hwPhi
Definition:
data.h:145
PID_Neutral
Definition:
data.h:16
HadCaloObj::hwIsEM
bool hwIsEM
Definition:
data.h:122
PFChargedObj::hwPt
pt_t hwPt
Definition:
data.h:170
MuObj::hwPhi
etaphi_t hwPhi
Definition:
data.h:160
PFNeutralObj::hwPhi
etaphi_t hwPhi
Definition:
data.h:185
CaloObj::hwPt
pt_t hwPt
Definition:
data.h:117
PFNeutralObj::hwPtPuppi
pt_t hwPtPuppi
Definition:
data.h:187
CaloObj
Definition:
data.h:116
EmCaloObj::hwPhi
etaphi_t hwPhi
Definition:
data.h:134
PID_Photon
Definition:
data.h:16
PID
PID
Definition:
data.h:16
PFChargedObj::hwId
particleid_t hwId
Definition:
data.h:172
EmCaloObj::hwPt
pt_t hwPt
Definition:
data.h:133
etaphi_t
ap_int< 10 > etaphi_t
Definition:
data.h:7
EmCaloObj
Definition:
data.h:132
HadCaloObj::hwEmPt
pt_t hwEmPt
Definition:
data.h:121
tk2calo_dq_t
ap_uint< 13 > tk2calo_dq_t
Definition:
data.h:14
PFNeutralObj::hwEta
etaphi_t hwEta
Definition:
data.h:185
PFChargedObj::hwPhi
etaphi_t hwPhi
Definition:
data.h:171
tk2em_dr_t
ap_uint< 14 > tk2em_dr_t
Definition:
data.h:11
PFChargedObj
Definition:
data.h:169
vtx_t
ap_int< 5 > vtx_t
Definition:
data.h:8
PFNeutralObj::hwPt
pt_t hwPt
Definition:
data.h:184
clear
void clear(HadCaloObj &c)
Definition:
data.h:124
PFNeutralObj
Definition:
data.h:183
TkObj
Definition:
data.h:143
pt_t
ap_int< 16 > pt_t
Definition:
data.h:6
em2calo_dr_t
ap_uint< 10 > em2calo_dr_t
Definition:
data.h:13
MuObj
Definition:
data.h:158
HltBtagPostValidation_cff.c
c
Definition:
HltBtagPostValidation_cff.py:31
tk2calo_dr_t
ap_uint< 14 > tk2calo_dr_t
Definition:
data.h:12
PFChargedObj::hwZ0
z0_t hwZ0
Definition:
data.h:173
TkObj::hwPtErr
pt_t hwPtErr
Definition:
data.h:144
PFNeutralObj::hwId
particleid_t hwId
Definition:
data.h:186
MuObj::hwEta
etaphi_t hwEta
Definition:
data.h:160
PID_Charged
Definition:
data.h:16
PFChargedObj::hwEta
etaphi_t hwEta
Definition:
data.h:171
PID_Electron
Definition:
data.h:16
EmCaloObj::hwPtErr
pt_t hwPtErr
Definition:
data.h:133
z0_t
ap_int< 10 > z0_t
Definition:
data.h:10
HadCaloObj
Definition:
data.h:120
TkObj::hwEta
etaphi_t hwEta
Definition:
data.h:145
TkObj::hwPt
pt_t hwPt
Definition:
data.h:144
CaloObj::hwPhi
etaphi_t hwPhi
Definition:
data.h:118
MuObj::hwPt
pt_t hwPt
Definition:
data.h:159
particleid_t
ap_uint< 3 > particleid_t
Definition:
data.h:9
TkObj::hwTightQuality
bool hwTightQuality
Definition:
data.h:147
EmCaloObj::hwEta
etaphi_t hwEta
Definition:
data.h:134
MuObj::hwPtErr
pt_t hwPtErr
Definition:
data.h:159
Generated for CMSSW Reference Manual by
1.8.16