10 |
#define NVIEW 12 |
#define NVIEW 12 |
11 |
#define NVK 24 |
#define NVK 24 |
12 |
#define NLADDER 3 |
#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 |
28 |
#define NANGMAX 21 |
#define NANGMAX 21 |
29 |
#define NETAVALMAX 500 |
#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> |
40 |
#include <TTree.h> |
#include <TTree.h> |
41 |
|
|
42 |
|
|
43 |
|
|
44 |
#include <fstream> |
#include <fstream> |
45 |
#include <iostream> |
#include <iostream> |
46 |
/** |
/** |
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]; |
210 |
xs[i][0] = 0; |
xs[i][0] = 0; |
211 |
xs[i][1] = 0; |
xs[i][1] = 0; |
212 |
signlxs[i] = 0; |
signlxs[i] = 0; |
213 |
|
clsx[i] = 0; |
214 |
|
sxbad[i] = 0; |
215 |
planey[i] = 0; |
planey[i] = 0; |
216 |
ys[i][0] = 0; |
ys[i][0] = 0; |
217 |
ys[i][1] = 0; |
ys[i][1] = 0; |
218 |
signlys[i] = 0; |
signlys[i] = 0; |
219 |
|
clsy[i] = 0; |
220 |
|
sybad[i] = 0; |
221 |
} |
} |
222 |
// ---------------------------- |
// ---------------------------- |
223 |
ntrk =0 ; |
ntrk =0 ; |
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]; |
double tailx[NPLANE],taily[NPLANE]; |
335 |
double xgood[NPLANE],ygood[NPLANE]; |
double xgood[NPLANE],ygood[NPLANE]; |
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 |
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 |
* \brief Struct to pass VA1-mask to F77 routines |
528 |
*/ |
*/ |
529 |
struct cTrkMask { |
struct cTrkMask { |
572 |
struct cTrkSW{ |
struct cTrkSW{ |
573 |
int pfaid; |
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 |
|
|
596 |
extern struct cPath path_; |
extern struct cPath path_; |
597 |
extern struct cDbg dbg_; |
extern struct cDbg dbg_; |
598 |
extern struct cTrkHough houghevent_; |
extern struct cTrkHough houghevent_; |
599 |
|
extern struct cTrkCandidates trackcandidates_; |
600 |
extern struct cMini2track track_; |
extern struct cMini2track track_; |
601 |
extern struct cTrkETA pfa_; |
extern struct cTrkETA pfa_; |
602 |
extern struct cTrkSW sw_; |
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_(); |
615 |
void gufld_(float*, float*); |
void gufld_(float*, float*); |
616 |
void xyzpam_(int*,int*,int*,int*,int*,float*,float*,float*,float*); |
void xyzpam_(int*,int*,int*,int*,int*,float*,float*,float*,float*); |
617 |
float riseta_(int*,float*); |
float riseta_(int*,float*); |
618 |
|
void chisq_(int*, int*); |
619 |
|
|
620 |
} |
}; |
621 |
|
|
622 |
#endif |
#endif |