00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043 #ifndef L3_BANKS_HH
00044 #define L3_BANKS_HH
00045
00046
00048 #include "StDaqLib/GENERIC/RecHeaderFormats.hh"
00049 #include "StDaqLib/GENERIC/swaps.hh"
00051
00052 #define CHAR_L3_P "L3_P "
00053 #define CHAR_L3_SECP "L3_SECP "
00054 #define CHAR_L3_SECTP "L3_SECTP"
00055 #define CHAR_L3_STK1D "L3_STK1D"
00056 #define CHAR_L3_STK2D "L3_STK2D"
00057 #define CHAR_L3_STK3D "L3_STK3D"
00058 #define CHAR_L3_LTD "L3_LTD "
00059 #define CHAR_L3_GTD "L3_GTD "
00060 #define CHAR_L3_SECCD "L3_SECCD"
00061 #define CHAR_L3_SUMD "L3_SUMD "
00062
00063 #define CHAR_TPCSECLP "TPCSECLP"
00064 #define CHAR_TPCRBCLP "TPCRBCLP"
00065 #define CHAR_TPCMZCLD "TPCMZCLD"
00066
00067
00068
00069
00070 struct Bank_L3_P: public Bank
00071 {
00072 unsigned int len;
00073 unsigned int time;
00074 unsigned int gl3Id;
00075 unsigned int trg_word;
00076 unsigned int trg_in_word;
00077 Pointer sector[24];
00078 Pointer tracks;
00079 Pointer summary_data;
00080 unsigned int L3_Summary[4];
00081
00082 Pointer svt[5];
00083 Pointer ftpc[2];
00084 Pointer emc;
00085 };
00086
00087
00088 struct L3_Summary
00089 {
00090 unsigned int accept;
00091 unsigned int build;
00092 unsigned int on;
00093 unsigned int nTracks;
00094 };
00095
00096
00097 struct Algorithm_Data
00098 {
00099 int algId;
00100 char on;
00101 char accept;
00102 char build;
00103 char blub;
00104 unsigned int nProcessed;
00105 unsigned int nAccept;
00106 unsigned int nBuild;
00107 float data[10];
00108 };
00109
00110
00111 struct Bank_L3_SUMD: public Bank {
00112 unsigned int nProcessed;
00113 unsigned int nReconstructed;
00114 int nAlg;
00115 struct Algorithm_Data alg[1];
00116
00117 int swap();
00118 };
00119
00120
00121
00122 struct Bank_L3_SECP: public Bank
00123 {
00124 unsigned int len;
00125 unsigned int time;
00126 unsigned int seq;
00127 unsigned int trg_word;
00128 unsigned int trg_in_word;
00129 Pointer clusterp;
00130 Pointer trackp;
00131 Pointer sl3clusterp;
00132
00133 };
00134
00135
00136
00137 struct localTrack
00138 {
00139 short id;
00140 char nHits;
00141 char ndedx;
00142 short innerMostRow ;
00143 short outerMostRow ;
00144 short xy_chisq;
00145 short sz_chisq;
00146
00147 float dedx;
00148 float pt;
00149 float psi;
00150 float tanl;
00151 float z0;
00152 float r0;
00153 float phi0;
00154 float trackLength;
00155 unsigned short dpt;
00156 unsigned short dpsi;
00157 unsigned short dtanl;
00158 unsigned short dz0;
00159 };
00160
00161
00162
00163 struct globalTrack
00164 {
00165 int id;
00166 unsigned short flag;
00167 char innerMostRow;
00168 char outerMostRow;
00169 unsigned char nHits;
00170 char reserved;
00171 unsigned char ndedx;
00172 char q;
00173 float chi2[2];
00174 float dedx;
00175 float pt;
00176 float phi0;
00177 float psi;
00178 float r0;
00179 float tanl;
00180 float z0;
00181 float length;
00182 float dpt;
00183 float dpsi;
00184 float dz0;
00185 float dtanl;
00186 };
00187
00188
00189
00190 struct L3_Cluster
00191 {
00192 unsigned short pad;
00193 unsigned short time;
00194 unsigned short charge;
00195 unsigned short flags;
00196 unsigned short trackId;
00197 char padrow;
00198 unsigned char RB_MZ;
00199
00200 };
00201
00202
00203
00204
00205
00206 struct Bank_L3_GTD: public Bank
00207 {
00208 unsigned int nHits;
00209 unsigned int nTracks;
00210 float xVert;
00211 float yVert;
00212 float zVert;
00213 globalTrack track[1];
00214
00215 int swap();
00216 };
00217
00218
00219 struct Bank_L3_LTD: public Bank
00220 {
00221 localTrack track[1];
00222
00223 int swap();
00224 };
00225
00226
00227
00228 struct Bank_L3_SECTP: public Bank
00229 {
00230 unsigned int nHits;
00231 unsigned int nTracks;
00232 unsigned int cpuTime;
00233 unsigned int realTime;
00234 int xVert;
00235 int yVert;
00236 int zVert;
00237 int para;
00238 Pointer banks[3];
00239 };
00240
00241
00242
00243 struct Bank_L3_SECCD: public Bank
00244 {
00245 unsigned int nrClusters_in_sector;
00246 L3_Cluster cluster[1];
00247
00248 int swap();
00249 };
00250
00251
00252
00253
00254
00255
00256 struct vertex {
00257 float x;
00258 float y;
00259 float z;
00260 };
00261
00262
00263
00264
00265 struct Bank_TPCSECLP: public Bank
00266 {
00267 Pointer receiverBoard[12];
00268 };
00269
00270
00271 struct Bank_TPCRBCLP: public Bank
00272 {
00273 Pointer mezzBoard[3];
00274 int fiberHeader[12];
00275 };
00276
00277
00278
00279
00280
00281 struct Bank_TPCMZCLD: public Bank
00282 {
00283 int numberOfRows;
00284 int stuff[10];
00285
00286 int swap();
00287 };
00288
00289
00290
00291 int l3Swap_short (short* data, short size);
00292
00293 #endif