27 |
#define NANGMAX 21 |
#define NANGMAX 21 |
28 |
#define NETAVALMAX 500 |
#define NETAVALMAX 500 |
29 |
|
|
30 |
|
#define NTRACKSMAX (NCLOYZ_MAX*NCLOXZ_MAX) |
31 |
|
|
32 |
#include <CalibTrk1Event.h> |
#include <CalibTrk1Event.h> |
33 |
#include <CalibTrk2Event.h> |
#include <CalibTrk2Event.h> |
39 |
#include <TTree.h> |
#include <TTree.h> |
40 |
|
|
41 |
|
|
42 |
|
|
43 |
#include <fstream> |
#include <fstream> |
44 |
#include <iostream> |
#include <iostream> |
45 |
/** |
/** |
148 |
float xs[NSINGMAX][2]; |
float xs[NSINGMAX][2]; |
149 |
float signlxs[NSINGMAX]; |
float signlxs[NSINGMAX]; |
150 |
int clsx[NSINGMAX]; |
int clsx[NSINGMAX]; |
151 |
|
int sxbad[NSINGMAX]; |
152 |
|
int multmaxsx[NSINGMAX]; |
153 |
// ---------------------------- |
// ---------------------------- |
154 |
int nclsy; |
int nclsy; |
155 |
int planey[NSINGMAX]; |
int planey[NSINGMAX]; |
156 |
float ys[NSINGMAX][2]; |
float ys[NSINGMAX][2]; |
157 |
float signlys[NSINGMAX]; |
float signlys[NSINGMAX]; |
158 |
int clsy[NSINGMAX]; |
int clsy[NSINGMAX]; |
159 |
|
int sybad[NSINGMAX]; |
160 |
|
int multmaxsy[NSINGMAX]; |
161 |
// ---------------------------- |
// ---------------------------- |
162 |
int ntrk; |
int ntrk; |
163 |
int image[NTRKMAX]; |
int image[NTRKMAX]; |
186 |
float dedx_y[NTRKMAX][6]; |
float dedx_y[NTRKMAX][6]; |
187 |
int cltrx[NTRKMAX][6]; |
int cltrx[NTRKMAX][6]; |
188 |
int cltry[NTRKMAX][6]; |
int cltry[NTRKMAX][6]; |
189 |
|
int multmaxx[NTRKMAX][6]; |
190 |
|
int multmaxy[NTRKMAX][6]; |
191 |
|
float seedx[NTRKMAX][6]; |
192 |
|
float seedy[NTRKMAX][6]; |
193 |
|
float xpu[NTRKMAX][6]; |
194 |
|
float ypu[NTRKMAX][6]; |
195 |
// float bdl[NTRKMAX]; |
// float bdl[NTRKMAX]; |
196 |
|
|
197 |
void InitcTrkLevel2(){ |
void InitcTrkLevel2(){ |
209 |
xs[i][0] = 0; |
xs[i][0] = 0; |
210 |
xs[i][1] = 0; |
xs[i][1] = 0; |
211 |
signlxs[i] = 0; |
signlxs[i] = 0; |
212 |
|
clsx[i] = 0; |
213 |
|
sxbad[i] = 0; |
214 |
planey[i] = 0; |
planey[i] = 0; |
215 |
ys[i][0] = 0; |
ys[i][0] = 0; |
216 |
ys[i][1] = 0; |
ys[i][1] = 0; |
217 |
signlys[i] = 0; |
signlys[i] = 0; |
218 |
|
clsy[i] = 0; |
219 |
|
sybad[i] = 0; |
220 |
} |
} |
221 |
// ---------------------------- |
// ---------------------------- |
222 |
ntrk =0 ; |
ntrk =0 ; |
247 |
ayv_nt[i][ii] = 0; |
ayv_nt[i][ii] = 0; |
248 |
dedx_x[i][ii] = 0; |
dedx_x[i][ii] = 0; |
249 |
dedx_y[i][ii] = 0; |
dedx_y[i][ii] = 0; |
250 |
|
multmaxx[i][ii] = 0; |
251 |
|
multmaxy[i][ii] = 0; |
252 |
|
seedx[i][ii] = 0; |
253 |
|
seedy[i][ii] = 0; |
254 |
|
xpu[i][ii] = 0; |
255 |
|
ypu[i][ii] = 0; |
256 |
} |
} |
257 |
} |
} |
258 |
} |
} |
386 |
|
|
387 |
|
|
388 |
}; |
}; |
389 |
|
|
390 |
|
// ================================================================== |
391 |
|
/** |
392 |
|
* \brief Struct to pass DELTAB parameters to F77 routines |
393 |
|
*/ |
394 |
|
struct cDeltaB { |
395 |
|
double delta0; |
396 |
|
double delta1; |
397 |
|
double dlt; |
398 |
|
}; |
399 |
|
|
400 |
// |
// |
401 |
/** |
/** |
402 |
* \Struct for the hough transform variables |
* \Struct for the hough transform variables |
465 |
}; |
}; |
466 |
|
|
467 |
/** |
/** |
468 |
|
* \Struct for track candidates after hough transform |
469 |
|
*/ |
470 |
|
struct cTrkCandidates { |
471 |
|
int ntracks; |
472 |
|
float al[NTRACKSMAX][5]; |
473 |
|
float xm[NTRACKSMAX][NPLANE]; |
474 |
|
float ym[NTRACKSMAX][NPLANE]; |
475 |
|
float zm[NTRACKSMAX][NPLANE]; |
476 |
|
float resx[NTRACKSMAX][NPLANE]; |
477 |
|
float resy[NTRACKSMAX][NPLANE]; |
478 |
|
float xv[NTRACKSMAX][NPLANE]; |
479 |
|
float yv[NTRACKSMAX][NPLANE]; |
480 |
|
float zv[NTRACKSMAX][NPLANE]; |
481 |
|
float axv[NTRACKSMAX][NPLANE]; |
482 |
|
float ayv[NTRACKSMAX][NPLANE]; |
483 |
|
float xgood[NTRACKSMAX][NPLANE]; |
484 |
|
float ygood[NTRACKSMAX][NPLANE]; |
485 |
|
int cp[NTRACKSMAX][NPLANE]; |
486 |
|
int cls[NTRACKSMAX][NPLANE]; |
487 |
|
int sensor[NTRACKSMAX][NPLANE]; |
488 |
|
int ladder[NTRACKSMAX][NPLANE]; |
489 |
|
float bx[NTRACKSMAX][NPLANE]; |
490 |
|
float by[NTRACKSMAX][NPLANE]; |
491 |
|
float chi2[NTRACKSMAX]; |
492 |
|
|
493 |
|
void Init(){ |
494 |
|
ntracks=0; |
495 |
|
for(int i=0; i<NTRACKSMAX; i++){ |
496 |
|
for(int ii=0; ii<5; ii++)al[i][ii]=0; |
497 |
|
chi2[i]=0; |
498 |
|
for(int ip=0; ip<NPLANE; ip++){ |
499 |
|
xm[i][ip]=0; |
500 |
|
ym[i][ip]=0; |
501 |
|
zm[i][ip]=0; |
502 |
|
resx[i][ip]=0; |
503 |
|
resy[i][ip]=0; |
504 |
|
xv[i][ip]=0; |
505 |
|
yv[i][ip]=0; |
506 |
|
zv[i][ip]=0; |
507 |
|
axv[i][ip]=0; |
508 |
|
ayv[i][ip]=0; |
509 |
|
xgood[i][ip]=0; |
510 |
|
ygood[i][ip]=0; |
511 |
|
cp[i][ip]=0; |
512 |
|
cls[i][ip]=0; |
513 |
|
sensor[i][ip]=0; |
514 |
|
ladder[i][ip]=0; |
515 |
|
bx[i][ip]=0; |
516 |
|
by[i][ip]=0; |
517 |
|
} |
518 |
|
} |
519 |
|
|
520 |
|
}; |
521 |
|
|
522 |
|
|
523 |
|
}; |
524 |
|
|
525 |
|
/** |
526 |
* \brief Struct to pass VA1-mask to F77 routines |
* \brief Struct to pass VA1-mask to F77 routines |
527 |
*/ |
*/ |
528 |
struct cTrkMask { |
struct cTrkMask { |
582 |
extern struct cPath path_; |
extern struct cPath path_; |
583 |
extern struct cDbg dbg_; |
extern struct cDbg dbg_; |
584 |
extern struct cTrkHough houghevent_; |
extern struct cTrkHough houghevent_; |
585 |
|
extern struct cTrkCandidates trackcandidates_; |
586 |
extern struct cMini2track track_; |
extern struct cMini2track track_; |
587 |
extern struct cTrkETA pfa_; |
extern struct cTrkETA pfa_; |
588 |
extern struct cTrkSW sw_; |
extern struct cTrkSW sw_; |
589 |
|
extern struct cDeltaB deltab_; |
590 |
|
|
591 |
void fillpedsigfromdefault_(); |
void fillpedsigfromdefault_(); |
592 |
int readmipparam_(); |
int readmipparam_(); |
600 |
void gufld_(float*, float*); |
void gufld_(float*, float*); |
601 |
void xyzpam_(int*,int*,int*,int*,int*,float*,float*,float*,float*); |
void xyzpam_(int*,int*,int*,int*,int*,float*,float*,float*,float*); |
602 |
float riseta_(int*,float*); |
float riseta_(int*,float*); |
603 |
|
void chisq_(int*, int*); |
604 |
|
|
605 |
} |
} |
606 |
|
|