#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
#include "TROOT.h"
#include "TFile.h"
#include "TTree.h"
#include "TLeaf.h"
#include "TMinuit.h"
#include "GeoServer.h"
Defines | |
| #define | TMAX 25000 |
| max. | |
Functions | |
| void | linfit (double x[], double y[], int ndata, double sig[], int mwt, double *a, double *b, double *siga, double *sigb, double *chi2) |
| Straight line fit from Numerical Recipes. | |
| void | FCN (Int_t &npar, Double_t *gin, Double_t &f, Double_t *par, Int_t iflag) |
| Minuit minimization fuction. | |
| int | main (int argc, char *argv[]) |
| main program | |
reads output tree of long.cpp
|
|
max. number of tracks |
|
||||||||||||||||||||||||
|
Minuit minimization fuction. Input parameters
|
|
||||||||||||||||||||||||||||||||||||||||||||
|
Straight line fit from Numerical Recipes. Given a set of points x[0..ndata-1], y[0..ndata-1] with standard deviations sig[0..ndata-1], fit them to a straight line y = a+bx by minimizing chi-squared. Returned are a,b and their respective probable uncertainties siga and sigb, the chi-square chi2. If mwt = 0 on input, then the standard deviations are assumed to be unavailable: the normalization of chi2 is to unit standard deviation on all points.
|
1.3.9.1