]> git.uio.no Git - u/mrichter/AliRoot.git/blob - HLT/comp/AliL3FitUtilities.h
New version of TOF tracker which uses TOF clusters as an input (A. De Caro)
[u/mrichter/AliRoot.git] / HLT / comp / AliL3FitUtilities.h
1 /*@(#) $Id$*/
2
3 #ifndef AliL3FitUtilities
4 #define AliL3FitUtilities
5
6 /*This we do because this file is read both with c and c++ compiler, 
7   and extern "C" is needed only in case of c++. */
8 #ifdef __cplusplus
9 extern "C" 
10 #endif
11 void f2gauss5( double, double *, double *,double *,int );
12
13 #ifdef __cplusplus 
14 extern "C" 
15 #endif
16 int lev_marq_fit( double x[], double y[], double sig[], int NPT, double a[], int ia[], double dev[], int MA,
17                   double *chisq_p, void (*funcs)(double, double [], double *, double [], int) );
18
19 #define max(x, y) (((x) > (y)) ? (x) : (y))
20 #define min(x, y) (((x) < (y)) ? (x) : (y))
21 #define mabs(x)   (((x) > 0) ? (x) : (-(x)))
22 #define nint(x)   ((int)((x) < 0 ? (x)-0.5 : (x)+0.5))
23 #define DBL(x)    ((double)(x))
24 #define veclen2(x,y)  (DBL(x)*DBL(x) + DBL(y)*DBL(y))
25 #define samesign(x,y)   ((((x)>=0 && (y)>=0) || ((x)<0&&(y)<0)) ? TRUE : FALSE )
26
27 #define SWAP(a,b) {swap=(a);(a)=(b);(b)=swap;}
28 #define SQR(x)       ((x)*(x))
29
30 #define NR_END 1
31 #define FREE_ARG char*
32 #define EPSILON             1.0E-12
33 #define FIT_PTS     2000
34 #define  FIT_MAXPAR   41
35 #define NUM_PARS 5
36
37 /*--- fitting 2-dimensional cluster --------------------------*/
38 struct DPOINT {
39   double u;
40   double v;
41 };
42 typedef struct DPOINT DPOINT;
43
44 extern  DPOINT *plane; 
45
46 typedef struct { 
47                                         long   float_size;
48                                         long   steps;
49                                         double dmin;
50                                         double dmax;
51                                         double step_size;
52                                 } exp_header_t;
53 typedef float FLOAT_SIZE;
54
55 #endif