57#if defined(__PEAKS_C_FIT_AREAS__)
67 TH1F *
h =
new TH1F(
"h",
"test", 500, 0, 1000);
77#if defined(__PEAKS_C_FIT_AREAS__)
83 f->SetParameters(par);
87 h->FillRandom(
"f", 200000);
104 h->Fit(
"fline",
"qn");
106 par[0] =
fline->GetParameter(0);
107 par[1] =
fline->GetParameter(1);
113 Int_t bin =
h->GetXaxis()->FindBin(
xp);
120#if defined(__PEAKS_C_FIT_AREAS__)
126 printf(
"Now fitting: Be patient\n");
ROOT::Detail::TRangeCast< T, true > TRangeDynCast
TRangeDynCast is an adapter class that allows the typed iteration through a TCollection.
winID h TVirtualViewer3D TVirtualGLPainter p
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 np
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 result
R__EXTERN TRandom * gRandom
virtual void SetNpx(Int_t npx=100)
Set the number of points used to draw the function.
virtual void SetParameters(const Double_t *params)
1-D histogram with a float per channel (see TH1 documentation)
TH1 is the base class of all histogram classes in ROOT.
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.
TObject * Clone(const char *newname="") const override
Make a complete copy of the underlying object.
Double_t Rndm() override
Machine independent random number generator.
Advanced Spectra Processing.
virtual TH1 * Background(const TH1 *hist, Int_t niter=20, Option_t *option="")
One-dimensional background estimation function.
virtual Int_t Search(const TH1 *hist, Double_t sigma=2, Option_t *option="", Double_t threshold=0.05)
One-dimensional peak search function.
Double_t * GetPositionX() const
static TVirtualFitter * Fitter(TObject *obj, Int_t maxpar=25)
Static function returning a pointer to the current fitter.
Double_t Gaus(Double_t x, Double_t mean=0, Double_t sigma=1, Bool_t norm=kFALSE)
Calculates a gaussian function with mean and sigma.
Double_t Sqrt(Double_t x)
Returns the square root of x.
Short_t Abs(Short_t d)
Returns the absolute value of parameter Short_t d.
constexpr Double_t TwoPi()