StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
L3FormatsCompat.h
1 /* Written 11/23/99 cle
2  * changes:
3  * 11/24/99 cle: renamed some variables
4  * 12/06/99 ppy: add xLastHit, yLastHit to type1_track
5  * 01/31/00 ppy: add innerMostRow and outerMostRow to type1_track
6  * 03/29/00 cle: added global_track, L3_GTD, L3_SECCD.
7  * added offlen sl3clusterp to L3_SECP.
8  * added offlen tracks to L3_P.
9  * 04/06/00 cle: implement pablos suggestion to divide L3_SECCD into
10  * L3_SECCD and L3_CLUSTER, named it l3_cluster
11  * added L3_LTD and local_track (pablos modified
12  * type3_track).
13  * format_number in L3_SECTP->bh defines the use of
14  * L3_SECTP->banks. 0: banks[0-2] = type1-3 track
15  * 1: banks[0] = local_track (L3_LTD)
16  * 08/18/00 cle: put L3 summary data and L3 summary into L3_P
17  * 03/07/01 cle: add svt/FTPC banks to L3_P
18  * 06/21/01 cle: changed L3_P->seq to L3_P->gl3Id for recontruction of counters
19  *
20  */
21 
22 /******************* NOTE ********************************************
23  * This file should never be included directly. It is included from *
24  * /DAQ/include/daqFormats.h after the necessary structs are defined *
25  *********************************************************************/
26 
27 #ifndef _L3_FORMATS_H
28 #define _L3_FORMATS_H
29 
30 
31 #define CHAR_L3_P "L3_P "
32 #define CHAR_L3_SECP "L3_SECP "
33 #define CHAR_L3_SECTP "L3_SECTP"
34 #define CHAR_L3_STK1D "L3_STK1D"
35 #define CHAR_L3_STK2D "L3_STK2D"
36 #define CHAR_L3_STK3D "L3_STK3D"
37 #define CHAR_L3_LTD "L3_LTD "
38 #define CHAR_L3_GTD "L3_GTD "
39 #define CHAR_L3_SECCD "L3_SECCD"
40 #define CHAR_L3_SUMD "L3_SUMD "
41 
42 // structure for the 4 l3 summary words
43 //struct L3_summary{
44 // char quality[8];
45 // int nrTracks;
46 // unsigned int decision;
47 //};
48 
49 
50 struct L3_summary{
51  unsigned int accept;
52  unsigned int build;
53  unsigned int on;
54  unsigned int nTracks;
55 };
56 
57 struct algorithm_data{
58  int algId; // unique algorithm identifier (for non-humans)
59  char on; // 1 if this alg. was running on this event, 0 if not.
60  char accept;
61  char build;
62  char blub; // padding
63  unsigned int nProcessed; // events processed by that algorithm so far
64  unsigned int nAccept; // events that fullfilled alg. so far
65  unsigned int nBuild; // events that were flagged to be built
66  float data[10];
67 };
68 
69 struct L3_SUMD {
70  bankHeader bh;
71  unsigned int nProcessed; // all events looked at
72  unsigned int nReconstructed; // nProcessed that didn't crash
73  int nAlg; // nr of registered algorithms
74  struct algorithm_data alg[1]; // array of size nAlg
75 };
76 
77 struct algorithm_counter{
78  int id; // algorithm Id
79  unsigned int nProcessed;
80  unsigned int nAccept;
81  unsigned int nBuild;
82 };
83 
84 struct L3_counter{
85  unsigned int nProcessed;
86  unsigned int nRecontructed;
87  struct algorithm_counter alg[32];
88 };
89 
90 
91 
92 // Track Type I: Mergable Primary Track
93 struct type1_track {
94  short id ;// id
95  short nHits ;// # Hits
96  short innerMostRow ; /* Inner most row track expands */
97  short outerMostRow ; /* Outer most row track expands */
98  float dedx ;
99  float s11Xy ;// Fit parameters
100  float s12Xy ;// conformal line in xy plane
101  float s22Xy ;
102  float g1Xy ;
103  float g2Xy ;
104  float s11Sz ;// Fit parameters in sz plane
105  float s12Sz ;
106  float s22Sz ;
107  float g1Sz ;
108  float g2Sz ;
109  float xLastHit ;
110  float yLastHit ;
111  float trackLength ;
112 }; // 16 words
113 
114 
115 
116 // Track Type II: Unmergable Primary Track
117 struct type2_track {
118  short id; /* track id */
119  short nrec; /* Number of points assigned to that track */
120  short xy_chisq; /* xy & sz chi2 packed in 16 bits each */
121  short sz_chisq; /* both nr.'s are multiplied by 10 and the fraction
122  cut off */
123  float dedx; /* dE/dx information */
124  float pt ; /* pt time charge */
125  float psi; /* azimuthal angle of the momentum at (r,.. */
126  float tanl; /* tg of the dip angle at (r,phi,z) */
127  float z0; /* z coordinate of the first point */
128  float trackLength;
129  unsigned int Errors ; /* dpt, dpsi, dtanl errors (10bits*3)*/
130 }; //9 words
131 
132 
133 // Track Type III: Unmergable Secondary Track
134 struct type3_track {
135  short id; /* track id */
136  short nrec; /* Number of points assigned to that track */
137  short xy_chisq; /* xy & sz chi2 packed in 16 bits each */
138  short sz_chisq; /* same as with track type II, divide by 10 for
139  real result*/
140  float dedx; /* dE/dx information */
141  float pt ; /* pt time charge */
142  float psi; /* azimuthal angle of the momentum at (r,.. */
143  float tanl; /* tg of the dip angle at (r,phi,z) */
144  float z0; /* z coordinate of the first point */
145  float r0; /* r coordinate of the first point */
146  float phi0; /* phi coordinate of the first point */
147  float trackLength;
148  unsigned int Errors ; /* dpt, dpsi, dtanl errors (10bits*3) */
149 }; // 11 words
150 
151 
152 
153 
154 // only tracktype produced on sl3 beginning 04/06/00
155 struct local_track {
156  short id; /* track id */
157  char nHits; /* Number of hits assigned to the track */
158  char ndedx; /* Number of points used for dedx */
159  short innerMostRow ; /* Inner most row track expands */
160  short outerMostRow ; /* Outer most row track expands */
161  short xy_chisq; /* xy & sz chi2 packed in 16 bits each */
162  short sz_chisq; /* same as with track type II, divide by 10 for
163  real result*/
164  float dedx; /* dE/dx information */
165  float pt ; /* pt time charge */
166  float psi; /* azimuthal angle of the momentum at (r,.. */
167  float tanl; /* tg of the dip angle at (r,phi,z) */
168  float z0; /* z coordinate of the first point */
169  float r0; /* r coordinate of the first point */
170  float phi0; /* phi coordinate of the first point */
171  float trackLength;
172  unsigned short dpt ;
173  unsigned short dpsi ;
174  unsigned short dtanl ;
175  unsigned short dz0 ;
176 }; // 13 dwords
177 
178 
179 
180 
181 
182 
183 struct L3_STK1D {
184  struct bankHeader bh;
185  struct type1_track track[500]; //dimension not to be taken literally
186 };
187 
188 struct L3_STK2D {
189  struct bankHeader bh;
190  struct type2_track track[500]; //dimension not to be taken literally
191 };
192 
193 struct L3_STK3D {
194  struct bankHeader bh;
195  struct type3_track track[500]; //dimension not to be taken literally
196 };
197 
198 struct L3_LTD {
199  struct bankHeader bh;
200  struct local_track track[1];
201 }; // 10 (+13) dwords
202 
203 // pointer bank for all track data pointing to L3_STK[1-3]D banks
204 // if format number in bankHeader == 0 : banks point to type1-3 tracks
205 // if format_number == 1 : banks[0] point to local_track (L3_LTD struct)
206 
207 struct L3_SECTP {
208  struct bankHeader bh;
209  // words:
210  unsigned int nHits; // Nr of space points
211  unsigned int nTracks; // Nr of Tracks
212  unsigned int cpuTime; // CPU time in microseconds
213  unsigned int realTime; // real time in microseconds
214  int xVert; // x vertex position in 10**-6 cm
215  int yVert; // y vertex position
216  int zVert; //z vertex postion
217  int para; // parameter set used
218  struct offlen banks[3]; // offset and length in 4 byte words for the
219  // track type I, II and III in this order
220  // if len = 0 for type x there will be no L3_STKxD
221  // bank
222 };
223 
224 
225 
226 // cluster data produced on sl3:
227 
228 struct l3_cluster{
229  unsigned short pad; // in 1/64 pads
230  unsigned short time; // in 1/64 time bins
231  unsigned short charge;
232  unsigned short flags;
233  unsigned short trackId;
234  char padrow ;
235  unsigned char RB_MZ; // RB*16 | MZ, meaning upper 4 bits are RB,
236  // lower 4 bits are MZ
237 };
238 
239 
240 // cluster data produced on sl3:
241 
242 struct L3_SECCD{
243  struct bankHeader bh;
244  unsigned int nrClusters_in_sector;
245  struct l3_cluster cluster[1];
246 } ;
247 
248 
249 
250 
251 // Top level L3 pointer bank. Pointing to TPCSECLP (Cluster data) and
252 // to L3_SECTP (track data).
253 
254 struct L3_SECP {
255  bankHeader bh;
256  unsigned int len; // length of the entire sector contribution
257  unsigned int time; // time when the event is put together in unix format
258  unsigned int seq; // sequence nr. hopefully unique inside one run ;)
259  unsigned int trg_word; // for the future
260  unsigned int trg_in_word; // also future... don't even know what that
261  // means....
262  struct offlen clusterp; // offset/length to/of TPCSECLP
263  struct offlen trackp; // offset/length to/of L3_SECTP
264  struct offlen sl3clusterp; // offlen for sl3 produced cluster data
265  // if length = 0 Bank is not present.
266 }; // L3_SECP is almost the same as DATAP, variables all have the same meaning
267 
268 
269 
270 // Global tracks:
271 
272 struct global_track {
273  int id ; //primary key
274  unsigned short flag ; // Primaries flag=1, Secondaries flag=0
275  char innerMostRow ;
276  char outerMostRow ;
277  unsigned char nHits ; // Number of points assigned to that track
278  char reserved ;
279  unsigned char ndedx; // nr of clusters contributing to the dedx value
280  char q ; // charge
281  float chi2[2]; // chi squared of the momentum fit
282  float dedx; // dE/dx information
283  float pt ; // pt (transverse momentum) at (r,phi,z)
284  float phi0; // azimuthal angle of the first point
285  float psi ; // azimuthal angle of the momentum at (r,..
286  float r0 ; // r (in cyl. coord.) for the first point
287  float tanl; // tg of the dip angle at (r,phi,z)
288  float z0 ; // z coordinate of the first point
289  float length ;
290  float dpt ;
291  float dpsi;
292  float dz0 ;
293  float dtanl ;
294 }; //16 dwords
295 
296 // Bank which actually has the global tracks in it:
297 // compared to the sector level tracks this merges the pointer and data bank
298 // into one Bank.
299 
300 struct L3_GTD {
301  struct bankHeader bh;
302  unsigned int nHits; // Nr of space points
303  unsigned int nTracks; // Nr of Tracks
304  int xVert; // x vertex position in 10**-6 cm
305  int yVert; // y vertex position
306  int zVert; //z vertex postion
307  struct global_track track[1];
308 };
309 
310 
311 
312 struct L3_P {
313  bankHeader bh;
314  unsigned int len; // lenght of the entire L3 contribution
315  unsigned int time; // time when bank is produced
316  unsigned int gl3Id; // node Id of the gl3 who produced that event
317  unsigned int trg_word;
318  unsigned int trg_in_word;
319  struct offlen sector[24]; // sector contributions, offset and length
320  struct offlen tracks; // pointer and length to/of L3_GTD
321  struct offlen summary_data;
322  unsigned int L3_summary[4];
323  struct offlen svt[5]; // 4 svt 'sectors' + 1 ssd
324  struct offlen ftpc[2];
325  struct offlen emc;
326 
327 } ; // almost the same as L3_SECP
328 // 70 dwords
329 
330 #endif