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 |
trOutputLink.clear();
|
39 |
|
40 |
// some input of the PT LUTs
|
41 |
trCharge.clear();
|
42 |
trChargeValid.clear();
|
43 |
trForR.clear();
|
44 |
trPhi23.clear();
|
45 |
trPhi12.clear();
|
46 |
trPhiSign.clear();
|
47 |
|
48 |
// in bits...
|
49 |
trEtaBit.clear();
|
50 |
trPhiBit.clear();
|
51 |
trPtBit.clear();
|
52 |
|
53 |
// ... converted
|
54 |
trEta.clear();
|
55 |
trPhi.clear();
|
56 |
trPhi_02PI.clear();
|
57 |
trPt.clear();
|
58 |
|
59 |
// + useful information
|
60 |
trMode.clear();
|
61 |
trQuality.clear();
|
62 |
|
63 |
//----------------------------------------------------------------------
|
64 |
// LCT (STUBS FORMING THE TRACK)
|
65 |
//----------------------------------------------------------------------
|
66 |
trNumLCTs.clear();
|
67 |
|
68 |
trLctEndcap.Clear();
|
69 |
trLctSector.Clear();
|
70 |
trLctSubSector.Clear();
|
71 |
trLctBx.Clear();
|
72 |
trLctBx0.Clear();
|
73 |
|
74 |
trLctStation.Clear();
|
75 |
trLctRing.Clear();
|
76 |
trLctChamber.Clear();
|
77 |
trLctTriggerCSCID.Clear();
|
78 |
trLctFpga.Clear();
|
79 |
|
80 |
trLctlocalPhi.Clear();
|
81 |
trLctglobalPhi.Clear();
|
82 |
trLctglobalEta.Clear();
|
83 |
|
84 |
trLctstripNum.Clear();
|
85 |
trLctwireGroup.Clear();
|
86 |
|
87 |
trLctEndcap.Clear();
|
88 |
trLctSector.Clear();
|
89 |
trLctSubSector.Clear();
|
90 |
trLctBx.Clear();
|
91 |
trLctBx0.Clear();
|
92 |
|
93 |
trLctStation.Clear();
|
94 |
trLctRing.Clear();
|
95 |
trLctChamber.Clear();
|
96 |
trLctTriggerCSCID.Clear();
|
97 |
trLctFpga.Clear();
|
98 |
|
99 |
trLctlocalPhi.Clear();
|
100 |
trLctglobalPhi.Clear();
|
101 |
trLctglobalEta.Clear();
|
102 |
|
103 |
trLctstripNum.Clear();
|
104 |
trLctwireGroup.Clear();
|
105 |
|
106 |
//---------------------
|
107 |
|
108 |
trLctEndcap.ResizeTo(MAXCSCTFTR,MAXCSCTFLCTSTR);
|
109 |
trLctSector.ResizeTo(MAXCSCTFTR,MAXCSCTFLCTSTR);
|
110 |
trLctSubSector.ResizeTo(MAXCSCTFTR,MAXCSCTFLCTSTR);
|
111 |
trLctBx.ResizeTo(MAXCSCTFTR,MAXCSCTFLCTSTR);
|
112 |
trLctBx0.ResizeTo(MAXCSCTFTR,MAXCSCTFLCTSTR);
|
113 |
|
114 |
trLctStation.ResizeTo(MAXCSCTFTR,MAXCSCTFLCTSTR);
|
115 |
trLctRing.ResizeTo(MAXCSCTFTR,MAXCSCTFLCTSTR);
|
116 |
trLctChamber.ResizeTo(MAXCSCTFTR,MAXCSCTFLCTSTR);
|
117 |
trLctTriggerCSCID.ResizeTo(MAXCSCTFTR,MAXCSCTFLCTSTR);
|
118 |
trLctFpga.ResizeTo(MAXCSCTFTR,MAXCSCTFLCTSTR);
|
119 |
|
120 |
trLctlocalPhi.ResizeTo(MAXCSCTFTR,MAXCSCTFLCTSTR);
|
121 |
trLctglobalPhi.ResizeTo(MAXCSCTFTR,MAXCSCTFLCTSTR);
|
122 |
trLctglobalEta.ResizeTo(MAXCSCTFTR,MAXCSCTFLCTSTR);
|
123 |
|
124 |
trLctstripNum.ResizeTo(MAXCSCTFTR,MAXCSCTFLCTSTR);
|
125 |
trLctwireGroup.ResizeTo(MAXCSCTFTR,MAXCSCTFLCTSTR);
|
126 |
|
127 |
//----------------------------------------------------------------------
|
128 |
// ALL LCT
|
129 |
//----------------------------------------------------------------------
|
130 |
lctSize = 0;
|
131 |
lctEndcap.clear();
|
132 |
lctSector.clear();
|
133 |
lctSubSector.clear();
|
134 |
lctBx.clear();
|
135 |
lctBx0.clear();
|
136 |
|
137 |
lctStation.clear();
|
138 |
lctRing.clear();
|
139 |
lctChamber.clear();
|
140 |
lctTriggerCSCID.clear();
|
141 |
lctFpga.clear();
|
142 |
|
143 |
// note: the SPs return them in bits
|
144 |
lctlocalPhi.clear();
|
145 |
lctglobalPhi.clear();
|
146 |
lctglobalEta.clear();
|
147 |
|
148 |
lctstripNum.clear();
|
149 |
lctwireGroup.clear();
|
150 |
|
151 |
//---------------------------------------------------------------------------
|
152 |
// BASIC CSCTF information
|
153 |
//---------------------------------------------------------------------------
|
154 |
nsp = 0; // num of SPs active in the event
|
155 |
stSPslot.clear();
|
156 |
stL1A_BXN.clear();
|
157 |
stTrkCounter.clear();
|
158 |
stOrbCounter.clear();
|
159 |
}
|
160 |
|
161 |
//----------------------------------------------------------------------
|
162 |
// TRACKS
|
163 |
//----------------------------------------------------------------------
|
164 |
// csctf track candidates
|
165 |
int trSize;
|
166 |
std::vector<int> trEndcap;
|
167 |
std::vector<int> trSector;
|
168 |
|
169 |
std::vector<int> trBx;
|
170 |
|
171 |
// if set to 1 track has lct from the station
|
172 |
std::vector<int> trME1ID;
|
173 |
std::vector<int> trME2ID;
|
174 |
std::vector<int> trME3ID;
|
175 |
std::vector<int> trME4ID;
|
176 |
std::vector<int> trMB1ID;
|
177 |
|
178 |
std::vector<int> trOutputLink;
|
179 |
|
180 |
// some input of the PT LUTs
|
181 |
std::vector<int> trCharge;
|
182 |
std::vector<int> trChargeValid;
|
183 |
std::vector<int> trForR;
|
184 |
std::vector<int> trPhi23;
|
185 |
std::vector<int> trPhi12;
|
186 |
std::vector<int> trPhiSign;
|
187 |
|
188 |
// in bits...
|
189 |
std::vector<int> trEtaBit;
|
190 |
std::vector<int> trPhiBit;
|
191 |
std::vector<int> trPtBit;
|
192 |
|
193 |
// ... converted
|
194 |
std::vector<float> trEta;
|
195 |
std::vector<float> trPhi;
|
196 |
std::vector<float> trPhi_02PI;
|
197 |
std::vector<float> trPt;
|
198 |
|
199 |
// + useful information
|
200 |
std::vector<int> trMode;
|
201 |
std::vector<int> trQuality;
|
202 |
|
203 |
//----------------------------------------------------------------------
|
204 |
// LCT (STUBS FORMING THE TRACK)
|
205 |
//----------------------------------------------------------------------
|
206 |
std::vector<int> trNumLCTs; // it contains the number of LCT forming a track
|
207 |
|
208 |
TMatrixD trLctEndcap;
|
209 |
TMatrixD trLctSector;
|
210 |
TMatrixD trLctSubSector;
|
211 |
TMatrixD trLctBx;
|
212 |
TMatrixD trLctBx0;
|
213 |
|
214 |
TMatrixD trLctStation;
|
215 |
TMatrixD trLctRing;
|
216 |
TMatrixD trLctChamber;
|
217 |
TMatrixD trLctTriggerCSCID;
|
218 |
TMatrixD trLctFpga;
|
219 |
|
220 |
// note: the SPs return them in bits
|
221 |
TMatrixD trLctlocalPhi;
|
222 |
TMatrixD trLctglobalPhi;
|
223 |
TMatrixD trLctglobalEta;
|
224 |
|
225 |
TMatrixD trLctstripNum;
|
226 |
TMatrixD trLctwireGroup;
|
227 |
|
228 |
//----------------------------------------------------------------------
|
229 |
// ALL LCT
|
230 |
//----------------------------------------------------------------------
|
231 |
int lctSize;
|
232 |
std::vector<int> lctEndcap;
|
233 |
std::vector<int> lctSector;
|
234 |
std::vector<int> lctSubSector;
|
235 |
std::vector<int> lctBx;
|
236 |
std::vector<int> lctBx0;
|
237 |
std::vector<int> lctStation;
|
238 |
std::vector<int> lctRing;
|
239 |
std::vector<int> lctChamber;
|
240 |
std::vector<int> lctTriggerCSCID;
|
241 |
std::vector<int> lctFpga;
|
242 |
|
243 |
// note: the SPs return them in bits
|
244 |
std::vector<int> lctlocalPhi;
|
245 |
std::vector<int> lctglobalPhi;
|
246 |
std::vector<int> lctglobalEta;
|
247 |
std::vector<int> lctstripNum;
|
248 |
std::vector<int> lctwireGroup;
|
249 |
|
250 |
//---------------------------------------------------------------------------
|
251 |
// BASIC CSCTF information
|
252 |
//---------------------------------------------------------------------------
|
253 |
int nsp; // num of SPs active in the event
|
254 |
std::vector<int> stSPslot;
|
255 |
std::vector<int> stL1A_BXN;
|
256 |
std::vector<unsigned long int> stTrkCounter;
|
257 |
std::vector<unsigned long int> stOrbCounter;
|
258 |
|
259 |
};
|
260 |
}
|
261 |
#endif
|
262 |
|
263 |
|