1 |
/** |
2 |
* \file TrkStruct.h |
3 |
* \author Elena Vannuccini |
4 |
* \date |
5 |
*/ |
6 |
#ifndef trkstruct_h |
7 |
#define trkstruct_h |
8 |
|
9 |
#define NTRKMAX 10 |
10 |
#define NSINGMAX 100 |
11 |
|
12 |
#include <TString.h> |
13 |
#include <TFile.h> |
14 |
|
15 |
/** |
16 |
* \brief Struct to pass calibration data to F77 routines |
17 |
*/ |
18 |
struct cTrkCalib { |
19 |
float pedestal[128][24][12]; |
20 |
float pedestal_t[128][24][12]; |
21 |
float sigma[128][24][12]; |
22 |
float sigma_t[128][24][12]; |
23 |
int bad[128][24][12]; |
24 |
|
25 |
void FillFrom(TFile* , Int_t , Int_t ); |
26 |
}; |
27 |
// ================================================================== |
28 |
/** |
29 |
* \brief Struct to pass tracker LEVEL0 data to F77 routines |
30 |
*/ |
31 |
struct cTrkLevel0 { |
32 |
int DAQmode[12]; |
33 |
int DSPnumber[12]; |
34 |
int DATAlength[12]; |
35 |
int eventn[12]; |
36 |
int nclust[12]; |
37 |
int cutc[12]; |
38 |
int cutcl[12]; |
39 |
int addrcluster[3][12]; |
40 |
int signcluster[3][12]; |
41 |
int fc[12]; |
42 |
int compressiontime[12]; |
43 |
int fl5[12]; |
44 |
int fl4[12]; |
45 |
int fl3[12]; |
46 |
int fl2[12]; |
47 |
int fl1[12]; |
48 |
int fl6[12]; |
49 |
int checksum[12]; |
50 |
int TOTDATAlength; |
51 |
int datatracker[49152]; |
52 |
int pnum[12]; |
53 |
int cmdnum[12]; |
54 |
int bid[12]; |
55 |
int alarm[12]; |
56 |
int aswr[12]; |
57 |
int good0; |
58 |
int crc[12]; |
59 |
}; |
60 |
// ================================================================== |
61 |
/** |
62 |
* \brief Struct to pass tracker LEVEL1 data to F77 routines |
63 |
*/ |
64 |
struct cTrkLevel1 { |
65 |
int good1; |
66 |
int nclstr1; |
67 |
int view[500]; |
68 |
int ladder[500]; |
69 |
int maxs[500]; |
70 |
int mult[500]; |
71 |
float dedx[500]; |
72 |
int indstart[500]; |
73 |
int indmax[500]; |
74 |
int totCLlength; |
75 |
float clsignal[8500]; |
76 |
float cnev[24][12]; |
77 |
}; |
78 |
// ================================================================== |
79 |
/** |
80 |
* \brief Struct to pass tracker LEVEL2 data to F77 routines |
81 |
*/ |
82 |
struct cTrkLevel2 { |
83 |
int good2; |
84 |
int crc[12]; |
85 |
// ---------------------------- |
86 |
int nclsx; |
87 |
int planex[NSINGMAX]; |
88 |
float xs[NSINGMAX][2]; |
89 |
float signlxs[NSINGMAX]; |
90 |
// ---------------------------- |
91 |
int nclsy; |
92 |
int planey[NSINGMAX]; |
93 |
float ys[NSINGMAX][2]; |
94 |
float signlys[NSINGMAX]; |
95 |
// ---------------------------- |
96 |
int ntrk; |
97 |
int image[NTRKMAX]; |
98 |
float xm_nt[NTRKMAX][6]; |
99 |
float ym_nt[NTRKMAX][6]; |
100 |
float zm_nt[NTRKMAX][6]; |
101 |
float resx_nt[NTRKMAX][6]; |
102 |
float resy_nt[NTRKMAX][6]; |
103 |
float al_nt[NTRKMAX][5]; |
104 |
float coval[NTRKMAX][5][5]; |
105 |
float chi2_nt[NTRKMAX]; |
106 |
int xgood_nt[NTRKMAX][6]; |
107 |
int ygood_nt[NTRKMAX][6]; |
108 |
float xv_nt[NTRKMAX][6]; |
109 |
float yv_nt[NTRKMAX][6]; |
110 |
float zv_nt[NTRKMAX][6]; |
111 |
float axv_nt[NTRKMAX][6]; |
112 |
float ayv_nt[NTRKMAX][6]; |
113 |
float dedx_x[NTRKMAX][6]; |
114 |
float dedx_y[NTRKMAX][6]; |
115 |
float bdl[NTRKMAX]; |
116 |
}; |
117 |
// ================================================================== |
118 |
/** |
119 |
* \brief Struct to pass calibration/parameter file paths to F77 routines |
120 |
*/ |
121 |
struct cPath { |
122 |
char path[80]; |
123 |
int pathlen; |
124 |
int error; |
125 |
int debug; |
126 |
/** |
127 |
* Fill the struct variables from a TString object |
128 |
*/ |
129 |
void FillWith(TString s){ |
130 |
pathlen = s.Length(); |
131 |
const char *pc = s.Data(); |
132 |
for(Int_t i=0; i<=pathlen; i++) path[i] = *pc++; |
133 |
}; |
134 |
|
135 |
void SetDebug(){ debug=1;}; |
136 |
|
137 |
}; |
138 |
|
139 |
// ================================================================== |
140 |
/** |
141 |
* \brief Struct to pass magnetic-field file paths to F77 routines |
142 |
*/ |
143 |
struct cBPath { |
144 |
char b_path[80]; |
145 |
int b_pathlen; |
146 |
int b_error; |
147 |
int b_debug; |
148 |
int b_loaded; |
149 |
/** |
150 |
* Fill the struct variables from a TString object and set |
151 |
* the load flag to FALSE. |
152 |
*/ |
153 |
void FillWith(TString s){ |
154 |
b_loaded = 0; |
155 |
b_pathlen = s.Length(); |
156 |
const char *pc = s.Data(); |
157 |
for(Int_t i=0; i<=b_pathlen; i++) b_path[i] = *pc++; |
158 |
}; |
159 |
/** |
160 |
* Fill the struct variables from a TString object |
161 |
*/ |
162 |
int BIsLoaded(){ return b_loaded; }; |
163 |
void SetDebug(){ b_debug=1; }; |
164 |
|
165 |
}; |
166 |
|
167 |
|
168 |
#endif |
169 |
|