FittingDemo.C File Reference

#include "TH1.h"
#include "TMath.h"
#include "TF1.h"
#include "TLegend.h"
#include "TCanvas.h"

Go to the source code of this file.

Functions

Double_t background (Double_t *x, Double_t *par)
Double_t lorentzianPeak (Double_t *x, Double_t *par)
Double_t fitFunction (Double_t *x, Double_t *par)
void FittingDemo ()


Function Documentation

Double_t background ( Double_t x,
Double_t par 
)

Definition at line 14 of file FittingDemo.C.

Double_t fitFunction ( Double_t x,
Double_t par 
)

Definition at line 27 of file FittingDemo.C.

References background, and lorentzianPeak().

void FittingDemo (  ) 

Definition at line 31 of file FittingDemo.C.

References TLegend::AddEntry(), background, c1, data, TF1::Draw(), TLegend::Draw(), TH1::Fit(), fitFcn, fitFunction(), TFormula::GetParameters(), histo, i, kBlue, kMagenta, kRed, legend, lorentzianPeak(), par, TH1::SetBinContent(), TAttFill::SetFillColor(), TAttPad::SetFrameFillColor(), TPad::SetGrid(), TAttLine::SetLineColor(), TAttLine::SetLineWidth(), TAttMarker::SetMarkerSize(), TAttMarker::SetMarkerStyle(), TF1::SetNpx(), TFormula::SetParameter(), TFormula::SetParameters(), TH1::SetStats(), TAttText::SetTextFont(), and TAttText::SetTextSize().

Double_t lorentzianPeak ( Double_t x,
Double_t par 
)

Definition at line 20 of file FittingDemo.C.

References TMath::Max(), and TMath::Pi().

Referenced by fitFunction(), and FittingDemo().


Generated on Tue Jul 5 16:09:32 2011 for ROOT_528-00b_version by  doxygen 1.5.1