Fork me on GitHub

Changeset 1160e4f in git


Ignore:
Timestamp:
Aug 26, 2016, 2:16:05 PM (8 years ago)
Author:
Alexandre Mertens <alexandre.mertens@…>
Branches:
ImprovedOutputFile, Timing, dual_readout, llp, master
Children:
ebf057e
Parents:
7b61e66
Message:

double fit in Gauss

File:
1 edited

Legend:

Unmodified
Added
Removed
  • examples/Validation.cpp

    r7b61e66 r1160e4f  
    476476  TF1 *f1 = new TF1("f1", "gaus", hist->GetMean()-2*hist->GetRMS(), hist->GetMean()+2*hist->GetRMS());
    477477  hist->Fit("f1","RQ");
    478   Double_t sig = f1->GetParameter(2);
    479   Double_t sigErr = f1->GetParError(2);
     478
     479  TF1 *f2 = new TF1("f2", "gaus", f1->GetParameter(1) - 2*f1->GetParameter(2), f1->GetParameter(1) + 2*f1->GetParameter(2));
     480  hist->Fit("f2","RQ"); 
     481
     482  Double_t sig = f2->GetParameter(2);
     483  Double_t sigErr = f2->GetParError(2);
     484
    480485  delete f1;
    481486  return make_pair (sig, sigErr);
Note: See TracChangeset for help on using the changeset viewer.