24void testGausFit( std::string
type =
"Minuit2",
int n = 1000) {
34 TH1D *
h2 =
new TH1D(
name.c_str(),
"Chi2 Fit with Minos Error",100, -5, 5. );
36 TH1D *
h3 =
new TH1D(
name.c_str(),
"Chi2 Fit with Integral and Minos",100, -5, 5. );
38 TH1D * h4 =
new TH1D(
name.c_str(),
"Likelihood Fit with Minos Error",100, -5, 5. );
43 for (
int i = 0; i <
n; ++i) {
52 std::string ctitle =
type +
" Gaussian Fit" ;
57 std::cout <<
"\nDo Fit 1\n";
61 std::cout <<
"\nDo Fit 2\n";
65 std::cout <<
"\nDo Fit 3\n";
66 h3->Fit(
"gaus",
"IGE");
69 std::cout <<
"\nDo Fit 4\n";
75void minuit2GausFit() {
78 testGausFit(
"Minuit2",
n);
79 testGausFit(
"Fumili2",
n);
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char cname
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char Pixmap_t Pixmap_t PictureAttributes_t attr const char char ret_data h unsigned char height h Atom_t Int_t ULong_t ULong_t unsigned char prop_list Atom_t Atom_t Atom_t Time_t type
R__EXTERN TRandom * gRandom
R__EXTERN TStyle * gStyle
1-D histogram with a double per channel (see TH1 documentation)
virtual TFitResultPtr Fit(const char *formula, Option_t *option="", Option_t *goption="", Double_t xmin=0, Double_t xmax=0)
Fit histogram with function fname.
virtual Int_t Fill(Double_t x)
Increment bin with abscissa X by 1.
void Draw(Option_t *option="") override
Draw this histogram with options.
Random number generator class based on M.
virtual Double_t Gaus(Double_t mean=0, Double_t sigma=1)
Samples a random number from the standard Normal (Gaussian) Distribution with the given mean and sigm...
void SetOptStat(Int_t stat=1)
The type of information printed in the histogram statistics box can be selected via the parameter mod...
void SetOptFit(Int_t fit=1)
The type of information about fit parameters printed in the histogram statistics box can be selected ...
static void SetDefaultFitter(const char *name="")
static: set name of default fitter