1 |
econte |
1.1 |
#ifndef __L1Analysis_L1AnalysisCSCTFDataFormat_H__
|
2 |
|
|
#define __L1Analysis_L1AnalysisCSCTFDataFormat_H__
|
3 |
|
|
|
4 |
|
|
//-------------------------------------------------------------------------------
|
5 |
|
|
// Created 08/03/2010 - E. Conte, A.-C. Le Bihan
|
6 |
|
|
//
|
7 |
|
|
//
|
8 |
|
|
// Original code : UserCode/L1TriggerDPG/L1NtupleProducer - Gian Piero Di Giovanni
|
9 |
|
|
//-------------------------------------------------------------------------------
|
10 |
|
|
#include "TMatrixD.h"
|
11 |
|
|
#include <vector>
|
12 |
|
|
|
13 |
|
|
namespace L1Analysis
|
14 |
|
|
{
|
15 |
|
|
struct L1AnalysisCSCTFDataFormat
|
16 |
|
|
{
|
17 |
|
|
L1AnalysisCSCTFDataFormat(){Reset();};
|
18 |
|
|
~L1AnalysisCSCTFDataFormat(){};
|
19 |
|
|
|
20 |
|
|
static const int MAXCSCTFTR = 60;
|
21 |
|
|
static const int MAXCSCTFLCTSTR = 4;
|
22 |
|
|
|
23 |
|
|
void Reset()
|
24 |
|
|
{
|
25 |
|
|
trSize = 0;
|
26 |
|
|
trEndcap.clear();
|
27 |
|
|
trSector.clear();
|
28 |
|
|
|
29 |
|
|
trBx.clear();
|
30 |
|
|
|
31 |
|
|
// if set to 1 track has lct from the station
|
32 |
|
|
trME1ID.clear();
|
33 |
|
|
trME2ID.clear();
|
34 |
|
|
trME3ID.clear();
|
35 |
|
|
trME4ID.clear();
|
36 |
|
|
trMB1ID.clear();
|
37 |
|
|
|
38 |
econte |
1.2 |
trME1TBin.clear();
|
39 |
|
|
trME2TBin.clear();
|
40 |
|
|
trME3TBin.clear();
|
41 |
|
|
trME4TBin.clear();
|
42 |
|
|
trMB1TBin.clear();
|
43 |
|
|
|
44 |
econte |
1.1 |
trOutputLink.clear();
|
45 |
|
|
|
46 |
|
|
// some input of the PT LUTs
|
47 |
|
|
trCharge.clear();
|
48 |
|
|
trChargeValid.clear();
|
49 |
|
|
trForR.clear();
|
50 |
|
|
trPhi23.clear();
|
51 |
|
|
trPhi12.clear();
|
52 |
|
|
trPhiSign.clear();
|
53 |
|
|
|
54 |
|
|
// in bits...
|
55 |
|
|
trEtaBit.clear();
|
56 |
|
|
trPhiBit.clear();
|
57 |
|
|
trPtBit.clear();
|
58 |
|
|
|
59 |
|
|
// ... converted
|
60 |
|
|
trEta.clear();
|
61 |
|
|
trPhi.clear();
|
62 |
|
|
trPhi_02PI.clear();
|
63 |
|
|
trPt.clear();
|
64 |
|
|
|
65 |
|
|
// + useful information
|
66 |
|
|
trMode.clear();
|
67 |
|
|
trQuality.clear();
|
68 |
|
|
|
69 |
|
|
//----------------------------------------------------------------------
|
70 |
|
|
// LCT (STUBS FORMING THE TRACK)
|
71 |
|
|
//----------------------------------------------------------------------
|
72 |
|
|
trNumLCTs.clear();
|
73 |
|
|
|
74 |
|
|
trLctEndcap.Clear();
|
75 |
|
|
trLctSector.Clear();
|
76 |
|
|
trLctSubSector.Clear();
|
77 |
|
|
trLctBx.Clear();
|
78 |
|
|
trLctBx0.Clear();
|
79 |
|
|
|
80 |
|
|
trLctStation.Clear();
|
81 |
|
|
trLctRing.Clear();
|
82 |
|
|
trLctChamber.Clear();
|
83 |
|
|
trLctTriggerCSCID.Clear();
|
84 |
|
|
trLctFpga.Clear();
|
85 |
|
|
|
86 |
|
|
trLctlocalPhi.Clear();
|
87 |
kropiv |
1.3 |
//trLctlocalPhi_bend.Clear();
|
88 |
|
|
trLctCLCT_pattern.Clear();
|
89 |
|
|
trLctQuality.Clear();
|
90 |
econte |
1.1 |
trLctglobalPhi.Clear();
|
91 |
|
|
trLctglobalEta.Clear();
|
92 |
|
|
|
93 |
|
|
trLctstripNum.Clear();
|
94 |
|
|
trLctwireGroup.Clear();
|
95 |
|
|
|
96 |
|
|
trLctEndcap.Clear();
|
97 |
|
|
trLctSector.Clear();
|
98 |
|
|
trLctSubSector.Clear();
|
99 |
|
|
trLctBx.Clear();
|
100 |
|
|
trLctBx0.Clear();
|
101 |
|
|
|
102 |
|
|
trLctStation.Clear();
|
103 |
|
|
trLctRing.Clear();
|
104 |
|
|
trLctChamber.Clear();
|
105 |
|
|
trLctTriggerCSCID.Clear();
|
106 |
|
|
trLctFpga.Clear();
|
107 |
|
|
|
108 |
|
|
trLctlocalPhi.Clear();
|
109 |
kropiv |
1.3 |
//trLctlocalPhi_bend.Clear();
|
110 |
|
|
trLctCLCT_pattern.Clear();
|
111 |
|
|
trLctQuality.Clear();
|
112 |
econte |
1.1 |
trLctglobalPhi.Clear();
|
113 |
|
|
trLctglobalEta.Clear();
|
114 |
|
|
|
115 |
|
|
trLctstripNum.Clear();
|
116 |
|
|
trLctwireGroup.Clear();
|
117 |
|
|
|
118 |
|
|
//---------------------
|
119 |
|
|
|
120 |
|
|
trLctEndcap.ResizeTo(MAXCSCTFTR,MAXCSCTFLCTSTR);
|
121 |
|
|
trLctSector.ResizeTo(MAXCSCTFTR,MAXCSCTFLCTSTR);
|
122 |
|
|
trLctSubSector.ResizeTo(MAXCSCTFTR,MAXCSCTFLCTSTR);
|
123 |
|
|
trLctBx.ResizeTo(MAXCSCTFTR,MAXCSCTFLCTSTR);
|
124 |
|
|
trLctBx0.ResizeTo(MAXCSCTFTR,MAXCSCTFLCTSTR);
|
125 |
|
|
|
126 |
|
|
trLctStation.ResizeTo(MAXCSCTFTR,MAXCSCTFLCTSTR);
|
127 |
|
|
trLctRing.ResizeTo(MAXCSCTFTR,MAXCSCTFLCTSTR);
|
128 |
|
|
trLctChamber.ResizeTo(MAXCSCTFTR,MAXCSCTFLCTSTR);
|
129 |
|
|
trLctTriggerCSCID.ResizeTo(MAXCSCTFTR,MAXCSCTFLCTSTR);
|
130 |
|
|
trLctFpga.ResizeTo(MAXCSCTFTR,MAXCSCTFLCTSTR);
|
131 |
|
|
|
132 |
|
|
trLctlocalPhi.ResizeTo(MAXCSCTFTR,MAXCSCTFLCTSTR);
|
133 |
kropiv |
1.3 |
//trLctlocalPhi_bend.ResizeTo(MAXCSCTFTR,MAXCSCTFLCTSTR);
|
134 |
|
|
trLctCLCT_pattern.ResizeTo(MAXCSCTFTR,MAXCSCTFLCTSTR);
|
135 |
|
|
trLctQuality.ResizeTo(MAXCSCTFTR,MAXCSCTFLCTSTR);
|
136 |
econte |
1.1 |
trLctglobalPhi.ResizeTo(MAXCSCTFTR,MAXCSCTFLCTSTR);
|
137 |
|
|
trLctglobalEta.ResizeTo(MAXCSCTFTR,MAXCSCTFLCTSTR);
|
138 |
|
|
|
139 |
|
|
trLctstripNum.ResizeTo(MAXCSCTFTR,MAXCSCTFLCTSTR);
|
140 |
|
|
trLctwireGroup.ResizeTo(MAXCSCTFTR,MAXCSCTFLCTSTR);
|
141 |
|
|
|
142 |
|
|
//----------------------------------------------------------------------
|
143 |
|
|
// ALL LCT
|
144 |
|
|
//----------------------------------------------------------------------
|
145 |
|
|
lctSize = 0;
|
146 |
|
|
lctEndcap.clear();
|
147 |
|
|
lctSector.clear();
|
148 |
|
|
lctSubSector.clear();
|
149 |
|
|
lctBx.clear();
|
150 |
|
|
lctBx0.clear();
|
151 |
|
|
|
152 |
|
|
lctStation.clear();
|
153 |
|
|
lctRing.clear();
|
154 |
|
|
lctChamber.clear();
|
155 |
|
|
lctTriggerCSCID.clear();
|
156 |
|
|
lctFpga.clear();
|
157 |
|
|
|
158 |
|
|
// note: the SPs return them in bits
|
159 |
|
|
lctlocalPhi.clear();
|
160 |
kropiv |
1.3 |
//lctlocalPhi_bend.clear();
|
161 |
|
|
lctCLCT_pattern.clear();
|
162 |
|
|
lctQuality.clear();
|
163 |
econte |
1.1 |
lctglobalPhi.clear();
|
164 |
|
|
lctglobalEta.clear();
|
165 |
|
|
|
166 |
|
|
lctstripNum.clear();
|
167 |
|
|
lctwireGroup.clear();
|
168 |
|
|
|
169 |
|
|
//---------------------------------------------------------------------------
|
170 |
|
|
// BASIC CSCTF information
|
171 |
|
|
//---------------------------------------------------------------------------
|
172 |
|
|
nsp = 0; // num of SPs active in the event
|
173 |
|
|
stSPslot.clear();
|
174 |
|
|
stL1A_BXN.clear();
|
175 |
|
|
stTrkCounter.clear();
|
176 |
|
|
stOrbCounter.clear();
|
177 |
econte |
1.2 |
|
178 |
|
|
dtSize=0;
|
179 |
|
|
dtCAL.clear();
|
180 |
|
|
dtFLAG.clear();
|
181 |
|
|
dtBXN.clear();
|
182 |
|
|
dtSector.clear();
|
183 |
|
|
dtSubSector.clear();
|
184 |
|
|
dtBX0.clear();
|
185 |
|
|
dtPhiBend.clear();
|
186 |
|
|
dtQuality.clear();
|
187 |
|
|
dtPhiPacked.clear();
|
188 |
econte |
1.1 |
}
|
189 |
|
|
|
190 |
|
|
//----------------------------------------------------------------------
|
191 |
|
|
// TRACKS
|
192 |
|
|
//----------------------------------------------------------------------
|
193 |
|
|
// csctf track candidates
|
194 |
|
|
int trSize;
|
195 |
|
|
std::vector<int> trEndcap;
|
196 |
|
|
std::vector<int> trSector;
|
197 |
|
|
|
198 |
|
|
std::vector<int> trBx;
|
199 |
|
|
|
200 |
|
|
// if set to 1 track has lct from the station
|
201 |
|
|
std::vector<int> trME1ID;
|
202 |
|
|
std::vector<int> trME2ID;
|
203 |
|
|
std::vector<int> trME3ID;
|
204 |
|
|
std::vector<int> trME4ID;
|
205 |
|
|
std::vector<int> trMB1ID;
|
206 |
|
|
|
207 |
econte |
1.2 |
std::vector<int> trME1TBin;
|
208 |
|
|
std::vector<int> trME2TBin;
|
209 |
|
|
std::vector<int> trME3TBin;
|
210 |
|
|
std::vector<int> trME4TBin;
|
211 |
|
|
std::vector<int> trMB1TBin;
|
212 |
|
|
|
213 |
econte |
1.1 |
std::vector<int> trOutputLink;
|
214 |
|
|
|
215 |
|
|
// some input of the PT LUTs
|
216 |
|
|
std::vector<int> trCharge;
|
217 |
|
|
std::vector<int> trChargeValid;
|
218 |
|
|
std::vector<int> trForR;
|
219 |
|
|
std::vector<int> trPhi23;
|
220 |
|
|
std::vector<int> trPhi12;
|
221 |
|
|
std::vector<int> trPhiSign;
|
222 |
|
|
|
223 |
|
|
// in bits...
|
224 |
|
|
std::vector<int> trEtaBit;
|
225 |
|
|
std::vector<int> trPhiBit;
|
226 |
|
|
std::vector<int> trPtBit;
|
227 |
|
|
|
228 |
|
|
// ... converted
|
229 |
|
|
std::vector<float> trEta;
|
230 |
|
|
std::vector<float> trPhi;
|
231 |
|
|
std::vector<float> trPhi_02PI;
|
232 |
|
|
std::vector<float> trPt;
|
233 |
|
|
|
234 |
|
|
// + useful information
|
235 |
|
|
std::vector<int> trMode;
|
236 |
|
|
std::vector<int> trQuality;
|
237 |
|
|
|
238 |
|
|
//----------------------------------------------------------------------
|
239 |
|
|
// LCT (STUBS FORMING THE TRACK)
|
240 |
|
|
//----------------------------------------------------------------------
|
241 |
|
|
std::vector<int> trNumLCTs; // it contains the number of LCT forming a track
|
242 |
|
|
|
243 |
|
|
TMatrixD trLctEndcap;
|
244 |
|
|
TMatrixD trLctSector;
|
245 |
|
|
TMatrixD trLctSubSector;
|
246 |
|
|
TMatrixD trLctBx;
|
247 |
|
|
TMatrixD trLctBx0;
|
248 |
|
|
|
249 |
|
|
TMatrixD trLctStation;
|
250 |
|
|
TMatrixD trLctRing;
|
251 |
|
|
TMatrixD trLctChamber;
|
252 |
|
|
TMatrixD trLctTriggerCSCID;
|
253 |
|
|
TMatrixD trLctFpga;
|
254 |
|
|
|
255 |
|
|
// note: the SPs return them in bits
|
256 |
|
|
TMatrixD trLctlocalPhi;
|
257 |
kropiv |
1.3 |
//TMatrixD trLctlocalPhi_bend;
|
258 |
|
|
TMatrixD trLctCLCT_pattern;
|
259 |
|
|
TMatrixD trLctQuality;
|
260 |
econte |
1.1 |
TMatrixD trLctglobalPhi;
|
261 |
|
|
TMatrixD trLctglobalEta;
|
262 |
|
|
|
263 |
|
|
TMatrixD trLctstripNum;
|
264 |
|
|
TMatrixD trLctwireGroup;
|
265 |
|
|
|
266 |
|
|
//----------------------------------------------------------------------
|
267 |
|
|
// ALL LCT
|
268 |
|
|
//----------------------------------------------------------------------
|
269 |
|
|
int lctSize;
|
270 |
|
|
std::vector<int> lctEndcap;
|
271 |
|
|
std::vector<int> lctSector;
|
272 |
econte |
1.2 |
|
273 |
econte |
1.1 |
std::vector<int> lctSubSector;
|
274 |
|
|
std::vector<int> lctBx;
|
275 |
|
|
std::vector<int> lctBx0;
|
276 |
|
|
std::vector<int> lctStation;
|
277 |
|
|
std::vector<int> lctRing;
|
278 |
|
|
std::vector<int> lctChamber;
|
279 |
|
|
std::vector<int> lctTriggerCSCID;
|
280 |
|
|
std::vector<int> lctFpga;
|
281 |
|
|
|
282 |
|
|
// note: the SPs return them in bits
|
283 |
|
|
std::vector<int> lctlocalPhi;
|
284 |
kropiv |
1.3 |
//std::vector<int> lctlocalPhi_bend;
|
285 |
|
|
std::vector<int> lctCLCT_pattern;
|
286 |
|
|
std::vector<int> lctQuality;
|
287 |
econte |
1.1 |
std::vector<int> lctglobalPhi;
|
288 |
|
|
std::vector<int> lctglobalEta;
|
289 |
|
|
std::vector<int> lctstripNum;
|
290 |
|
|
std::vector<int> lctwireGroup;
|
291 |
|
|
|
292 |
|
|
//---------------------------------------------------------------------------
|
293 |
|
|
// BASIC CSCTF information
|
294 |
|
|
//---------------------------------------------------------------------------
|
295 |
|
|
int nsp; // num of SPs active in the event
|
296 |
|
|
std::vector<int> stSPslot;
|
297 |
|
|
std::vector<int> stL1A_BXN;
|
298 |
|
|
std::vector<unsigned long int> stTrkCounter;
|
299 |
|
|
std::vector<unsigned long int> stOrbCounter;
|
300 |
|
|
|
301 |
econte |
1.2 |
//DT Stub Information
|
302 |
|
|
int dtSize;
|
303 |
|
|
std::vector<int> dtCAL;
|
304 |
|
|
std::vector<int> dtFLAG;
|
305 |
|
|
std::vector<int> dtBXN;
|
306 |
|
|
std::vector<int> dtSector;
|
307 |
|
|
std::vector<int> dtSubSector;
|
308 |
|
|
std::vector<int> dtBX0;
|
309 |
|
|
std::vector<int> dtPhiBend;
|
310 |
|
|
std::vector<int> dtQuality;
|
311 |
|
|
std::vector<int> dtPhiPacked;
|
312 |
|
|
|
313 |
econte |
1.1 |
};
|
314 |
|
|
}
|
315 |
|
|
#endif
|
316 |
|
|
|
317 |
|
|
|