The normalized residuals are retrieved and plotted in a simple graph. The QQ plot of the normalized residual using the normal distribution is also plotted.
{
h2->SetTitle("Weighted Histogram");
h2->SetBinContent(1, 2.20173025 );
h2->SetBinContent(2, 3.30143857);
h2->SetBinContent(3, 2.5892849);
h2->SetBinContent(4, 2.99990201);
h2->SetBinContent(5, 4.92877054);
h2->SetBinContent(6, 8.33036995);
h2->SetBinContent(7, 6.95084763);
h2->SetBinContent(8, 15.206357);
h2->SetBinContent(9, 23.9236012);
h2->SetBinContent(10, 44.3848114);
h2->SetBinContent(11, 49.4465599);
h2->SetBinContent(12, 25.1868858);
h2->SetBinContent(13, 16.3129692);
h2->SetBinContent(14, 13.0289612);
h2->SetBinContent(15, 16.7857609);
h2->SetBinContent(16, 22.9914703);
h2->SetBinContent(17, 30.5279255);
h2->SetBinContent(18, 12.5252123);
h2->SetBinContent(19, 16.4104557);
h2->SetBinContent(20, 7.86067867);
h2->SetBinError(1, 0.38974303 );
h2->SetBinError(2, 0.536510944);
h2->SetBinError(3, 0.529702604);
h2->SetBinError(4, 0.642001867);
h2->SetBinError(5, 0.969341516);
h2->SetBinError(6, 1.47611344);
h2->SetBinError(7, 1.69797957);
h2->SetBinError(8, 3.28577447);
h2->SetBinError(9, 5.40784931);
h2->SetBinError(10, 9.10106468);
h2->SetBinError(11, 9.73541737);
h2->SetBinError(12, 5.55019951);
h2->SetBinError(13, 3.57914758);
h2->SetBinError(14, 2.77877331);
h2->SetBinError(15, 3.23697519);
h2->SetBinError(16, 4.3608489);
h2->SetBinError(17, 5.77172089);
h2->SetBinError(18, 3.38666105);
h2->SetBinError(19, 2.98861837);
h2->SetBinError(20, 1.58402085);
h2->SetEntries(500);
for (
Int_t i=0; i<
n; i++)
x[i]= 4.+i*12./20.+12./40.;
resgr->
SetTitle(
"Normalized Residuals");
TF1 *
f =
new TF1(
"f",
"TMath::Gaus(x,0,1)",-10,10);
qqplot->
SetTitle(
"Q-Q plot of Normalized Residuals");
h2->Draw("");
h2->SetMarkerColor(4);
h2->SetMarkerStyle(20);
}
virtual void SetMarkerColor(Color_t mcolor=1)
Set the marker color.
virtual void SetMarkerStyle(Style_t mstyle=1)
Set the marker style.
virtual void SetMarkerSize(Size_t msize=1)
Set the marker size.
virtual void SetRangeUser(Double_t ufirst, Double_t ulast)
Set the viewing range for the axis from ufirst to ulast (in user coordinates, that is,...
This class allows to draw quantile-quantile plots.
A TGraph is an object made of two arrays X and Y with npoints each.
void Draw(Option_t *chopt="") override
Draw this graph with its current attributes.
TAxis * GetXaxis() const
Get x axis of the graph.
TAxis * GetYaxis() const
Get y axis of the graph.
void SetTitle(const char *title="") override
Change (i.e.
1-D histogram with a double per channel (see TH1 documentation)
void SetTitle(const char *title) override
Change/set the title.
void Draw(Option_t *option="") override
Draw this histogram with options.
virtual void SetBinContent(Int_t bin, Double_t content)
Set bin content see convention for numbering bins in TH1::GetBin In case the bin number is greater th...
virtual Double_t Chi2Test(const TH1 *h2, Option_t *option="UU", Double_t *res=nullptr) const
test for comparing weighted and unweighted histograms.
virtual void SetEntries(Double_t n)
virtual void SetTitle(const char *title="")
Set the title of the TNamed.