Illustrates how to use the TH1::FitSlicesY function It uses the TH2F histogram generated in macro hsimple.C It invokes FitSlicesY and draw the fitted "mean" and "sigma" in 2 sepate pads.
This macro shows also how to annotate a picture, change some pad parameters.
gPad->SetTopMargin(0.12);
hpxpy->GetXaxis()->SetLabelSize(0.06);
hpxpy->GetYaxis()->SetLabelSize(0.06);
hpxpy->FitSlicesY(
nullptr,7,32,20);
gPad->SetTopMargin(0.12);
gPad->SetLeftMargin(0.15);
gPad->SetTopMargin(0.12);
gPad->SetLeftMargin(0.15);
}
ROOT::Detail::TRangeCast< T, true > TRangeDynCast
TRangeDynCast is an adapter class that allows the typed iteration through a TCollection.
R__EXTERN TStyle * gStyle
A ROOT file is an on-disk file, usually with extension .root, that stores objects in a file-system-li...
2-D histogram with a float per channel (see TH1 documentation)
The most important graphics class in the ROOT system.
const char * Data() const
TString & ReplaceAll(const TString &s1, const TString &s2)
TString & Append(const char *cs)
void SetFrameFillColor(Color_t color=1)
void SetTitleW(Float_t w=0)
void SetTitleH(Float_t h=0)
void SetLabelSize(Float_t size=0.04, Option_t *axis="X")
Set size of axis labels.
- Author
- Rene Brun
Definition in file fitslicesy.C.