Checking in the seeds of new cluster fitting code.
[u/mrichter/AliRoot.git] / HLT / comp / AliL3FitUtilities.h
CommitLineData
6b8f6f6e 1#ifndef AliL3FitUtilities
2#define AliL3FitUtilities
3
4void f2gauss5( double, double *, double *,double *,int );
5int lev_marq_fit( double x[], double y[], double sig[], int NPT, double a[], int ia[], double dev[], int MA,
6 double *chisq_p, void (*funcs)(double, double [], double *, double [], int) );
7
8#define max(x, y) (((x) > (y)) ? (x) : (y))
9#define min(x, y) (((x) < (y)) ? (x) : (y))
10#define mabs(x) (((x) > 0) ? (x) : (-(x)))
11#define nint(x) ((int)((x) < 0 ? (x)-0.5 : (x)+0.5))
12#define DBL(x) ((double)(x))
13#define veclen2(x,y) (DBL(x)*DBL(x) + DBL(y)*DBL(y))
14#define samesign(x,y) ((((x)>=0 && (y)>=0) || ((x)<0&&(y)<0)) ? TRUE : FALSE )
15
16#define SWAP(a,b) {swap=(a);(a)=(b);(b)=swap;}
17#define SQR(x) ((x)*(x))
18
19#define NR_END 1
20#define FREE_ARG char*
21#define EPSILON 1.0E-12
22#define TRUE 1
23#define FALSE 1
24#define FIT_PTS 2000
25#define FIT_MAXPAR 41
26#define NUM_PARS 5
27
28/*--- fitting 2-dimensional cluster --------------------------*/
29struct DPOINT {
30 double u;
31 double v;
32};
33typedef struct DPOINT DPOINT;
34
35extern DPOINT *plane; //!
36
37typedef struct {
38 long float_size;
39 long steps;
40 double dmin;
41 double dmax;
42 double step_size;
43 } exp_header_t;
44typedef float FLOAT_SIZE;
45
46#endif