25void hist058_TExec_th2()
28 Error(
"hist058_TExec_th2",
"gPad is null, you are not supposed to run this macro");
41 Int_t biny =
h->GetYaxis()->FindBin(py);
44 ymin =
h->GetYaxis()->GetBinLowEdge(biny);
45 ymax =
h->GetYaxis()->GetBinUpEdge(biny);
59 auto c2 =
static_cast<TCanvas *
>(
gROOT->GetListOfCanvases()->FindObject(
"c2"));
66 delete c2->GetPrimitive(
"Projection");
68 c2 =
new TCanvas(
"c2",
"Projection Canvas", 710, 10, 700, 500);
73 TH1D *hp =
h->ProjectionX(
"", biny, biny);
76 hp->
Fit(
"gaus",
"ql");
int Int_t
Signed integer 4 bytes (int)
double Double_t
Double 8 bytes.
void Error(const char *location, const char *msgfmt,...)
Use this function in case an error occurred.
bool Update(const std::shared_ptr< ROOT::Math::Minimizer > &min, const ROOT::Fit::FitConfig &fconfig, bool isValid, unsigned int ncalls=0)
Update the fit result with a new minimization status To be run only if same fit is performed with sam...
1-D histogram with a double per channel (see TH1 documentation)
void SetTitle(const char *title) override
Change/set the title.
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.
void SetName(const char *name) override
Change the name of this histogram.
Service class for 2-D histogram classes.
static TString Format(const char *fmt,...)
Static method which formats a string using a printf style format descriptor and return a TString.
small helper class to store/restore gPad context in TPad methods