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 500 |
29 |
|
|
30 |
|
|
31 |
#include <CalibTrk1Event.h> |
#include <CalibTrk1Event.h> |
32 |
#include <CalibTrk2Event.h> |
#include <CalibTrk2Event.h> |
33 |
|
using namespace pamela; |
34 |
|
//#include <TrkCalib.h> |
35 |
|
|
36 |
#include <TString.h> |
#include <TString.h> |
37 |
#include <TFile.h> |
#include <TFile.h> |
38 |
#include <TTree.h> |
#include <TTree.h> |
39 |
|
|
40 |
|
|
41 |
#include <fstream> |
#include <fstream> |
42 |
#include <iostream> |
#include <iostream> |
43 |
/** |
/** |
51 |
float sigma_t[128][24][12]; |
float sigma_t[128][24][12]; |
52 |
int bad[128][24][12]; |
int bad[128][24][12]; |
53 |
|
|
54 |
void FillACalibFrom(TFile* , Int_t , Int_t ); |
/* void FillACalibFrom(TFile* , Int_t , Int_t ); */ |
55 |
void FillFCalibFrom(TFile* , Int_t , Int_t ); |
/* void FillFCalibFrom(TFile* , Int_t , Int_t ); */ |
56 |
void FillTCalibFrom(TFile* , Int_t , Int_t ); |
/* void FillTCalibFrom(TFile* , Int_t , Int_t ); */ |
57 |
void FillTCalibFrom(TString); |
/* void FillTCalibFrom(TString); */ |
58 |
|
|
59 |
}; |
}; |
60 |
// ================================================================== |
// ================================================================== |
115 |
float cnrmsev[24][12]; |
float cnrmsev[24][12]; |
116 |
int fshower[12]; |
int fshower[12]; |
117 |
int whichtrack[NCLMAX]; |
int whichtrack[NCLMAX]; |
118 |
|
|
119 |
}; |
}; |
120 |
// ================================================================== |
// ================================================================== |
121 |
/** |
/** |
231 |
const char *pc = s.Data(); |
const char *pc = s.Data(); |
232 |
for(Int_t i=0; i<=pathlen; i++) path[i] = *pc++; |
for(Int_t i=0; i<=pathlen; i++) path[i] = *pc++; |
233 |
}; |
}; |
234 |
|
|
|
|
|
235 |
}; |
}; |
236 |
|
|
237 |
// ================================================================== |
// ================================================================== |
238 |
/** |
/* /\** */ |
239 |
* \brief Struct to pass magnetic-field file paths to F77 routines |
/* * \brief Struct to pass magnetic-field file paths to F77 routines */ |
240 |
*/ |
/* *\/ */ |
241 |
struct cBPath { |
/* struct cBPath { */ |
242 |
char b_path[256]; |
/* char b_path[256]; */ |
243 |
int b_pathlen; |
/* int b_pathlen; */ |
244 |
int b_error; |
/* int b_error; */ |
245 |
int b_loaded; |
/* int b_loaded; */ |
246 |
/** |
/* /\** */ |
247 |
* Fill the struct variables from a TString object and set |
/* * Fill the struct variables from a TString object and set */ |
248 |
* the load flag to FALSE. |
/* * the load flag to FALSE. */ |
249 |
*/ |
/* *\/ */ |
250 |
void FillWith(TString s){ |
/* void FillWith(TString s){ */ |
251 |
b_loaded = 0; |
/* b_loaded = 0; */ |
252 |
b_pathlen = s.Length(); |
/* b_pathlen = s.Length(); */ |
253 |
const char *pc = s.Data(); |
/* const char *pc = s.Data(); */ |
254 |
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++; */ |
255 |
}; |
/* }; */ |
256 |
/** |
/* /\** */ |
257 |
* Fill the struct variables from a TString object |
/* * Fill the struct variables from a TString object */ |
258 |
*/ |
/* *\/ */ |
259 |
int BIsLoaded(){ return b_loaded; }; |
/* int BIsLoaded(){ return b_loaded; }; */ |
260 |
|
|
261 |
}; |
/* }; */ |
262 |
|
|
263 |
// ================================================================== |
// ================================================================== |
264 |
/** |
/** |
298 |
double cov[5][5]; |
double cov[5][5]; |
299 |
int nstep; |
int nstep; |
300 |
int idcand; |
int idcand; |
301 |
|
int trackmode; |
302 |
|
|
303 |
}; |
}; |
304 |
// |
// |
305 |
/** |
/** |
308 |
|
|
309 |
struct cTrkHough { |
struct cTrkHough { |
310 |
|
|
311 |
int ndblt; |
int ndblt_nt; |
312 |
float alfayz1[NDBLT_MAX_NT]; |
float alfayz1_nt[NDBLT_MAX_NT]; |
313 |
float alfayz2[NDBLT_MAX_NT]; |
float alfayz2_nt[NDBLT_MAX_NT]; |
314 |
int db_cloud[NDBLT_MAX_NT]; |
int db_cloud_nt[NDBLT_MAX_NT]; |
315 |
int ntrpt; |
int ntrpt_nt; |
316 |
float alfaxz1[NTRPT_MAX_NT]; |
float alfaxz1_nt[NTRPT_MAX_NT]; |
317 |
float alfaxz2[NTRPT_MAX_NT]; |
float alfaxz2_nt[NTRPT_MAX_NT]; |
318 |
float alfaxz3[NTRPT_MAX_NT]; |
float alfaxz3_nt[NTRPT_MAX_NT]; |
319 |
int tr_cloud[NTRPT_MAX_NT]; |
int tr_cloud_nt[NTRPT_MAX_NT]; |
320 |
int nclouds_yz; |
int nclouds_yz_nt; |
321 |
float alfayz1_av[NCLOYZ_MAX]; |
float alfayz1_av_nt[NCLOYZ_MAX]; |
322 |
float alfayz2_av[NCLOYZ_MAX]; |
float alfayz2_av_nt[NCLOYZ_MAX]; |
323 |
int ptcloud_yz[NCLOYZ_MAX]; |
int ptcloud_yz_nt[NCLOYZ_MAX]; |
324 |
int nclouds_xz; |
int nclouds_xz_nt; |
325 |
float alfaxz1_av[NCLOXZ_MAX]; |
float alfaxz1_av_nt[NCLOXZ_MAX]; |
326 |
float alfaxz2_av[NCLOXZ_MAX]; |
float alfaxz2_av_nt[NCLOXZ_MAX]; |
327 |
float alfaxz3_av[NCLOXZ_MAX]; |
float alfaxz3_av_nt[NCLOXZ_MAX]; |
328 |
int ptcloud_xz[NCLOXZ_MAX]; |
int ptcloud_xz_nt[NCLOXZ_MAX]; |
329 |
int nclstr; |
int nclstr; |
330 |
float totaltime; |
float totaltime; |
331 |
float houghtime; |
float houghtime; |
334 |
|
|
335 |
void InitcTrkHough(){ |
void InitcTrkHough(){ |
336 |
|
|
337 |
ndblt = 0; |
ndblt_nt = 0; |
338 |
ntrpt = 0; |
ntrpt_nt = 0; |
339 |
nclouds_yz = 0; |
nclouds_yz_nt = 0; |
340 |
nclouds_xz = 0; |
nclouds_xz_nt = 0; |
341 |
nclstr = 0; |
nclstr = 0; |
342 |
totaltime = 0; |
totaltime = 0; |
343 |
houghtime = 0; |
houghtime = 0; |
344 |
fittime = 0; |
fittime = 0; |
345 |
for(int i=0;i<NDBLT_MAX_NT ;i++){ |
for(int i=0;i<NDBLT_MAX_NT ;i++){ |
346 |
alfayz1[i] = 0; |
alfayz1_nt[i] = 0; |
347 |
alfayz2[i] = 0; |
alfayz2_nt[i] = 0; |
348 |
db_cloud[i] = 0; |
db_cloud_nt[i] = 0; |
349 |
} |
} |
350 |
for(int i=0;i<NTRPT_MAX_NT ;i++){ |
for(int i=0;i<NTRPT_MAX_NT ;i++){ |
351 |
alfaxz1[i] = 0; |
alfaxz1_nt[i] = 0; |
352 |
alfaxz2[i] = 0; |
alfaxz2_nt[i] = 0; |
353 |
alfaxz3[i] = 0; |
alfaxz3_nt[i] = 0; |
354 |
tr_cloud[i] = 0; |
tr_cloud_nt[i] = 0; |
355 |
} |
} |
356 |
for(int i=0;i<NCLOYZ_MAX ;i++){ |
for(int i=0;i<NCLOYZ_MAX ;i++){ |
357 |
alfayz1_av[i] = 0; |
alfayz1_av_nt[i] = 0; |
358 |
alfayz2_av[i] = 0; |
alfayz2_av_nt[i] = 0; |
359 |
ptcloud_yz[i] = 0; |
ptcloud_yz_nt[i] = 0; |
360 |
} |
} |
361 |
for(int i=0;i<NCLOXZ_MAX ;i++){ |
for(int i=0;i<NCLOXZ_MAX ;i++){ |
362 |
ptcloud_xz[i] = 0; |
ptcloud_xz_nt[i] = 0; |
363 |
alfaxz1_av[i] = 0; |
alfaxz1_av_nt[i] = 0; |
364 |
alfaxz2_av[i] = 0; |
alfaxz2_av_nt[i] = 0; |
365 |
alfaxz3_av[i] = 0; |
alfaxz3_av_nt[i] = 0; |
366 |
} |
} |
367 |
} |
} |
368 |
|
|
369 |
}; |
}; |
370 |
|
|
371 |
|
/** |
372 |
|
* \brief Struct to pass VA1-mask to F77 routines |
373 |
|
*/ |
374 |
|
struct cTrkMask { |
375 |
|
|
376 |
|
int mask_vk[NVK][NVIEW]; |
377 |
|
int mask_vk_run[NVK][NVIEW]; |
378 |
|
|
379 |
|
// void Set(TFile* , Int_t , Int_t ); |
380 |
|
|
381 |
|
}; |
382 |
|
|
383 |
|
/** |
384 |
|
* \brief Struct for pfa parameters |
385 |
|
*/ |
386 |
|
struct cTrkETA { |
387 |
|
|
388 |
|
int nangbin; |
389 |
|
float angL[NANGMAX],angR[NANGMAX]; |
390 |
|
int netaval; |
391 |
|
float eta2[NANGMAX][NETAVALMAX]; |
392 |
|
float feta2[NANGMAX][NLADDER][NVIEW][NETAVALMAX]; |
393 |
|
float eta3[NANGMAX][NETAVALMAX]; |
394 |
|
float feta3[NANGMAX][NLADDER][NVIEW][NETAVALMAX]; |
395 |
|
float eta4[NANGMAX][NETAVALMAX]; |
396 |
|
float feta4[NANGMAX][NLADDER][NVIEW][NETAVALMAX]; |
397 |
|
|
398 |
|
}; |
399 |
|
|
400 |
extern "C" { |
extern "C" { |
401 |
|
|
402 |
extern struct cTrkCalib pedsigbad_; |
extern struct cTrkCalib pedsigbad_; |
403 |
|
extern struct cTrkMask mask_; |
404 |
extern struct cTrkLevel0 level0event_; |
extern struct cTrkLevel0 level0event_; |
405 |
extern struct cTrkLevel1 level1event_; |
extern struct cTrkLevel1 level1event_; |
406 |
extern struct cTrkLevel2 level2event_; |
extern struct cTrkLevel2 level2event_; |
407 |
extern struct cPath path_; |
extern struct cPath path_; |
|
extern struct cBPath bpath_; |
|
408 |
extern struct cDbg dbg_; |
extern struct cDbg dbg_; |
409 |
|
extern struct cTrkHough houghevent_; |
410 |
extern struct cMini2track track_; |
extern struct cMini2track track_; |
411 |
extern struct cTrkHough hough_; |
extern struct cTrkETA pfa_; |
412 |
|
|
413 |
void fillpedsigfromdefault_(); |
void fillpedsigfromdefault_(); |
414 |
int readmipparam_(); |
int readmipparam_(); |
417 |
int readalignparam_(); |
int readalignparam_(); |
418 |
int readetaparam_(); |
int readetaparam_(); |
419 |
void reductionflight_(int*); |
void reductionflight_(int*); |
420 |
int analysisflight_(); |
int analysisflight_(int*); |
421 |
} |
int readb_(); |
422 |
|
|
423 |
|
} |
424 |
|
|
425 |
#endif |
#endif |
|
|
|