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 |
|
|
14 |
#define NCLMAX_VIEW 200 //max n.clusters per view |
#define NCLMAX_VIEW 200 //max n.clusters per view |
15 |
#define NCLSTR 20 //max n.strip per cluster |
#define NCLSTR 20 //max n.strip per cluster |
24 |
#define NTRKMAX 10 |
#define NTRKMAX 10 |
25 |
#define NSINGMAX NCLMAX //100 |
#define NSINGMAX NCLMAX //100 |
26 |
|
|
27 |
|
#define NANGMAX 21 |
28 |
|
#define NETAVALMAX 150 |
29 |
|
|
30 |
|
|
31 |
#include <CalibTrk1Event.h> |
//#include <CalibTrk1Event.h> |
32 |
#include <CalibTrk2Event.h> |
//#include <CalibTrk2Event.h> |
33 |
|
#include <TrkCalib.h> |
34 |
|
|
35 |
#include <TString.h> |
#include <TString.h> |
36 |
#include <TFile.h> |
#include <TFile.h> |
228 |
const char *pc = s.Data(); |
const char *pc = s.Data(); |
229 |
for(Int_t i=0; i<=pathlen; i++) path[i] = *pc++; |
for(Int_t i=0; i<=pathlen; i++) path[i] = *pc++; |
230 |
}; |
}; |
231 |
|
|
|
|
|
232 |
}; |
}; |
233 |
|
|
234 |
// ================================================================== |
// ================================================================== |
235 |
/** |
/* /\** */ |
236 |
* \brief Struct to pass magnetic-field file paths to F77 routines |
/* * \brief Struct to pass magnetic-field file paths to F77 routines */ |
237 |
*/ |
/* *\/ */ |
238 |
struct cBPath { |
/* struct cBPath { */ |
239 |
char b_path[256]; |
/* char b_path[256]; */ |
240 |
int b_pathlen; |
/* int b_pathlen; */ |
241 |
int b_error; |
/* int b_error; */ |
242 |
int b_loaded; |
/* int b_loaded; */ |
243 |
/** |
/* /\** */ |
244 |
* Fill the struct variables from a TString object and set |
/* * Fill the struct variables from a TString object and set */ |
245 |
* the load flag to FALSE. |
/* * the load flag to FALSE. */ |
246 |
*/ |
/* *\/ */ |
247 |
void FillWith(TString s){ |
/* void FillWith(TString s){ */ |
248 |
b_loaded = 0; |
/* b_loaded = 0; */ |
249 |
b_pathlen = s.Length(); |
/* b_pathlen = s.Length(); */ |
250 |
const char *pc = s.Data(); |
/* const char *pc = s.Data(); */ |
251 |
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++; */ |
252 |
}; |
/* }; */ |
253 |
/** |
/* /\** */ |
254 |
* Fill the struct variables from a TString object |
/* * Fill the struct variables from a TString object */ |
255 |
*/ |
/* *\/ */ |
256 |
int BIsLoaded(){ return b_loaded; }; |
/* int BIsLoaded(){ return b_loaded; }; */ |
257 |
|
|
258 |
}; |
/* }; */ |
259 |
|
|
260 |
// ================================================================== |
// ================================================================== |
261 |
/** |
/** |
295 |
double cov[5][5]; |
double cov[5][5]; |
296 |
int nstep; |
int nstep; |
297 |
int idcand; |
int idcand; |
298 |
|
|
299 |
}; |
}; |
300 |
// |
// |
301 |
/** |
/** |
304 |
|
|
305 |
struct cTrkHough { |
struct cTrkHough { |
306 |
|
|
307 |
int ndblt; |
int ndblt_nt; |
308 |
float alfayz1[NDBLT_MAX_NT]; |
float alfayz1_nt[NDBLT_MAX_NT]; |
309 |
float alfayz2[NDBLT_MAX_NT]; |
float alfayz2_nt[NDBLT_MAX_NT]; |
310 |
int db_cloud[NDBLT_MAX_NT]; |
int db_cloud_nt[NDBLT_MAX_NT]; |
311 |
int ntrpt; |
int ntrpt_nt; |
312 |
float alfaxz1[NTRPT_MAX_NT]; |
float alfaxz1_nt[NTRPT_MAX_NT]; |
313 |
float alfaxz2[NTRPT_MAX_NT]; |
float alfaxz2_nt[NTRPT_MAX_NT]; |
314 |
float alfaxz3[NTRPT_MAX_NT]; |
float alfaxz3_nt[NTRPT_MAX_NT]; |
315 |
int tr_cloud[NTRPT_MAX_NT]; |
int tr_cloud_nt[NTRPT_MAX_NT]; |
316 |
int nclouds_yz; |
int nclouds_yz_nt; |
317 |
float alfayz1_av[NCLOYZ_MAX]; |
float alfayz1_av_nt[NCLOYZ_MAX]; |
318 |
float alfayz2_av[NCLOYZ_MAX]; |
float alfayz2_av_nt[NCLOYZ_MAX]; |
319 |
int ptcloud_yz[NCLOYZ_MAX]; |
int ptcloud_yz_nt[NCLOYZ_MAX]; |
320 |
int nclouds_xz; |
int nclouds_xz_nt; |
321 |
float alfaxz1_av[NCLOXZ_MAX]; |
float alfaxz1_av_nt[NCLOXZ_MAX]; |
322 |
float alfaxz2_av[NCLOXZ_MAX]; |
float alfaxz2_av_nt[NCLOXZ_MAX]; |
323 |
float alfaxz3_av[NCLOXZ_MAX]; |
float alfaxz3_av_nt[NCLOXZ_MAX]; |
324 |
int ptcloud_xz[NCLOXZ_MAX]; |
int ptcloud_xz_nt[NCLOXZ_MAX]; |
325 |
int nclstr; |
int nclstr; |
326 |
float totaltime; |
float totaltime; |
327 |
float houghtime; |
float houghtime; |
330 |
|
|
331 |
void InitcTrkHough(){ |
void InitcTrkHough(){ |
332 |
|
|
333 |
ndblt = 0; |
ndblt_nt = 0; |
334 |
ntrpt = 0; |
ntrpt_nt = 0; |
335 |
nclouds_yz = 0; |
nclouds_yz_nt = 0; |
336 |
nclouds_xz = 0; |
nclouds_xz_nt = 0; |
337 |
nclstr = 0; |
nclstr = 0; |
338 |
totaltime = 0; |
totaltime = 0; |
339 |
houghtime = 0; |
houghtime = 0; |
340 |
fittime = 0; |
fittime = 0; |
341 |
for(int i=0;i<NDBLT_MAX_NT ;i++){ |
for(int i=0;i<NDBLT_MAX_NT ;i++){ |
342 |
alfayz1[i] = 0; |
alfayz1_nt[i] = 0; |
343 |
alfayz2[i] = 0; |
alfayz2_nt[i] = 0; |
344 |
db_cloud[i] = 0; |
db_cloud_nt[i] = 0; |
345 |
} |
} |
346 |
for(int i=0;i<NTRPT_MAX_NT ;i++){ |
for(int i=0;i<NTRPT_MAX_NT ;i++){ |
347 |
alfaxz1[i] = 0; |
alfaxz1_nt[i] = 0; |
348 |
alfaxz2[i] = 0; |
alfaxz2_nt[i] = 0; |
349 |
alfaxz3[i] = 0; |
alfaxz3_nt[i] = 0; |
350 |
tr_cloud[i] = 0; |
tr_cloud_nt[i] = 0; |
351 |
} |
} |
352 |
for(int i=0;i<NCLOYZ_MAX ;i++){ |
for(int i=0;i<NCLOYZ_MAX ;i++){ |
353 |
alfayz1_av[i] = 0; |
alfayz1_av_nt[i] = 0; |
354 |
alfayz2_av[i] = 0; |
alfayz2_av_nt[i] = 0; |
355 |
ptcloud_yz[i] = 0; |
ptcloud_yz_nt[i] = 0; |
356 |
} |
} |
357 |
for(int i=0;i<NCLOXZ_MAX ;i++){ |
for(int i=0;i<NCLOXZ_MAX ;i++){ |
358 |
ptcloud_xz[i] = 0; |
ptcloud_xz_nt[i] = 0; |
359 |
alfaxz1_av[i] = 0; |
alfaxz1_av_nt[i] = 0; |
360 |
alfaxz2_av[i] = 0; |
alfaxz2_av_nt[i] = 0; |
361 |
alfaxz3_av[i] = 0; |
alfaxz3_av_nt[i] = 0; |
362 |
} |
} |
363 |
} |
} |
364 |
|
|
365 |
}; |
}; |
366 |
|
|
367 |
|
/** |
368 |
|
* \brief Struct to pass VA1-mask to F77 routines |
369 |
|
*/ |
370 |
|
struct cTrkMask { |
371 |
|
|
372 |
|
int mask_vk[NVK][NVIEW]; |
373 |
|
int mask_vk_run[NVK][NVIEW]; |
374 |
|
|
375 |
|
void Set(TFile* , Int_t , Int_t ); |
376 |
|
|
377 |
|
}; |
378 |
|
|
379 |
|
/** |
380 |
|
* \brief Struct for pfa parameters |
381 |
|
*/ |
382 |
|
struct cTrkETA { |
383 |
|
|
384 |
|
int nangbin; |
385 |
|
float angL[NANGMAX],angR[NANGMAX]; |
386 |
|
int netaval; |
387 |
|
float eta2[NANGMAX][NETAVALMAX]; |
388 |
|
float feta2[NANGMAX][NLADDER][NVIEW][NETAVALMAX]; |
389 |
|
float eta3[NANGMAX][NETAVALMAX]; |
390 |
|
float feta3[NANGMAX][NLADDER][NVIEW][NETAVALMAX]; |
391 |
|
float eta4[NANGMAX][NETAVALMAX]; |
392 |
|
float feta4[NANGMAX][NLADDER][NVIEW][NETAVALMAX]; |
393 |
|
|
394 |
|
}; |
395 |
|
|
396 |
extern "C" { |
extern "C" { |
397 |
|
|
400 |
extern struct cTrkLevel1 level1event_; |
extern struct cTrkLevel1 level1event_; |
401 |
extern struct cTrkLevel2 level2event_; |
extern struct cTrkLevel2 level2event_; |
402 |
extern struct cPath path_; |
extern struct cPath path_; |
403 |
extern struct cBPath bpath_; |
/* extern struct cBPath bpath_; */ |
404 |
extern struct cDbg dbg_; |
extern struct cDbg dbg_; |
405 |
|
extern struct cTrkHough houghevent_; |
406 |
extern struct cMini2track track_; |
extern struct cMini2track track_; |
407 |
extern struct cTrkHough hough_; |
extern struct cTrkMask mask_; |
408 |
|
extern struct cTrkETA pfa_; |
409 |
|
|
410 |
void fillpedsigfromdefault_(); |
void fillpedsigfromdefault_(); |
411 |
int readmipparam_(); |
int readmipparam_(); |