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