7 |
#define trkstruct_h |
#define trkstruct_h |
8 |
|
|
9 |
#define NPLANE 6 |
#define NPLANE 6 |
10 |
|
#define NVIEW 12 |
11 |
|
#define NVK 24 |
12 |
|
#define NLADDER 3 |
13 |
|
#define NSENSOR 2 |
14 |
|
|
15 |
#define NCLMAX_VIEW 200 //max n.clusters per view |
#define NCLMAX_VIEW 200 //max n.clusters per view |
16 |
#define NCLSTR 20 //max n.strip per cluster |
#define NCLSTR 20 //max n.strip per cluster |
25 |
#define NTRKMAX 10 |
#define NTRKMAX 10 |
26 |
#define NSINGMAX NCLMAX //100 |
#define NSINGMAX NCLMAX //100 |
27 |
|
|
28 |
|
#define NANGMAX 21 |
29 |
|
#define NETAVALMAX 500 |
30 |
|
|
31 |
|
#define NTRACKSMAX (NCLOYZ_MAX*NCLOXZ_MAX) |
32 |
|
|
33 |
#include <CalibTrk1Event.h> |
#include <CalibTrk1Event.h> |
34 |
#include <CalibTrk2Event.h> |
#include <CalibTrk2Event.h> |
35 |
|
using namespace pamela; |
36 |
|
//#include <TrkCalib.h> |
37 |
|
|
38 |
#include <TString.h> |
#include <TString.h> |
39 |
#include <TFile.h> |
#include <TFile.h> |
40 |
#include <TTree.h> |
#include <TTree.h> |
41 |
|
|
42 |
|
|
43 |
|
|
44 |
#include <fstream> |
#include <fstream> |
45 |
#include <iostream> |
#include <iostream> |
46 |
/** |
/** |
54 |
float sigma_t[128][24][12]; |
float sigma_t[128][24][12]; |
55 |
int bad[128][24][12]; |
int bad[128][24][12]; |
56 |
|
|
57 |
void FillACalibFrom(TFile* , Int_t , Int_t ); |
void Reset(){ |
58 |
void FillFCalibFrom(TFile* , Int_t , Int_t ); |
for(int is=0; is<128; is++){ |
59 |
void FillTCalibFrom(TFile* , Int_t , Int_t ); |
for(int ivk=0; ivk<24; ivk++){ |
60 |
void FillTCalibFrom(TString); |
for(int iv=0; iv<12; iv++){ |
61 |
|
pedestal[is][ivk][iv]=0.; |
62 |
|
pedestal_t[is][ivk][iv]=0.; |
63 |
|
sigma[is][ivk][iv]=0.; |
64 |
|
sigma_t[is][ivk][iv]=0.; |
65 |
|
bad[is][ivk][iv]=1; |
66 |
|
} |
67 |
|
} |
68 |
|
} |
69 |
|
} |
70 |
|
|
71 |
|
/* void FillACalibFrom(TFile* , Int_t , Int_t ); */ |
72 |
|
/* void FillFCalibFrom(TFile* , Int_t , Int_t ); */ |
73 |
|
/* void FillTCalibFrom(TFile* , Int_t , Int_t ); */ |
74 |
|
/* void FillTCalibFrom(TString); */ |
75 |
|
|
76 |
}; |
}; |
77 |
// ================================================================== |
// ================================================================== |
132 |
float cnrmsev[24][12]; |
float cnrmsev[24][12]; |
133 |
int fshower[12]; |
int fshower[12]; |
134 |
int whichtrack[NCLMAX]; |
int whichtrack[NCLMAX]; |
135 |
|
|
136 |
}; |
}; |
137 |
// ================================================================== |
// ================================================================== |
138 |
/** |
/** |
141 |
struct cTrkLevel2 { |
struct cTrkLevel2 { |
142 |
// int good2; |
// int good2; |
143 |
// int crc[12]; |
// int crc[12]; |
144 |
int good[12]; |
int good[12]; |
145 |
|
int vkflag[24][12]; |
146 |
// ---------------------------- |
// ---------------------------- |
147 |
int nclsx; |
int nclsx; |
148 |
int planex[NSINGMAX]; |
int planex[NSINGMAX]; |
149 |
float xs[NSINGMAX][2]; |
float xs[NSINGMAX][2]; |
150 |
float signlxs[NSINGMAX]; |
float signlxs[NSINGMAX]; |
151 |
int clsx[NSINGMAX]; |
int clsx[NSINGMAX]; |
152 |
|
int sxbad[NSINGMAX]; |
153 |
|
int multmaxsx[NSINGMAX]; |
154 |
// ---------------------------- |
// ---------------------------- |
155 |
int nclsy; |
int nclsy; |
156 |
int planey[NSINGMAX]; |
int planey[NSINGMAX]; |
157 |
float ys[NSINGMAX][2]; |
float ys[NSINGMAX][2]; |
158 |
float signlys[NSINGMAX]; |
float signlys[NSINGMAX]; |
159 |
int clsy[NSINGMAX]; |
int clsy[NSINGMAX]; |
160 |
|
int sybad[NSINGMAX]; |
161 |
|
int multmaxsy[NSINGMAX]; |
162 |
// ---------------------------- |
// ---------------------------- |
163 |
int ntrk; |
int ntrk; |
164 |
int image[NTRKMAX]; |
int image[NTRKMAX]; |
167 |
float zm_nt[NTRKMAX][6]; |
float zm_nt[NTRKMAX][6]; |
168 |
float resx_nt[NTRKMAX][6]; |
float resx_nt[NTRKMAX][6]; |
169 |
float resy_nt[NTRKMAX][6]; |
float resy_nt[NTRKMAX][6]; |
170 |
|
float tailx[NTRKMAX][6]; |
171 |
|
float taily[NTRKMAX][6]; |
172 |
float al_nt[NTRKMAX][5]; |
float al_nt[NTRKMAX][5]; |
173 |
float coval[NTRKMAX][5][5]; |
float coval[NTRKMAX][5][5]; |
174 |
float chi2_nt[NTRKMAX]; |
float chi2_nt[NTRKMAX]; |
175 |
int nstep_nt[NTRKMAX]; |
int nstep_nt[NTRKMAX]; |
176 |
int xgood_nt[NTRKMAX][6]; |
int xgood_nt[NTRKMAX][6]; |
177 |
int ygood_nt[NTRKMAX][6]; |
int ygood_nt[NTRKMAX][6]; |
178 |
|
int ls[NTRKMAX][6]; |
179 |
|
int xbad[NTRKMAX][6]; |
180 |
|
int ybad[NTRKMAX][6]; |
181 |
float xv_nt[NTRKMAX][6]; |
float xv_nt[NTRKMAX][6]; |
182 |
float yv_nt[NTRKMAX][6]; |
float yv_nt[NTRKMAX][6]; |
183 |
float zv_nt[NTRKMAX][6]; |
float zv_nt[NTRKMAX][6]; |
187 |
float dedx_y[NTRKMAX][6]; |
float dedx_y[NTRKMAX][6]; |
188 |
int cltrx[NTRKMAX][6]; |
int cltrx[NTRKMAX][6]; |
189 |
int cltry[NTRKMAX][6]; |
int cltry[NTRKMAX][6]; |
190 |
|
int multmaxx[NTRKMAX][6]; |
191 |
|
int multmaxy[NTRKMAX][6]; |
192 |
|
float seedx[NTRKMAX][6]; |
193 |
|
float seedy[NTRKMAX][6]; |
194 |
|
float xpu[NTRKMAX][6]; |
195 |
|
float ypu[NTRKMAX][6]; |
196 |
// float bdl[NTRKMAX]; |
// float bdl[NTRKMAX]; |
197 |
|
|
198 |
void InitcTrkLevel2(){ |
void InitcTrkLevel2(){ |
199 |
|
|
200 |
// good2 = 0; |
// good2 = 0; |
201 |
for(Int_t i=0; i<12 ; i++) |
for(Int_t i=0; i<12 ; i++){ |
202 |
// crc[i] = 0; |
good[i] = 0; |
203 |
good[i] = 0; |
for(Int_t ii=0; ii<24 ; ii++)vkflag[ii][i]=0; |
204 |
// ---------------------------- |
} |
205 |
nclsx = 0; |
// ---------------------------- |
206 |
nclsy = 0; |
nclsx = 0; |
207 |
for(Int_t i=0; i<NSINGMAX ; i++){ |
nclsy = 0; |
208 |
planex[i] = 0; |
for(Int_t i=0; i<NSINGMAX ; i++){ |
209 |
xs[i][0] = 0; |
planex[i] = 0; |
210 |
xs[i][1] = 0; |
xs[i][0] = 0; |
211 |
signlxs[i] = 0; |
xs[i][1] = 0; |
212 |
planey[i] = 0; |
signlxs[i] = 0; |
213 |
ys[i][0] = 0; |
clsx[i] = 0; |
214 |
ys[i][1] = 0; |
sxbad[i] = 0; |
215 |
signlys[i] = 0; |
planey[i] = 0; |
216 |
} |
ys[i][0] = 0; |
217 |
// ---------------------------- |
ys[i][1] = 0; |
218 |
ntrk =0 ; |
signlys[i] = 0; |
219 |
|
clsy[i] = 0; |
220 |
for(Int_t i=0; i<NTRKMAX ; i++){ |
sybad[i] = 0; |
221 |
image[i] = 0; |
} |
222 |
chi2_nt[i] = 0; |
// ---------------------------- |
223 |
|
ntrk =0 ; |
224 |
|
|
225 |
|
for(Int_t i=0; i<NTRKMAX ; i++){ |
226 |
|
image[i] = 0; |
227 |
|
chi2_nt[i] = 0; |
228 |
// bdl[i] = 0; |
// bdl[i] = 0; |
229 |
|
|
230 |
for(Int_t ii=0; ii<5 ; ii++){ |
for(Int_t ii=0; ii<5 ; ii++){ |
231 |
al_nt[i][ii] = 0; |
al_nt[i][ii] = 0; |
232 |
for(Int_t iii=0; iii<5 ; iii++) |
for(Int_t iii=0; iii<5 ; iii++) |
233 |
coval[i][ii][iii] = 0; |
coval[i][ii][iii] = 0; |
234 |
} |
} |
235 |
|
|
236 |
for(Int_t ii=0; ii<6 ; ii++){ |
for(Int_t ii=0; ii<6 ; ii++){ |
237 |
xm_nt[i][ii] = 0; |
xm_nt[i][ii] = 0; |
238 |
ym_nt[i][ii] = 0; |
ym_nt[i][ii] = 0; |
239 |
zm_nt[i][ii] = 0; |
zm_nt[i][ii] = 0; |
240 |
resx_nt[i][ii] = 0; |
resx_nt[i][ii] = 0; |
241 |
resy_nt[i][ii] = 0; |
resy_nt[i][ii] = 0; |
242 |
xgood_nt[i][ii] = 0; |
xgood_nt[i][ii] = 0; |
243 |
ygood_nt[i][ii] = 0; |
ygood_nt[i][ii] = 0; |
244 |
xv_nt[i][ii] = 0; |
xv_nt[i][ii] = 0; |
245 |
yv_nt[i][ii] = 0; |
yv_nt[i][ii] = 0; |
246 |
zv_nt[i][ii] = 0; |
zv_nt[i][ii] = 0; |
247 |
axv_nt[i][ii] = 0; |
axv_nt[i][ii] = 0; |
248 |
ayv_nt[i][ii] = 0; |
ayv_nt[i][ii] = 0; |
249 |
dedx_x[i][ii] = 0; |
dedx_x[i][ii] = 0; |
250 |
dedx_y[i][ii] = 0; |
dedx_y[i][ii] = 0; |
251 |
} |
multmaxx[i][ii] = 0; |
252 |
|
multmaxy[i][ii] = 0; |
253 |
|
seedx[i][ii] = 0; |
254 |
|
seedy[i][ii] = 0; |
255 |
|
xpu[i][ii] = 0; |
256 |
|
ypu[i][ii] = 0; |
257 |
|
} |
258 |
|
} |
259 |
} |
} |
260 |
} |
|
|
|
|
261 |
}; |
}; |
262 |
// ================================================================== |
// ================================================================== |
263 |
/** |
/** |
275 |
const char *pc = s.Data(); |
const char *pc = s.Data(); |
276 |
for(Int_t i=0; i<=pathlen; i++) path[i] = *pc++; |
for(Int_t i=0; i<=pathlen; i++) path[i] = *pc++; |
277 |
}; |
}; |
278 |
|
|
|
|
|
279 |
}; |
}; |
280 |
|
|
281 |
// ================================================================== |
// ================================================================== |
282 |
/** |
/* /\** */ |
283 |
* \brief Struct to pass magnetic-field file paths to F77 routines |
/* * \brief Struct to pass magnetic-field file paths to F77 routines */ |
284 |
*/ |
/* *\/ */ |
285 |
struct cBPath { |
/* struct cBPath { */ |
286 |
char b_path[256]; |
/* char b_path[256]; */ |
287 |
int b_pathlen; |
/* int b_pathlen; */ |
288 |
int b_error; |
/* int b_error; */ |
289 |
int b_loaded; |
/* int b_loaded; */ |
290 |
/** |
/* /\** */ |
291 |
* Fill the struct variables from a TString object and set |
/* * Fill the struct variables from a TString object and set */ |
292 |
* the load flag to FALSE. |
/* * the load flag to FALSE. */ |
293 |
*/ |
/* *\/ */ |
294 |
void FillWith(TString s){ |
/* void FillWith(TString s){ */ |
295 |
b_loaded = 0; |
/* b_loaded = 0; */ |
296 |
b_pathlen = s.Length(); |
/* b_pathlen = s.Length(); */ |
297 |
const char *pc = s.Data(); |
/* const char *pc = s.Data(); */ |
298 |
for(Int_t i=0; i<=b_pathlen; i++) b_path[i] = *pc++; |
/* for(Int_t i=0; i<=b_pathlen; i++) b_path[i] = *pc++; */ |
299 |
}; |
/* }; */ |
300 |
/** |
/* /\** */ |
301 |
* Fill the struct variables from a TString object |
/* * Fill the struct variables from a TString object */ |
302 |
*/ |
/* *\/ */ |
303 |
int BIsLoaded(){ return b_loaded; }; |
/* int BIsLoaded(){ return b_loaded; }; */ |
304 |
|
|
305 |
}; |
/* }; */ |
306 |
|
|
307 |
// ================================================================== |
// ================================================================== |
308 |
/** |
/** |
328 |
struct cMini2track { |
struct cMini2track { |
329 |
double al[5]; |
double al[5]; |
330 |
double xm[NPLANE],ym[NPLANE],zm[NPLANE]; |
double xm[NPLANE],ym[NPLANE],zm[NPLANE]; |
331 |
double xm_a[NPLANE],ym_a[NPLANE]; |
double xm_a[NPLANE],ym_a[NPLANE],zm_a[NPLANE]; |
332 |
double xm_b[NPLANE],ym_b[NPLANE]; |
double xm_b[NPLANE],ym_b[NPLANE],zm_b[NPLANE]; |
333 |
double resx[NPLANE],resy[NPLANE]; |
double resx[NPLANE],resy[NPLANE]; |
334 |
|
double tailx[NPLANE],taily[NPLANE]; |
335 |
double xgood[NPLANE],ygood[NPLANE]; |
double xgood[NPLANE],ygood[NPLANE]; |
336 |
double dedxtrk_x[NPLANE]; |
double dedxtrk_x[NPLANE]; |
337 |
double dedxtrk_y[NPLANE]; |
double dedxtrk_y[NPLANE]; |
341 |
double xv[NPLANE],yv[NPLANE],zv[NPLANE]; |
double xv[NPLANE],yv[NPLANE],zv[NPLANE]; |
342 |
double axv[NPLANE],ayv[NPLANE]; |
double axv[NPLANE],ayv[NPLANE]; |
343 |
double cov[5][5]; |
double cov[5][5]; |
344 |
|
double fact; |
345 |
int nstep; |
int nstep; |
346 |
int idcand; |
int idcand; |
347 |
|
int trackmode; |
348 |
|
int istepmin; |
349 |
|
|
350 |
|
/* cMini2track(){ */ |
351 |
|
/* // -------------------------- */ |
352 |
|
/* // fitting routine parameters */ |
353 |
|
/* // -------------------------- */ |
354 |
|
/* zini = 23.5; */ |
355 |
|
/* trackmode = 0; */ |
356 |
|
/* istepmin = 3; */ |
357 |
|
/* // -------------------------- */ |
358 |
|
/* pfixed = 0.; */ |
359 |
|
/* chi2 = 0; */ |
360 |
|
/* nstep = 0; */ |
361 |
|
/* for(int it1=0;it1<5;it1++){ */ |
362 |
|
/* al[it1] = 0; */ |
363 |
|
/* for(int it2=0;it2<5;it2++)cov[it1][it2] = 0; */ |
364 |
|
/* }; */ |
365 |
|
/* for(int ip=0;ip<6;ip++){ */ |
366 |
|
/* xgood[ip] = 0; */ |
367 |
|
/* ygood[ip] = 0; */ |
368 |
|
/* xm[ip] = 0; */ |
369 |
|
/* ym[ip] = 0; */ |
370 |
|
/* xm_a[ip] = 0; */ |
371 |
|
/* ym_a[ip] = 0; */ |
372 |
|
/* xm_b[ip] = 0; */ |
373 |
|
/* ym_b[ip] = 0; */ |
374 |
|
/* zm[ip] = 0; */ |
375 |
|
/* resx[ip] = 0; */ |
376 |
|
/* resy[ip] = 0; */ |
377 |
|
/* xv[ip] = 0; */ |
378 |
|
/* yv[ip] = 0; */ |
379 |
|
/* zv[ip] = 0; */ |
380 |
|
/* axv[ip] = 0; */ |
381 |
|
/* ayv[ip] = 0; */ |
382 |
|
/* dedxtrk_x[ip] = 0; */ |
383 |
|
/* dedxtrk_y[ip] = 0; */ |
384 |
|
/* }; */ |
385 |
|
|
386 |
|
/* } */ |
387 |
|
|
388 |
|
|
389 |
|
}; |
390 |
|
|
391 |
|
// ================================================================== |
392 |
|
/** |
393 |
|
* \brief Struct to pass DELTAB parameters to F77 routines |
394 |
|
*/ |
395 |
|
struct cDeltaB { |
396 |
|
double delta0; |
397 |
|
double delta1; |
398 |
|
double dlt; |
399 |
}; |
}; |
400 |
|
|
401 |
// |
// |
402 |
/** |
/** |
403 |
* \Struct for the hough transform variables |
* \Struct for the hough transform variables |
405 |
|
|
406 |
struct cTrkHough { |
struct cTrkHough { |
407 |
|
|
408 |
int ndblt; |
int ndblt_nt; |
409 |
float alfayz1[NDBLT_MAX_NT]; |
float alfayz1_nt[NDBLT_MAX_NT]; |
410 |
float alfayz2[NDBLT_MAX_NT]; |
float alfayz2_nt[NDBLT_MAX_NT]; |
411 |
int db_cloud[NDBLT_MAX_NT]; |
int db_cloud_nt[NDBLT_MAX_NT]; |
412 |
int ntrpt; |
int ntrpt_nt; |
413 |
float alfaxz1[NTRPT_MAX_NT]; |
float alfaxz1_nt[NTRPT_MAX_NT]; |
414 |
float alfaxz2[NTRPT_MAX_NT]; |
float alfaxz2_nt[NTRPT_MAX_NT]; |
415 |
float alfaxz3[NTRPT_MAX_NT]; |
float alfaxz3_nt[NTRPT_MAX_NT]; |
416 |
int tr_cloud[NTRPT_MAX_NT]; |
int tr_cloud_nt[NTRPT_MAX_NT]; |
417 |
int nclouds_yz; |
int nclouds_yz_nt; |
418 |
float alfayz1_av[NCLOYZ_MAX]; |
float alfayz1_av_nt[NCLOYZ_MAX]; |
419 |
float alfayz2_av[NCLOYZ_MAX]; |
float alfayz2_av_nt[NCLOYZ_MAX]; |
420 |
int ptcloud_yz[NCLOYZ_MAX]; |
int ptcloud_yz_nt[NCLOYZ_MAX]; |
421 |
int nclouds_xz; |
int nclouds_xz_nt; |
422 |
float alfaxz1_av[NCLOXZ_MAX]; |
float alfaxz1_av_nt[NCLOXZ_MAX]; |
423 |
float alfaxz2_av[NCLOXZ_MAX]; |
float alfaxz2_av_nt[NCLOXZ_MAX]; |
424 |
float alfaxz3_av[NCLOXZ_MAX]; |
float alfaxz3_av_nt[NCLOXZ_MAX]; |
425 |
int ptcloud_xz[NCLOXZ_MAX]; |
int ptcloud_xz_nt[NCLOXZ_MAX]; |
426 |
int nclstr; |
int nclstr; |
427 |
float totaltime; |
float totaltime; |
428 |
float houghtime; |
float houghtime; |
431 |
|
|
432 |
void InitcTrkHough(){ |
void InitcTrkHough(){ |
433 |
|
|
434 |
ndblt = 0; |
ndblt_nt = 0; |
435 |
ntrpt = 0; |
ntrpt_nt = 0; |
436 |
nclouds_yz = 0; |
nclouds_yz_nt = 0; |
437 |
nclouds_xz = 0; |
nclouds_xz_nt = 0; |
438 |
nclstr = 0; |
nclstr = 0; |
439 |
totaltime = 0; |
totaltime = 0; |
440 |
houghtime = 0; |
houghtime = 0; |
441 |
fittime = 0; |
fittime = 0; |
442 |
for(int i=0;i<NDBLT_MAX_NT ;i++){ |
for(int i=0;i<NDBLT_MAX_NT ;i++){ |
443 |
alfayz1[i] = 0; |
alfayz1_nt[i] = 0; |
444 |
alfayz2[i] = 0; |
alfayz2_nt[i] = 0; |
445 |
db_cloud[i] = 0; |
db_cloud_nt[i] = 0; |
446 |
} |
} |
447 |
for(int i=0;i<NTRPT_MAX_NT ;i++){ |
for(int i=0;i<NTRPT_MAX_NT ;i++){ |
448 |
alfaxz1[i] = 0; |
alfaxz1_nt[i] = 0; |
449 |
alfaxz2[i] = 0; |
alfaxz2_nt[i] = 0; |
450 |
alfaxz3[i] = 0; |
alfaxz3_nt[i] = 0; |
451 |
tr_cloud[i] = 0; |
tr_cloud_nt[i] = 0; |
452 |
} |
} |
453 |
for(int i=0;i<NCLOYZ_MAX ;i++){ |
for(int i=0;i<NCLOYZ_MAX ;i++){ |
454 |
alfayz1_av[i] = 0; |
alfayz1_av_nt[i] = 0; |
455 |
alfayz2_av[i] = 0; |
alfayz2_av_nt[i] = 0; |
456 |
ptcloud_yz[i] = 0; |
ptcloud_yz_nt[i] = 0; |
457 |
} |
} |
458 |
for(int i=0;i<NCLOXZ_MAX ;i++){ |
for(int i=0;i<NCLOXZ_MAX ;i++){ |
459 |
ptcloud_xz[i] = 0; |
ptcloud_xz_nt[i] = 0; |
460 |
alfaxz1_av[i] = 0; |
alfaxz1_av_nt[i] = 0; |
461 |
alfaxz2_av[i] = 0; |
alfaxz2_av_nt[i] = 0; |
462 |
alfaxz3_av[i] = 0; |
alfaxz3_av_nt[i] = 0; |
463 |
} |
} |
464 |
} |
} |
465 |
|
|
466 |
}; |
}; |
467 |
|
|
468 |
|
/** |
469 |
|
* \Struct for track candidates after hough transform |
470 |
|
*/ |
471 |
|
struct cTrkCandidates { |
472 |
|
int ntracks; |
473 |
|
float al[NTRACKSMAX][5]; |
474 |
|
float xm[NTRACKSMAX][NPLANE]; |
475 |
|
float ym[NTRACKSMAX][NPLANE]; |
476 |
|
float zm[NTRACKSMAX][NPLANE]; |
477 |
|
float resx[NTRACKSMAX][NPLANE]; |
478 |
|
float resy[NTRACKSMAX][NPLANE]; |
479 |
|
float xv[NTRACKSMAX][NPLANE]; |
480 |
|
float yv[NTRACKSMAX][NPLANE]; |
481 |
|
float zv[NTRACKSMAX][NPLANE]; |
482 |
|
float axv[NTRACKSMAX][NPLANE]; |
483 |
|
float ayv[NTRACKSMAX][NPLANE]; |
484 |
|
float xgood[NTRACKSMAX][NPLANE]; |
485 |
|
float ygood[NTRACKSMAX][NPLANE]; |
486 |
|
int cp[NTRACKSMAX][NPLANE]; |
487 |
|
int cls[NTRACKSMAX][NPLANE]; |
488 |
|
int sensor[NTRACKSMAX][NPLANE]; |
489 |
|
int ladder[NTRACKSMAX][NPLANE]; |
490 |
|
float bx[NTRACKSMAX][NPLANE]; |
491 |
|
float by[NTRACKSMAX][NPLANE]; |
492 |
|
float chi2[NTRACKSMAX]; |
493 |
|
|
494 |
|
void Init(){ |
495 |
|
ntracks=0; |
496 |
|
for(int i=0; i<NTRACKSMAX; i++){ |
497 |
|
for(int ii=0; ii<5; ii++)al[i][ii]=0; |
498 |
|
chi2[i]=0; |
499 |
|
for(int ip=0; ip<NPLANE; ip++){ |
500 |
|
xm[i][ip]=0; |
501 |
|
ym[i][ip]=0; |
502 |
|
zm[i][ip]=0; |
503 |
|
resx[i][ip]=0; |
504 |
|
resy[i][ip]=0; |
505 |
|
xv[i][ip]=0; |
506 |
|
yv[i][ip]=0; |
507 |
|
zv[i][ip]=0; |
508 |
|
axv[i][ip]=0; |
509 |
|
ayv[i][ip]=0; |
510 |
|
xgood[i][ip]=0; |
511 |
|
ygood[i][ip]=0; |
512 |
|
cp[i][ip]=0; |
513 |
|
cls[i][ip]=0; |
514 |
|
sensor[i][ip]=0; |
515 |
|
ladder[i][ip]=0; |
516 |
|
bx[i][ip]=0; |
517 |
|
by[i][ip]=0; |
518 |
|
} |
519 |
|
} |
520 |
|
|
521 |
|
}; |
522 |
|
|
523 |
|
|
524 |
|
}; |
525 |
|
|
526 |
|
/** |
527 |
|
* \brief Struct to pass VA1-mask to F77 routines |
528 |
|
*/ |
529 |
|
struct cTrkMask { |
530 |
|
|
531 |
|
int mask_vk[NVK][NVIEW]; |
532 |
|
int mask_vk_run[NVK][NVIEW]; |
533 |
|
|
534 |
|
// void Set(TFile* , Int_t , Int_t ); |
535 |
|
|
536 |
|
void Reset(){ |
537 |
|
for(int ivk=0; ivk<NVK; ivk++){ |
538 |
|
for(int iv=0; iv<NVIEW; iv++){ |
539 |
|
// mask_vk[ivk][iv]=0; |
540 |
|
mask_vk_run[ivk][iv]=0; |
541 |
|
} |
542 |
|
} |
543 |
|
} |
544 |
|
|
545 |
|
void Dump(){ |
546 |
|
} |
547 |
|
|
548 |
|
}; |
549 |
|
|
550 |
|
/** |
551 |
|
* \brief Struct for pfa parameters |
552 |
|
*/ |
553 |
|
struct cTrkETA { |
554 |
|
|
555 |
|
int nangbin; |
556 |
|
float angL[NANGMAX],angR[NANGMAX]; |
557 |
|
int netaval; |
558 |
|
float eta2[NANGMAX][NETAVALMAX]; |
559 |
|
float feta2[NANGMAX][NLADDER][NVIEW][NETAVALMAX]; |
560 |
|
float eta3[NANGMAX][NETAVALMAX]; |
561 |
|
float feta3[NANGMAX][NLADDER][NVIEW][NETAVALMAX]; |
562 |
|
float eta4[NANGMAX][NETAVALMAX]; |
563 |
|
float feta4[NANGMAX][NLADDER][NVIEW][NETAVALMAX]; |
564 |
|
float fcorr[NANGMAX][NLADDER][NVIEW]; |
565 |
|
float e234ax[6];//F77: e2fax,e2tax,e3fax,e3tax,e4fax,e4tax |
566 |
|
float e234ay[6];//F77: e2fay,e2tay,e3fay,e3tay,e4fay,e4tay |
567 |
|
|
568 |
|
}; |
569 |
|
/** |
570 |
|
* \brief Struct to configure data reduction |
571 |
|
*/ |
572 |
|
struct cTrkSW{ |
573 |
|
int pfaid; |
574 |
|
}; |
575 |
|
/** |
576 |
|
* \brief Struct to read alignment parameters |
577 |
|
*/ |
578 |
|
struct cTrkAlign { |
579 |
|
|
580 |
|
double omega[NSENSOR][NLADDER][NPLANE]; |
581 |
|
double beta[NSENSOR][NLADDER][NPLANE]; |
582 |
|
double gamma[NSENSOR][NLADDER][NPLANE]; |
583 |
|
double dx[NSENSOR][NLADDER][NPLANE]; |
584 |
|
double dy[NSENSOR][NLADDER][NPLANE]; |
585 |
|
double dz[NSENSOR][NLADDER][NPLANE]; |
586 |
|
|
587 |
|
}; |
588 |
|
|
589 |
extern "C" { |
extern "C" { |
590 |
|
|
591 |
extern struct cTrkCalib pedsigbad_; |
extern struct cTrkCalib pedsigbad_; |
592 |
|
extern struct cTrkMask mask_; |
593 |
extern struct cTrkLevel0 level0event_; |
extern struct cTrkLevel0 level0event_; |
594 |
extern struct cTrkLevel1 level1event_; |
extern struct cTrkLevel1 level1event_; |
595 |
extern struct cTrkLevel2 level2event_; |
extern struct cTrkLevel2 level2event_; |
596 |
extern struct cPath path_; |
extern struct cPath path_; |
|
extern struct cBPath bpath_; |
|
597 |
extern struct cDbg dbg_; |
extern struct cDbg dbg_; |
598 |
|
extern struct cTrkHough houghevent_; |
599 |
|
extern struct cTrkCandidates trackcandidates_; |
600 |
extern struct cMini2track track_; |
extern struct cMini2track track_; |
601 |
extern struct cTrkHough hough_; |
extern struct cTrkETA pfa_; |
602 |
|
extern struct cTrkSW sw_; |
603 |
|
extern struct cDeltaB deltab_; |
604 |
|
extern struct cTrkAlign alignparameters_; |
605 |
|
|
606 |
void fillpedsigfromdefault_(); |
void fillpedsigfromdefault_(); |
607 |
int readmipparam_(); |
int readmipparam_(); |
611 |
int readetaparam_(); |
int readetaparam_(); |
612 |
void reductionflight_(int*); |
void reductionflight_(int*); |
613 |
int analysisflight_(); |
int analysisflight_(); |
614 |
} |
int readb_(); |
615 |
|
void gufld_(float*, float*); |
616 |
|
void xyzpam_(int*,int*,int*,int*,int*,float*,float*,float*,float*); |
617 |
|
float riseta_(int*,float*); |
618 |
|
void chisq_(int*, int*); |
619 |
|
|
620 |
|
}; |
621 |
|
|
622 |
#endif |
#endif |
|
|
|