1 |
|
/* jetfit.cpp - Package to fit multi-Gaussian distributions to histograms |
2 |
– |
* rewrite after accidental deletion 07-24-09 |
2 |
|
* Author: David Nisson |
3 |
|
*/ |
4 |
|
|
40 |
|
// configurable options |
41 |
|
bool ignorezero = false; // ignore zero bins when fitting |
42 |
|
|
44 |
– |
struct histo { |
45 |
– |
vector< vector<double> > bins; |
46 |
– |
double Xlo, Xhi, Ylo, Yhi; |
47 |
– |
} energy; |
48 |
– |
|
49 |
– |
|
43 |
|
model_def *mdef; |
44 |
|
|
45 |
|
model_def& curr_model_def() { |
322 |
|
|
323 |
|
void model_def::par_init(TH2 *hist, TMinuit *gMinuit, vector<TString> &pars, |
324 |
|
double *pval, double *perr, double *plo, double *phi, |
325 |
< |
int npar, results r) { |
325 |
> |
int npar, FitResults r) { |
326 |
|
int npar1 = npar - get_formula()->GetNpar(); |
327 |
|
bool init_spec_pars = false; |
328 |
|
if (ngauss <= get_n_special_par_sets()) { |
456 |
|
} |
457 |
|
} |
458 |
|
|
459 |
< |
results fit_histo(TH2 *hist, vector<trouble> &t_vec, |
459 |
> |
FitResults fit_histo(TH2 *hist, vector<trouble> &t_vec, |
460 |
|
void (*cc_minuit)(TMinuit *, TH2 *, int), |
461 |
|
int start_ngauss, |
462 |
|
int rebinX, int rebinY, |
464 |
|
TMinuit *gMinuit = new TMinuit(); |
465 |
|
int npar_indiv = mdef->get_formula()->GetNpar(); |
466 |
|
int istat, erflg; |
467 |
< |
results r; |
467 |
> |
FitResults r; |
468 |
|
|
469 |
|
gMinuit->SetFCN(fcn); |
470 |
|
gMinuit->mninit(5, 6, 7); |