6 |
#ifndef trkstruct_h |
#ifndef trkstruct_h |
7 |
#define trkstruct_h |
#define trkstruct_h |
8 |
|
|
9 |
|
#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 |
18 |
|
#define NCLSTR 20 //max n.strip per cluster |
19 |
|
#define NCLMAX (NCLMAX_VIEW*12) //max n.clusters total |
20 |
|
#define NCLBUFF (NCLMAX*NCLSTR) |
21 |
|
|
22 |
|
#define NDBLT_MAX_NT 1000 // 0.2*ndblt_max |
23 |
|
#define NTRPT_MAX_NT 10000 // 0.2*ntrpt_max |
24 |
|
#define NCLOYZ_MAX 200 |
25 |
|
#define NCLOXZ_MAX 200 |
26 |
|
|
27 |
#define NTRKMAX 10 |
#define NTRKMAX 10 |
28 |
#define NSINGMAX 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 |
// ================================================================== |
// ================================================================== |
114 |
* \brief Struct to pass tracker LEVEL1 data to F77 routines |
* \brief Struct to pass tracker LEVEL1 data to F77 routines |
115 |
*/ |
*/ |
116 |
struct cTrkLevel1 { |
struct cTrkLevel1 { |
117 |
int good1; |
// int good1; |
118 |
|
int good[12]; |
119 |
int nclstr1; |
int nclstr1; |
120 |
int view[500]; |
int view[NCLMAX]; |
121 |
int ladder[500]; |
int ladder[NCLMAX]; |
122 |
int maxs[500]; |
int maxs[NCLMAX]; |
123 |
int mult[500]; |
int mult[NCLMAX]; |
124 |
float dedx[500]; |
float dedx[NCLMAX]; |
125 |
int indstart[500]; |
int indstart[NCLMAX]; |
126 |
int indmax[500]; |
int indmax[NCLMAX]; |
127 |
int totCLlength; |
int totCLlength; |
128 |
float clsignal[8500]; |
float clsignal[NCLBUFF]; |
129 |
float cnev[24][12]; |
float clsigma[NCLBUFF]; |
130 |
|
int cladc[NCLBUFF]; |
131 |
|
int clbad[NCLBUFF]; |
132 |
|
float cnev[24][12]; |
133 |
|
int cnnev[24][12]; |
134 |
|
float cnrmsev[24][12]; |
135 |
|
int fshower[12]; |
136 |
|
int whichtrack[NCLMAX]; |
137 |
|
|
138 |
}; |
}; |
139 |
// ================================================================== |
// ================================================================== |
140 |
/** |
/** |
141 |
* \brief Struct to pass tracker LEVEL2 data to F77 routines |
* \brief Struct to pass tracker LEVEL2 data to F77 routines |
142 |
*/ |
*/ |
143 |
struct cTrkLevel2 { |
struct cTrkLevel2 { |
144 |
int good2; |
// int good2; |
145 |
int crc[12]; |
// int crc[12]; |
146 |
|
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]; |
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]; |
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]; |
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]; |
187 |
float ayv_nt[NTRKMAX][6]; |
float ayv_nt[NTRKMAX][6]; |
188 |
float dedx_x[NTRKMAX][6]; |
float dedx_x[NTRKMAX][6]; |
189 |
float dedx_y[NTRKMAX][6]; |
float dedx_y[NTRKMAX][6]; |
190 |
float bdl[NTRKMAX]; |
int cltrx[NTRKMAX][6]; |
191 |
|
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]; |
199 |
|
|
200 |
|
void InitcTrkLevel2(){ |
201 |
|
|
202 |
|
// good2 = 0; |
203 |
|
for(Int_t i=0; i<12 ; i++){ |
204 |
|
good[i] = 0; |
205 |
|
for(Int_t ii=0; ii<24 ; ii++)vkflag[ii][i]=0; |
206 |
|
} |
207 |
|
// ---------------------------- |
208 |
|
nclsx = 0; |
209 |
|
nclsy = 0; |
210 |
|
for(Int_t i=0; i<NSINGMAX ; i++){ |
211 |
|
planex[i] = 0; |
212 |
|
xs[i][0] = 0; |
213 |
|
xs[i][1] = 0; |
214 |
|
signlxs[i] = 0; |
215 |
|
clsx[i] = 0; |
216 |
|
sxbad[i] = 0; |
217 |
|
planey[i] = 0; |
218 |
|
ys[i][0] = 0; |
219 |
|
ys[i][1] = 0; |
220 |
|
signlys[i] = 0; |
221 |
|
clsy[i] = 0; |
222 |
|
sybad[i] = 0; |
223 |
|
} |
224 |
|
// ---------------------------- |
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; |
231 |
|
|
232 |
|
for(Int_t ii=0; ii<5 ; ii++){ |
233 |
|
al_nt[i][ii] = 0; |
234 |
|
for(Int_t iii=0; iii<5 ; iii++) |
235 |
|
coval[i][ii][iii] = 0; |
236 |
|
} |
237 |
|
|
238 |
|
for(Int_t ii=0; ii<6 ; ii++){ |
239 |
|
xm_nt[i][ii] = 0; |
240 |
|
ym_nt[i][ii] = 0; |
241 |
|
zm_nt[i][ii] = 0; |
242 |
|
resx_nt[i][ii] = 0; |
243 |
|
resy_nt[i][ii] = 0; |
244 |
|
xgood_nt[i][ii] = 0; |
245 |
|
ygood_nt[i][ii] = 0; |
246 |
|
xv_nt[i][ii] = 0; |
247 |
|
yv_nt[i][ii] = 0; |
248 |
|
zv_nt[i][ii] = 0; |
249 |
|
axv_nt[i][ii] = 0; |
250 |
|
ayv_nt[i][ii] = 0; |
251 |
|
dedx_x[i][ii] = 0; |
252 |
|
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 |
/** |
/** |
266 |
* \brief Struct to pass calibration/parameter file paths to F77 routines |
* \brief Struct to pass calibration/parameter file paths to F77 routines |
267 |
*/ |
*/ |
268 |
struct cPath { |
struct cPath { |
269 |
char path[80]; |
char path[256]; |
270 |
int pathlen; |
int pathlen; |
271 |
int error; |
int error; |
272 |
/** |
/** |
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[80]; |
/* 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 |
/** |
/** |
322 |
void SetDebug() {debug=1; verbose=1; warning=1;}; |
void SetDebug() {debug=1; verbose=1; warning=1;}; |
323 |
}; |
}; |
324 |
|
|
325 |
|
|
326 |
|
// ================================================================== |
327 |
|
/** |
328 |
|
* \brief Struct to pass mini2 track parameters to F77 routines |
329 |
|
*/ |
330 |
|
struct cMini2track { |
331 |
|
double al[5]; |
332 |
|
double xm[NPLANE],ym[NPLANE],zm[NPLANE]; |
333 |
|
double xm_a[NPLANE],ym_a[NPLANE],zm_a[NPLANE]; |
334 |
|
double xm_b[NPLANE],ym_b[NPLANE],zm_b[NPLANE]; |
335 |
|
double resx[NPLANE],resy[NPLANE]; |
336 |
|
double tailx[NPLANE],taily[NPLANE]; |
337 |
|
double xgood[NPLANE],ygood[NPLANE]; |
338 |
|
double dedxtrk_x[NPLANE]; |
339 |
|
double dedxtrk_y[NPLANE]; |
340 |
|
double zini; |
341 |
|
double pfixed; |
342 |
|
double chi2; |
343 |
|
double xv[NPLANE],yv[NPLANE],zv[NPLANE]; |
344 |
|
double xv_a[NPLANE],yv_a[NPLANE],zv_a[NPLANE]; |
345 |
|
double xv_b[NPLANE],yv_b[NPLANE],zv_b[NPLANE]; |
346 |
|
double axv[NPLANE],ayv[NPLANE]; |
347 |
|
double cov[5][5]; |
348 |
|
double fact; |
349 |
|
int nstep; |
350 |
|
int idcand; |
351 |
|
int trackmode; |
352 |
|
int istepmin; |
353 |
|
|
354 |
|
/* cMini2track(){ */ |
355 |
|
/* // -------------------------- */ |
356 |
|
/* // fitting routine parameters */ |
357 |
|
/* // -------------------------- */ |
358 |
|
/* zini = 23.5; */ |
359 |
|
/* trackmode = 0; */ |
360 |
|
/* istepmin = 3; */ |
361 |
|
/* // -------------------------- */ |
362 |
|
/* pfixed = 0.; */ |
363 |
|
/* chi2 = 0; */ |
364 |
|
/* nstep = 0; */ |
365 |
|
/* for(int it1=0;it1<5;it1++){ */ |
366 |
|
/* al[it1] = 0; */ |
367 |
|
/* for(int it2=0;it2<5;it2++)cov[it1][it2] = 0; */ |
368 |
|
/* }; */ |
369 |
|
/* for(int ip=0;ip<6;ip++){ */ |
370 |
|
/* xgood[ip] = 0; */ |
371 |
|
/* ygood[ip] = 0; */ |
372 |
|
/* xm[ip] = 0; */ |
373 |
|
/* ym[ip] = 0; */ |
374 |
|
/* xm_a[ip] = 0; */ |
375 |
|
/* ym_a[ip] = 0; */ |
376 |
|
/* xm_b[ip] = 0; */ |
377 |
|
/* ym_b[ip] = 0; */ |
378 |
|
/* zm[ip] = 0; */ |
379 |
|
/* resx[ip] = 0; */ |
380 |
|
/* resy[ip] = 0; */ |
381 |
|
/* xv[ip] = 0; */ |
382 |
|
/* yv[ip] = 0; */ |
383 |
|
/* zv[ip] = 0; */ |
384 |
|
/* axv[ip] = 0; */ |
385 |
|
/* ayv[ip] = 0; */ |
386 |
|
/* dedxtrk_x[ip] = 0; */ |
387 |
|
/* dedxtrk_y[ip] = 0; */ |
388 |
|
/* }; */ |
389 |
|
|
390 |
|
/* } */ |
391 |
|
|
392 |
|
|
393 |
|
}; |
394 |
|
|
395 |
|
// ================================================================== |
396 |
|
/** |
397 |
|
* \brief Struct to pass DELTAB parameters to F77 routines |
398 |
|
*/ |
399 |
|
struct cDeltaB { |
400 |
|
double delta0; |
401 |
|
double delta1; |
402 |
|
double dlt; |
403 |
|
}; |
404 |
|
|
405 |
|
// |
406 |
|
/** |
407 |
|
* \Struct for the hough transform variables |
408 |
|
*/ |
409 |
|
|
410 |
|
struct cTrkHough { |
411 |
|
|
412 |
|
int ndblt_nt; |
413 |
|
float alfayz1_nt[NDBLT_MAX_NT]; |
414 |
|
float alfayz2_nt[NDBLT_MAX_NT]; |
415 |
|
int db_cloud_nt[NDBLT_MAX_NT]; |
416 |
|
int ntrpt_nt; |
417 |
|
float alfaxz1_nt[NTRPT_MAX_NT]; |
418 |
|
float alfaxz2_nt[NTRPT_MAX_NT]; |
419 |
|
float alfaxz3_nt[NTRPT_MAX_NT]; |
420 |
|
int tr_cloud_nt[NTRPT_MAX_NT]; |
421 |
|
int nclouds_yz_nt; |
422 |
|
float alfayz1_av_nt[NCLOYZ_MAX]; |
423 |
|
float alfayz2_av_nt[NCLOYZ_MAX]; |
424 |
|
int ptcloud_yz_nt[NCLOYZ_MAX]; |
425 |
|
int nclouds_xz_nt; |
426 |
|
float alfaxz1_av_nt[NCLOXZ_MAX]; |
427 |
|
float alfaxz2_av_nt[NCLOXZ_MAX]; |
428 |
|
float alfaxz3_av_nt[NCLOXZ_MAX]; |
429 |
|
int ptcloud_xz_nt[NCLOXZ_MAX]; |
430 |
|
int nclstr; |
431 |
|
float totaltime; |
432 |
|
float houghtime; |
433 |
|
float fittime; |
434 |
|
|
435 |
|
|
436 |
|
void InitcTrkHough(){ |
437 |
|
|
438 |
|
ndblt_nt = 0; |
439 |
|
ntrpt_nt = 0; |
440 |
|
nclouds_yz_nt = 0; |
441 |
|
nclouds_xz_nt = 0; |
442 |
|
nclstr = 0; |
443 |
|
totaltime = 0; |
444 |
|
houghtime = 0; |
445 |
|
fittime = 0; |
446 |
|
for(int i=0;i<NDBLT_MAX_NT ;i++){ |
447 |
|
alfayz1_nt[i] = 0; |
448 |
|
alfayz2_nt[i] = 0; |
449 |
|
db_cloud_nt[i] = 0; |
450 |
|
} |
451 |
|
for(int i=0;i<NTRPT_MAX_NT ;i++){ |
452 |
|
alfaxz1_nt[i] = 0; |
453 |
|
alfaxz2_nt[i] = 0; |
454 |
|
alfaxz3_nt[i] = 0; |
455 |
|
tr_cloud_nt[i] = 0; |
456 |
|
} |
457 |
|
for(int i=0;i<NCLOYZ_MAX ;i++){ |
458 |
|
alfayz1_av_nt[i] = 0; |
459 |
|
alfayz2_av_nt[i] = 0; |
460 |
|
ptcloud_yz_nt[i] = 0; |
461 |
|
} |
462 |
|
for(int i=0;i<NCLOXZ_MAX ;i++){ |
463 |
|
ptcloud_xz_nt[i] = 0; |
464 |
|
alfaxz1_av_nt[i] = 0; |
465 |
|
alfaxz2_av_nt[i] = 0; |
466 |
|
alfaxz3_av_nt[i] = 0; |
467 |
|
} |
468 |
|
} |
469 |
|
|
470 |
|
}; |
471 |
|
|
472 |
|
/** |
473 |
|
* \Struct for track candidates after hough transform |
474 |
|
*/ |
475 |
|
struct cTrkCandidates { |
476 |
|
int ntracks; |
477 |
|
float al[NTRACKSMAX][5]; |
478 |
|
float xm[NTRACKSMAX][NPLANE]; |
479 |
|
float ym[NTRACKSMAX][NPLANE]; |
480 |
|
float zm[NTRACKSMAX][NPLANE]; |
481 |
|
float resx[NTRACKSMAX][NPLANE]; |
482 |
|
float resy[NTRACKSMAX][NPLANE]; |
483 |
|
float xv[NTRACKSMAX][NPLANE]; |
484 |
|
float yv[NTRACKSMAX][NPLANE]; |
485 |
|
float zv[NTRACKSMAX][NPLANE]; |
486 |
|
float axv[NTRACKSMAX][NPLANE]; |
487 |
|
float ayv[NTRACKSMAX][NPLANE]; |
488 |
|
float xgood[NTRACKSMAX][NPLANE]; |
489 |
|
float ygood[NTRACKSMAX][NPLANE]; |
490 |
|
int cp[NTRACKSMAX][NPLANE]; |
491 |
|
int cls[NTRACKSMAX][NPLANE]; |
492 |
|
int sensor[NTRACKSMAX][NPLANE]; |
493 |
|
int ladder[NTRACKSMAX][NPLANE]; |
494 |
|
float bx[NTRACKSMAX][NPLANE]; |
495 |
|
float by[NTRACKSMAX][NPLANE]; |
496 |
|
float chi2[NTRACKSMAX]; |
497 |
|
|
498 |
|
void Init(){ |
499 |
|
ntracks=0; |
500 |
|
for(int i=0; i<NTRACKSMAX; i++){ |
501 |
|
for(int ii=0; ii<5; ii++)al[i][ii]=0; |
502 |
|
chi2[i]=0; |
503 |
|
for(int ip=0; ip<NPLANE; ip++){ |
504 |
|
xm[i][ip]=0; |
505 |
|
ym[i][ip]=0; |
506 |
|
zm[i][ip]=0; |
507 |
|
resx[i][ip]=0; |
508 |
|
resy[i][ip]=0; |
509 |
|
xv[i][ip]=0; |
510 |
|
yv[i][ip]=0; |
511 |
|
zv[i][ip]=0; |
512 |
|
axv[i][ip]=0; |
513 |
|
ayv[i][ip]=0; |
514 |
|
xgood[i][ip]=0; |
515 |
|
ygood[i][ip]=0; |
516 |
|
cp[i][ip]=0; |
517 |
|
cls[i][ip]=0; |
518 |
|
sensor[i][ip]=0; |
519 |
|
ladder[i][ip]=0; |
520 |
|
bx[i][ip]=0; |
521 |
|
by[i][ip]=0; |
522 |
|
} |
523 |
|
} |
524 |
|
|
525 |
|
}; |
526 |
|
|
527 |
|
|
528 |
|
}; |
529 |
|
|
530 |
|
/** |
531 |
|
* \brief Struct to pass VA1-mask to F77 routines |
532 |
|
*/ |
533 |
|
struct cTrkMask { |
534 |
|
|
535 |
|
int mask_vk[NVK][NVIEW]; |
536 |
|
int mask_vk_run[NVK][NVIEW]; |
537 |
|
|
538 |
|
// void Set(TFile* , Int_t , Int_t ); |
539 |
|
|
540 |
|
void Reset(){ |
541 |
|
for(int ivk=0; ivk<NVK; ivk++){ |
542 |
|
for(int iv=0; iv<NVIEW; iv++){ |
543 |
|
// mask_vk[ivk][iv]=0; |
544 |
|
mask_vk_run[ivk][iv]=0; |
545 |
|
} |
546 |
|
} |
547 |
|
} |
548 |
|
|
549 |
|
void Dump(){ |
550 |
|
} |
551 |
|
|
552 |
|
}; |
553 |
|
|
554 |
|
/** |
555 |
|
* \brief Struct for pfa parameters |
556 |
|
*/ |
557 |
|
struct cTrkETA { |
558 |
|
|
559 |
|
int nangbin; |
560 |
|
float angL[NANGMAX],angR[NANGMAX]; |
561 |
|
int netaval; |
562 |
|
float eta2[NANGMAX][NETAVALMAX]; |
563 |
|
float feta2[NANGMAX][NLADDER][NVIEW][NETAVALMAX]; |
564 |
|
float eta3[NANGMAX][NETAVALMAX]; |
565 |
|
float feta3[NANGMAX][NLADDER][NVIEW][NETAVALMAX]; |
566 |
|
float eta4[NANGMAX][NETAVALMAX]; |
567 |
|
float feta4[NANGMAX][NLADDER][NVIEW][NETAVALMAX]; |
568 |
|
float fcorr[NANGMAX][NLADDER][NVIEW]; |
569 |
|
float e234ax[6];//F77: e2fax,e2tax,e3fax,e3tax,e4fax,e4tax |
570 |
|
float e234ay[6];//F77: e2fay,e2tay,e3fay,e3tay,e4fay,e4tay |
571 |
|
|
572 |
|
}; |
573 |
|
/** |
574 |
|
* \brief Struct to configure data reduction |
575 |
|
*/ |
576 |
|
struct cTrkSW{ |
577 |
|
int pfaid; |
578 |
|
}; |
579 |
|
/** |
580 |
|
* \brief Struct to read alignment parameters |
581 |
|
*/ |
582 |
|
struct cTrkAlign { |
583 |
|
|
584 |
|
double omega[NSENSOR][NLADDER][NPLANE]; |
585 |
|
double beta[NSENSOR][NLADDER][NPLANE]; |
586 |
|
double gamma[NSENSOR][NLADDER][NPLANE]; |
587 |
|
double dx[NSENSOR][NLADDER][NPLANE]; |
588 |
|
double dy[NSENSOR][NLADDER][NPLANE]; |
589 |
|
double dz[NSENSOR][NLADDER][NPLANE]; |
590 |
|
|
591 |
|
}; |
592 |
|
|
593 |
|
/** |
594 |
|
* \brief Struct to check reduction procedure: CN evaluation |
595 |
|
*/ |
596 |
|
struct cTrkCN { |
597 |
|
|
598 |
|
float cn[NVK][NVIEW]; |
599 |
|
float cnrms[NVK][NVIEW]; |
600 |
|
int cnn[NVK][NVIEW]; |
601 |
|
int clstr[NSTRIPVK][NVK][NVIEW]; |
602 |
|
int strange[NSTRIPVK][NVK][NVIEW]; |
603 |
|
|
604 |
|
}; |
605 |
|
/** |
606 |
|
* \brief Struct to check reduction procedure: pedestal subtraction |
607 |
|
*/ |
608 |
|
struct cTrkEvent { |
609 |
|
float value[NSTRIP]; |
610 |
|
}; |
611 |
|
|
612 |
extern "C" { |
extern "C" { |
613 |
extern struct cTrkCalib pedsigbad_; |
|
614 |
extern struct cTrkLevel0 level0event_; |
extern struct cTrkCalib pedsigbad_; |
615 |
extern struct cTrkLevel1 level1event_; |
extern struct cTrkMask mask_; |
616 |
extern struct cTrkLevel2 level2event_; |
extern struct cTrkLevel0 level0event_; |
617 |
extern struct cPath path_; |
extern struct cTrkLevel1 level1event_; |
618 |
extern struct cBPath bpath_; |
extern struct cTrkLevel2 level2event_; |
619 |
extern struct cDbg dbg_; |
extern struct cPath path_; |
620 |
|
extern struct cDbg dbg_; |
621 |
|
extern struct cTrkHough houghevent_; |
622 |
|
extern struct cTrkCandidates trackcandidates_; |
623 |
|
extern struct cMini2track track_; |
624 |
|
extern struct cTrkETA pfa_; |
625 |
|
extern struct cTrkSW sw_; |
626 |
|
extern struct cDeltaB deltab_; |
627 |
|
extern struct cTrkAlign alignparameters_; |
628 |
|
extern struct cTrkEvent calibratedsignal_; |
629 |
|
|
630 |
void fillpedsigfromdefault_(); |
void fillpedsigfromdefault_(); |
631 |
int readmipparam_(); |
int readmipparam_(); |
632 |
int readchargeparam_(); |
int readchargeparam_(); |
635 |
int readetaparam_(); |
int readetaparam_(); |
636 |
void reductionflight_(int*); |
void reductionflight_(int*); |
637 |
int analysisflight_(); |
int analysisflight_(); |
638 |
} |
int readb_(); |
639 |
|
void gufld_(float*, float*); |
640 |
|
void xyzpam_(int*,int*,int*,int*,int*,float*,float*,float*,float*); |
641 |
|
float riseta_(int*,float*); |
642 |
|
void chisq_(int*, int*); |
643 |
|
|
644 |
|
}; |
645 |
|
|
|
#endif |
|
646 |
|
|
647 |
|
#endif |