00001 /* Written 11/23/99 cle 00002 * changes: 00003 * 11/24/99 cle: renamed some variables 00004 * 12/06/99 ppy: add xLastHit, yLastHit to type1_track 00005 * 01/31/00 ppy: add innerMostRow and outerMostRow to type1_track 00006 * 03/29/00 cle: added global_track, L3_GTD, L3_SECCD. 00007 * added offlen sl3clusterp to L3_SECP. 00008 * added offlen tracks to L3_P. 00009 * 04/06/00 cle: implement pablos suggestion to divide L3_SECCD into 00010 * L3_SECCD and L3_CLUSTER, named it l3_cluster 00011 * added L3_LTD and local_track (pablos modified 00012 * type3_track). 00013 * format_number in L3_SECTP->bh defines the use of 00014 * L3_SECTP->banks. 0: banks[0-2] = type1-3 track 00015 * 1: banks[0] = local_track (L3_LTD) 00016 * 08/18/00 cle: put L3 summary data and L3 summary into L3_P 00017 * 03/07/01 cle: add svt/FTPC banks to L3_P 00018 * 06/21/01 cle: changed L3_P->seq to L3_P->gl3Id for recontruction of counters 00019 * 080801 cle: got rid of type1/2/3 tracks, change vertex to floats in gtd 00020 * 082701 cle: format number is now 5, due to addition of trigger data offlen 00021 * 113001 tom: reserved 6 offlen's for EMC, format_number -> 6 00022 * 00023 */ 00024 00025 /******************* NOTE ******************************************** 00026 * This file should never be included directly. It is included from * 00027 * /DAQ/include/daqFormats.h after the necessary structs are defined * 00028 *********************************************************************/ 00029 00030 #ifndef _L3_FORMATS_H 00031 #define _L3_FORMATS_H 00032 00033 00034 #define CHAR_L3_P "L3_P " 00035 #define CHAR_L3_SECP "L3_SECP " 00036 #define CHAR_L3_SECTP "L3_SECTP" 00037 #define CHAR_L3_LTD "L3_LTD " 00038 #define CHAR_L3_GTD "L3_GTD " 00039 #define CHAR_L3_SECCD "L3_SECCD" 00040 #define CHAR_L3_SUMD "L3_SUMD " 00041 00042 // structure for the 4 l3 summary words 00043 //struct L3_summary{ 00044 // char quality[8]; 00045 // int nrTracks; 00046 // unsigned int decision; 00047 //}; 00048 00049 00050 struct L3_summary{ 00051 unsigned int accept; 00052 unsigned int build; 00053 unsigned int on; 00054 unsigned int nTracks; 00055 }; 00056 00057 struct algorithm_data{ 00058 int algId; // unique algorithm identifier (for non-humans) 00059 char on; // 1 if this alg. was running on this event, 0 if not. 00060 char accept; 00061 char build; 00062 char blub; // padding 00063 unsigned int nProcessed; // events processed by that algorithm so far 00064 unsigned int nAccept; // events that fullfilled alg. so far 00065 unsigned int nBuild; // events that were flagged to be built 00066 float data[10]; 00067 }; 00068 00069 struct L3_SUMD { 00070 bankHeader bh; 00071 unsigned int nProcessed; // all events looked at 00072 unsigned int nReconstructed; // nProcessed that didn't crash 00073 int nAlg; // nr of registered algorithms 00074 struct algorithm_data alg[1]; // array of size nAlg 00075 }; 00076 00077 struct algorithm_counter{ 00078 int id; // algorithm Id 00079 unsigned int nProcessed; 00080 unsigned int nAccept; 00081 unsigned int nBuild; 00082 }; 00083 00084 struct L3_counter{ 00085 unsigned int nProcessed; 00086 unsigned int nRecontructed; 00087 struct algorithm_counter alg[32]; 00088 }; 00089 00090 00091 00092 struct local_track { 00093 short id; /* track id */ 00094 char nHits; /* Number of hits assigned to the track */ 00095 char ndedx; /* Number of points used for dedx */ 00096 short innerMostRow ; /* Inner most row track expands */ 00097 short outerMostRow ; /* Outer most row track expands */ 00098 short xy_chisq; /* xy & sz chi2 packed in 16 bits each */ 00099 short sz_chisq; /* same as with track type II, divide by 10 for 00100 real result*/ 00101 float dedx; /* dE/dx information */ 00102 float pt ; /* pt time charge */ 00103 float psi; /* azimuthal angle of the momentum at (r,.. */ 00104 float tanl; /* tg of the dip angle at (r,phi,z) */ 00105 float z0; /* z coordinate of the first point */ 00106 float r0; /* r coordinate of the first point */ 00107 float phi0; /* phi coordinate of the first point */ 00108 float trackLength; 00109 unsigned short dpt ; 00110 unsigned short dpsi ; 00111 unsigned short dtanl ; 00112 unsigned short dz0 ; 00113 }; // 13 dwords 00114 00115 00116 struct L3_LTD { 00117 struct bankHeader bh; 00118 struct local_track track[1]; 00119 }; // 10 (+13) dwords 00120 00121 // pointer bank for all track data pointing to L3_STK[1-3]D banks 00122 // if format number in bankHeader == 0 : banks point to type1-3 tracks 00123 // if format_number == 1 : banks[0] point to local_track (L3_LTD struct) 00124 00125 struct L3_SECTP { 00126 struct bankHeader bh; 00127 // words: 00128 unsigned int nHits; // Nr of space points 00129 unsigned int nTracks; // Nr of Tracks 00130 unsigned int cpuTime; // CPU time in microseconds 00131 unsigned int realTime; // real time in microseconds 00132 int xVert; // x vertex position in 10**-6 cm 00133 int yVert; // y vertex position 00134 int zVert; //z vertex postion 00135 int para; // parameter set used 00136 struct offlen banks[3]; // offset and length in 4 byte words for the 00137 // track type I, II and III in this order 00138 // if len = 0 for type x there will be no L3_STKxD 00139 // bank 00140 }; 00141 00142 00143 00144 // cluster data produced on sl3: 00145 00146 struct l3_cluster{ 00147 unsigned short pad; // in 1/64 pads 00148 unsigned short time; // in 1/64 time bins 00149 unsigned short charge; 00150 unsigned short flags; 00151 unsigned short trackId; 00152 char padrow ; 00153 unsigned char RB_MZ; // RB*16 | MZ, meaning upper 4 bits are RB, 00154 // lower 4 bits are MZ 00155 }; 00156 00157 00158 // cluster data produced on sl3: 00159 00160 struct L3_SECCD{ 00161 struct bankHeader bh; 00162 unsigned int nrClusters_in_sector; 00163 struct l3_cluster cluster[1]; 00164 } ; 00165 00166 00167 00168 00169 // Top level L3 pointer bank. Pointing to TPCSECLP (Cluster data) and 00170 // to L3_SECTP (track data). 00171 00172 struct L3_SECP { 00173 bankHeader bh; 00174 unsigned int len; // length of the entire sector contribution 00175 unsigned int time; // time when the event is put together in unix format 00176 unsigned int seq; // sequence nr. hopefully unique inside one run ;) 00177 unsigned int trg_word; // for the future 00178 unsigned int trg_in_word; // also future... don't even know what that 00179 // means.... 00180 struct offlen clusterp; // offset/length to/of TPCSECLP 00181 struct offlen trackp; // offset/length to/of L3_SECTP 00182 struct offlen sl3clusterp; // offlen for sl3 produced cluster data 00183 // if length = 0 Bank is not present. 00184 }; // L3_SECP is almost the same as DATAP, variables all have the same meaning 00185 00186 00187 00188 // Global tracks: 00189 00190 struct global_track { 00191 int id ; //primary key 00192 unsigned short flag ; // Primaries flag=1, Secondaries flag=0 00193 char innerMostRow ; 00194 char outerMostRow ; 00195 unsigned char nHits ; // Number of points assigned to that track 00196 char reserved ; 00197 unsigned char ndedx; // nr of clusters contributing to the dedx value 00198 char q ; // charge 00199 float chi2[2]; // chi squared of the momentum fit 00200 float dedx; // dE/dx information 00201 float pt ; // pt (transverse momentum) at (r,phi,z) 00202 float phi0; // azimuthal angle of the first point 00203 float psi ; // azimuthal angle of the momentum at (r,.. 00204 float r0 ; // r (in cyl. coord.) for the first point 00205 float tanl; // tg of the dip angle at (r,phi,z) 00206 float z0 ; // z coordinate of the first point 00207 float length ; 00208 float dpt ; 00209 float dpsi; 00210 float dz0 ; 00211 float dtanl ; 00212 }; //16 dwords 00213 00214 // Bank which actually has the global tracks in it: 00215 // compared to the sector level tracks this merges the pointer and data bank 00216 // into one Bank. 00217 00218 struct L3_GTD { 00219 struct bankHeader bh; 00220 unsigned int nHits; // Nr of space points 00221 unsigned int nTracks; // Nr of Tracks 00222 float xVert; // x vertex position in cm 00223 float yVert; // y vertex position 00224 float zVert; //z vertex postion 00225 struct global_track track[1]; 00226 }; 00227 00228 00229 00230 struct L3_P { 00231 bankHeader bh; 00232 unsigned int len; // length of the entire L3 contribution 00233 unsigned int time; // time when bank is produced 00234 unsigned int gl3Id; // node Id of the gl3 who produced that event 00235 unsigned int trg_word; 00236 unsigned int trg_in_word; 00237 struct offlen sector[24]; // sector contributions, offset and length 00238 struct offlen tracks; // pointer and length to/of L3_GTD 00239 struct offlen summary_data; 00240 unsigned int L3_summary[4]; 00241 struct offlen svt[5]; // 4 svt 'sectors' + 1 ssd 00242 struct offlen ftpc[2]; 00243 struct offlen reserved1; // was emc before, but has never been used 00244 struct offlen trig; //trigger summary+data 00245 struct offlen emc[6]; // [BE]EMC Tower ShowerMax Preshower 00246 } ; // almost the same as L3_SECP 00247 // 70 dwords 00248 00249 #endif
1.5.9