9 |
#define NTRKMAX 10 |
#define NTRKMAX 10 |
10 |
#define NSINGMAX 100 |
#define NSINGMAX 100 |
11 |
|
|
12 |
|
#include <CalibTrk1Event.h> |
13 |
|
#include <CalibTrk2Event.h> |
14 |
|
|
15 |
#include <TString.h> |
#include <TString.h> |
16 |
#include <TFile.h> |
#include <TFile.h> |
17 |
|
#include <TTree.h> |
18 |
|
|
19 |
|
#include <fstream> |
20 |
|
#include <iostream> |
21 |
/** |
/** |
22 |
* \brief Struct to pass calibration data to F77 routines |
* \brief Struct to pass calibration parameters to F77 routines |
23 |
*/ |
*/ |
24 |
struct cTrkCalib { |
struct cTrkCalib { |
25 |
|
|
26 |
float pedestal[128][24][12]; |
float pedestal[128][24][12]; |
27 |
float pedestal_t[128][24][12]; |
float pedestal_t[128][24][12]; |
28 |
float sigma[128][24][12]; |
float sigma[128][24][12]; |
29 |
float sigma_t[128][24][12]; |
float sigma_t[128][24][12]; |
30 |
int bad[128][24][12]; |
int bad[128][24][12]; |
31 |
|
|
32 |
void FillFrom(TFile* , Int_t , Int_t ); |
void FillACalibFrom(TFile* , Int_t , Int_t ); |
33 |
|
void FillFCalibFrom(TFile* , Int_t , Int_t ); |
34 |
|
void FillTCalibFrom(TFile* , Int_t , Int_t ); |
35 |
|
void FillTCalibFrom(TString); |
36 |
|
|
37 |
}; |
}; |
38 |
// ================================================================== |
// ================================================================== |
39 |
/** |
/** |
124 |
float dedx_x[NTRKMAX][6]; |
float dedx_x[NTRKMAX][6]; |
125 |
float dedx_y[NTRKMAX][6]; |
float dedx_y[NTRKMAX][6]; |
126 |
float bdl[NTRKMAX]; |
float bdl[NTRKMAX]; |
127 |
|
|
128 |
|
void InitcTrkLevel2(){ |
129 |
|
|
130 |
|
good2 = 0; |
131 |
|
for(Int_t i=0; i<12 ; i++) |
132 |
|
crc[i] = 0; |
133 |
|
// ---------------------------- |
134 |
|
nclsx = 0; |
135 |
|
nclsy = 0; |
136 |
|
for(Int_t i=0; i<NSINGMAX ; i++){ |
137 |
|
planex[i] = 0; |
138 |
|
xs[i][0] = 0; |
139 |
|
xs[i][1] = 0; |
140 |
|
signlxs[i] = 0; |
141 |
|
planey[i] = 0; |
142 |
|
ys[i][0] = 0; |
143 |
|
ys[i][1] = 0; |
144 |
|
signlys[i] = 0; |
145 |
|
} |
146 |
|
// ---------------------------- |
147 |
|
ntrk =0 ; |
148 |
|
|
149 |
|
for(Int_t i=0; i<NTRKMAX ; i++){ |
150 |
|
image[i] = 0; |
151 |
|
chi2_nt[i] = 0; |
152 |
|
bdl[i] = 0; |
153 |
|
|
154 |
|
for(Int_t ii=0; ii<5 ; ii++){ |
155 |
|
al_nt[i][ii] = 0; |
156 |
|
for(Int_t iii=0; iii<5 ; iii++) |
157 |
|
coval[i][ii][iii] = 0; |
158 |
|
} |
159 |
|
|
160 |
|
for(Int_t ii=0; ii<6 ; ii++){ |
161 |
|
xm_nt[i][ii] = 0; |
162 |
|
ym_nt[i][ii] = 0; |
163 |
|
zm_nt[i][ii] = 0; |
164 |
|
resx_nt[i][ii] = 0; |
165 |
|
resy_nt[i][ii] = 0; |
166 |
|
xgood_nt[i][ii] = 0; |
167 |
|
ygood_nt[i][ii] = 0; |
168 |
|
xv_nt[i][ii] = 0; |
169 |
|
yv_nt[i][ii] = 0; |
170 |
|
zv_nt[i][ii] = 0; |
171 |
|
axv_nt[i][ii] = 0; |
172 |
|
ayv_nt[i][ii] = 0; |
173 |
|
dedx_x[i][ii] = 0; |
174 |
|
dedx_y[i][ii] = 0; |
175 |
|
} |
176 |
|
} |
177 |
|
} |
178 |
|
|
179 |
}; |
}; |
180 |
// ================================================================== |
// ================================================================== |
181 |
/** |
/** |
184 |
struct cPath { |
struct cPath { |
185 |
char path[80]; |
char path[80]; |
186 |
int pathlen; |
int pathlen; |
187 |
int error; |
int error; |
|
int debug; |
|
188 |
/** |
/** |
189 |
* Fill the struct variables from a TString object |
* Fill the struct variables from a TString object |
190 |
*/ |
*/ |
191 |
void FillWith(TString s){ |
void FillWith(TString s){ |
192 |
pathlen = s.Length(); |
pathlen = s.Length(); |
193 |
const char *pc = s.Data(); |
const char *pc = s.Data(); |
194 |
for(Int_t i=0; i<=pathlen; i++) path[i] = *pc++; |
for(Int_t i=0; i<=pathlen; i++) path[i] = *pc++; |
195 |
}; |
}; |
196 |
|
|
197 |
void SetDebug(){ debug=1;}; |
|
|
|
|
198 |
}; |
}; |
199 |
|
|
200 |
// ================================================================== |
// ================================================================== |
205 |
char b_path[80]; |
char b_path[80]; |
206 |
int b_pathlen; |
int b_pathlen; |
207 |
int b_error; |
int b_error; |
|
int b_debug; |
|
208 |
int b_loaded; |
int b_loaded; |
209 |
/** |
/** |
210 |
* Fill the struct variables from a TString object and set |
* Fill the struct variables from a TString object and set |
220 |
* Fill the struct variables from a TString object |
* Fill the struct variables from a TString object |
221 |
*/ |
*/ |
222 |
int BIsLoaded(){ return b_loaded; }; |
int BIsLoaded(){ return b_loaded; }; |
|
void SetDebug(){ b_debug=1; }; |
|
223 |
|
|
224 |
}; |
}; |
225 |
|
|
226 |
|
// ================================================================== |
227 |
|
/** |
228 |
|
* \brief Struct to set debug mode in F77 routines |
229 |
|
*/ |
230 |
|
struct cDbg { |
231 |
|
int debug; |
232 |
|
int verbose; |
233 |
|
int warning; |
234 |
|
// bool debug; |
235 |
|
// bool verbose; |
236 |
|
void SetNone() {debug=0; verbose=0; warning=0;}; |
237 |
|
void SetWarning(){debug=0; verbose=0; warning=1;}; |
238 |
|
void SetVerbose(){debug=0; verbose=1; warning=1;}; |
239 |
|
void SetDebug() {debug=1; verbose=1; warning=1;}; |
240 |
|
}; |
241 |
|
|
242 |
|
extern "C" { |
243 |
|
extern struct cTrkCalib pedsigbad_; |
244 |
|
extern struct cTrkLevel0 level0event_; |
245 |
|
extern struct cTrkLevel1 level1event_; |
246 |
|
extern struct cTrkLevel2 level2event_; |
247 |
|
extern struct cPath path_; |
248 |
|
extern struct cBPath bpath_; |
249 |
|
extern struct cDbg dbg_; |
250 |
|
void fillpedsigfromdefault_(); |
251 |
|
int readmipparam_(); |
252 |
|
int readchargeparam_(); |
253 |
|
int readvkmask_(); |
254 |
|
int readalignparam_(); |
255 |
|
int readetaparam_(); |
256 |
|
void reductionflight_(int*); |
257 |
|
int analysisflight_(); |
258 |
|
} |
259 |
|
|
260 |
|
|
261 |
#endif |
#endif |
262 |
|
|