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 |
/** |
/** |
53 |
float sigma_t[128][24][12]; |
float sigma_t[128][24][12]; |
54 |
int bad[128][24][12]; |
int bad[128][24][12]; |
55 |
|
|
56 |
|
void Reset(){ |
57 |
|
for(int is=0; is<128; is++){ |
58 |
|
for(int ivk=0; ivk<24; ivk++){ |
59 |
|
for(int iv=0; iv<12; iv++){ |
60 |
|
pedestal[is][ivk][iv]=0.; |
61 |
|
pedestal_t[is][ivk][iv]=0.; |
62 |
|
sigma[is][ivk][iv]=0.; |
63 |
|
sigma_t[is][ivk][iv]=0.; |
64 |
|
bad[is][ivk][iv]=1; |
65 |
|
} |
66 |
|
} |
67 |
|
} |
68 |
|
} |
69 |
|
|
70 |
/* void FillACalibFrom(TFile* , Int_t , Int_t ); */ |
/* void FillACalibFrom(TFile* , Int_t , Int_t ); */ |
71 |
/* void FillFCalibFrom(TFile* , Int_t , Int_t ); */ |
/* void FillFCalibFrom(TFile* , Int_t , Int_t ); */ |
72 |
/* void FillTCalibFrom(TFile* , Int_t , Int_t ); */ |
/* void FillTCalibFrom(TFile* , Int_t , Int_t ); */ |
182 |
float dedx_y[NTRKMAX][6]; |
float dedx_y[NTRKMAX][6]; |
183 |
int cltrx[NTRKMAX][6]; |
int cltrx[NTRKMAX][6]; |
184 |
int cltry[NTRKMAX][6]; |
int cltry[NTRKMAX][6]; |
185 |
|
int multmaxx[NTRKMAX][6]; |
186 |
|
int multmaxy[NTRKMAX][6]; |
187 |
|
float seedx[NTRKMAX][6]; |
188 |
|
float seedy[NTRKMAX][6]; |
189 |
|
float xpu[NTRKMAX][6]; |
190 |
|
float ypu[NTRKMAX][6]; |
191 |
// float bdl[NTRKMAX]; |
// float bdl[NTRKMAX]; |
192 |
|
|
193 |
void InitcTrkLevel2(){ |
void InitcTrkLevel2(){ |
239 |
ayv_nt[i][ii] = 0; |
ayv_nt[i][ii] = 0; |
240 |
dedx_x[i][ii] = 0; |
dedx_x[i][ii] = 0; |
241 |
dedx_y[i][ii] = 0; |
dedx_y[i][ii] = 0; |
242 |
|
multmaxx[i][ii] = 0; |
243 |
|
multmaxy[i][ii] = 0; |
244 |
|
seedx[i][ii] = 0; |
245 |
|
seedy[i][ii] = 0; |
246 |
|
xpu[i][ii] = 0; |
247 |
|
ypu[i][ii] = 0; |
248 |
} |
} |
249 |
} |
} |
250 |
} |
} |
322 |
double xm_a[NPLANE],ym_a[NPLANE]; |
double xm_a[NPLANE],ym_a[NPLANE]; |
323 |
double xm_b[NPLANE],ym_b[NPLANE]; |
double xm_b[NPLANE],ym_b[NPLANE]; |
324 |
double resx[NPLANE],resy[NPLANE]; |
double resx[NPLANE],resy[NPLANE]; |
325 |
|
double tailx[NPLANE],taily[NPLANE]; |
326 |
double xgood[NPLANE],ygood[NPLANE]; |
double xgood[NPLANE],ygood[NPLANE]; |
327 |
double dedxtrk_x[NPLANE]; |
double dedxtrk_x[NPLANE]; |
328 |
double dedxtrk_y[NPLANE]; |
double dedxtrk_y[NPLANE]; |
378 |
|
|
379 |
|
|
380 |
}; |
}; |
381 |
|
|
382 |
|
// ================================================================== |
383 |
|
/** |
384 |
|
* \brief Struct to pass DELTAB parameters to F77 routines |
385 |
|
*/ |
386 |
|
struct cDeltaB { |
387 |
|
double delta0; |
388 |
|
double delta1; |
389 |
|
}; |
390 |
|
|
391 |
// |
// |
392 |
/** |
/** |
393 |
* \Struct for the hough transform variables |
* \Struct for the hough transform variables |
456 |
}; |
}; |
457 |
|
|
458 |
/** |
/** |
459 |
|
* \Struct for track candidates after hough transform |
460 |
|
*/ |
461 |
|
struct cTrkCandidates { |
462 |
|
int ntracks; |
463 |
|
float al[NTRACKSMAX][5]; |
464 |
|
float xm[NTRACKSMAX][NPLANE]; |
465 |
|
float ym[NTRACKSMAX][NPLANE]; |
466 |
|
float zm[NTRACKSMAX][NPLANE]; |
467 |
|
float resx[NTRACKSMAX][NPLANE]; |
468 |
|
float resy[NTRACKSMAX][NPLANE]; |
469 |
|
float xv[NTRACKSMAX][NPLANE]; |
470 |
|
float yv[NTRACKSMAX][NPLANE]; |
471 |
|
float zv[NTRACKSMAX][NPLANE]; |
472 |
|
float axv[NTRACKSMAX][NPLANE]; |
473 |
|
float ayv[NTRACKSMAX][NPLANE]; |
474 |
|
float xgood[NTRACKSMAX][NPLANE]; |
475 |
|
float ygood[NTRACKSMAX][NPLANE]; |
476 |
|
int cp[NTRACKSMAX][NPLANE]; |
477 |
|
int cls[NTRACKSMAX][NPLANE]; |
478 |
|
int sensor[NTRACKSMAX][NPLANE]; |
479 |
|
int ladder[NTRACKSMAX][NPLANE]; |
480 |
|
float bx[NTRACKSMAX][NPLANE]; |
481 |
|
float by[NTRACKSMAX][NPLANE]; |
482 |
|
float chi2[NTRACKSMAX]; |
483 |
|
|
484 |
|
void Init(){ |
485 |
|
ntracks=0; |
486 |
|
for(int i=0; i<NTRACKSMAX; i++){ |
487 |
|
for(int ii=0; ii<5; ii++)al[i][ii]=0; |
488 |
|
chi2[i]=0; |
489 |
|
for(int ip=0; ip<NPLANE; ip++){ |
490 |
|
xm[i][ip]=0; |
491 |
|
ym[i][ip]=0; |
492 |
|
zm[i][ip]=0; |
493 |
|
resx[i][ip]=0; |
494 |
|
resy[i][ip]=0; |
495 |
|
xv[i][ip]=0; |
496 |
|
yv[i][ip]=0; |
497 |
|
zv[i][ip]=0; |
498 |
|
axv[i][ip]=0; |
499 |
|
ayv[i][ip]=0; |
500 |
|
xgood[i][ip]=0; |
501 |
|
ygood[i][ip]=0; |
502 |
|
cp[i][ip]=0; |
503 |
|
cls[i][ip]=0; |
504 |
|
sensor[i][ip]=0; |
505 |
|
ladder[i][ip]=0; |
506 |
|
bx[i][ip]=0; |
507 |
|
by[i][ip]=0; |
508 |
|
} |
509 |
|
} |
510 |
|
|
511 |
|
}; |
512 |
|
|
513 |
|
|
514 |
|
}; |
515 |
|
|
516 |
|
/** |
517 |
* \brief Struct to pass VA1-mask to F77 routines |
* \brief Struct to pass VA1-mask to F77 routines |
518 |
*/ |
*/ |
519 |
struct cTrkMask { |
struct cTrkMask { |
523 |
|
|
524 |
// void Set(TFile* , Int_t , Int_t ); |
// void Set(TFile* , Int_t , Int_t ); |
525 |
|
|
526 |
|
void Reset(){ |
527 |
|
for(int ivk=0; ivk<NVK; ivk++){ |
528 |
|
for(int iv=0; iv<NVIEW; iv++){ |
529 |
|
// mask_vk[ivk][iv]=0; |
530 |
|
mask_vk_run[ivk][iv]=0; |
531 |
|
} |
532 |
|
} |
533 |
|
} |
534 |
|
|
535 |
|
void Dump(){ |
536 |
|
} |
537 |
|
|
538 |
}; |
}; |
539 |
|
|
540 |
/** |
/** |
551 |
float feta3[NANGMAX][NLADDER][NVIEW][NETAVALMAX]; |
float feta3[NANGMAX][NLADDER][NVIEW][NETAVALMAX]; |
552 |
float eta4[NANGMAX][NETAVALMAX]; |
float eta4[NANGMAX][NETAVALMAX]; |
553 |
float feta4[NANGMAX][NLADDER][NVIEW][NETAVALMAX]; |
float feta4[NANGMAX][NLADDER][NVIEW][NETAVALMAX]; |
554 |
|
float fcorr[NANGMAX][NLADDER][NVIEW]; |
555 |
|
float e234ax[6];//F77: e2fax,e2tax,e3fax,e3tax,e4fax,e4tax |
556 |
|
float e234ay[6];//F77: e2fay,e2tay,e3fay,e3tay,e4fay,e4tay |
557 |
|
|
558 |
}; |
}; |
559 |
/** |
/** |
573 |
extern struct cPath path_; |
extern struct cPath path_; |
574 |
extern struct cDbg dbg_; |
extern struct cDbg dbg_; |
575 |
extern struct cTrkHough houghevent_; |
extern struct cTrkHough houghevent_; |
576 |
|
extern struct cTrkCandidates trackcandidates_; |
577 |
extern struct cMini2track track_; |
extern struct cMini2track track_; |
578 |
extern struct cTrkETA pfa_; |
extern struct cTrkETA pfa_; |
579 |
extern struct cTrkSW sw_; |
extern struct cTrkSW sw_; |
580 |
|
extern struct cDeltaB deltab_; |
581 |
|
|
582 |
void fillpedsigfromdefault_(); |
void fillpedsigfromdefault_(); |
583 |
int readmipparam_(); |
int readmipparam_(); |
590 |
int readb_(); |
int readb_(); |
591 |
void gufld_(float*, float*); |
void gufld_(float*, float*); |
592 |
void xyzpam_(int*,int*,int*,int*,int*,float*,float*,float*,float*); |
void xyzpam_(int*,int*,int*,int*,int*,float*,float*,float*,float*); |
593 |
|
float riseta_(int*,float*); |
594 |
|
void chisq_(int*, int*); |
595 |
|
|
596 |
} |
} |
597 |
|
|