TFile** fillrandom.root
TFile* fillrandom.root
KEY: TFormula form1;1 abs(sin(x)/x)
KEY: TF1 sqroot;1 x*gaus(0) + [3]*form1
KEY: TH1F h1f;1 Test random numbers
Formula based function: sqroot
sqroot : x*gaus(0) + [3]*form1 Ndim= 1, Npar= 4, Number= 0
Formula expression:
x*[p0]*exp(-0.5*((x-[p1])/[p2])*((x-[p1])/[p2]))+[p3]*(abs(sin(x)/x))
FCN=166.86 FROM MIGRAD STATUS=CONVERGED 133 CALLS 134 TOTAL
EDM=8.2074e-10 STRATEGY= 1 ERROR MATRIX UNCERTAINTY 2.4 per cent
EXT PARAMETER STEP FIRST
NO. NAME VALUE ERROR SIZE DERIVATIVE
1 p0 3.37754e+01 5.50756e-01 1.70058e-04 8.63731e-05
2 p1 4.02291e+00 1.63715e-02 1.56017e-05 2.55897e-03
3 p2 9.73468e-01 1.25434e-02 -3.84058e-06 3.40182e-03
4 p3 6.25912e+01 1.31289e+00 5.73109e-04 2.46817e-05
fit1 : Real Time = 0.16 seconds Cpu Time = 0.17 seconds
c1->GetFrame()->SetFillColor(21);
c1->GetFrame()->SetBorderMode(-1);
c1->GetFrame()->SetBorderSize(5);
gROOT->ProcessLine(
Form(
".x %s../hist/fillrandom.C",dir.
Data()));
}
file->GetObject(
"sqroot",sqroot);
if (!sqroot){
Error(
"fit1.C",
"Cannot find object sqroot of type TF1\n");
return;
}
file->GetObject(
"h1f",h1f);
if (!h1f){
Error(
"fit1.C",
"Cannot find object h1f of type TH1F\n");
return;
}
}
R__EXTERN TBenchmark * gBenchmark
void Error(const char *location, const char *msgfmt,...)
char * Form(const char *fmt,...)
virtual void SetFillColor(Color_t fcolor)
Set the fill area color.
virtual void Start(const char *name)
Starts Benchmark with the specified name.
virtual void Show(const char *name)
Stops Benchmark name and Prints results.
virtual void Print(Option_t *option="") const
Print TNamed name and title.
A ROOT file is a suite of consecutive data records (TKey instances) with a well defined format.
static TFile * Open(const char *name, Option_t *option="", const char *ftitle="", Int_t compress=ROOT::RCompressionSetting::EDefaults::kUseGeneralPurpose, Int_t netopt=0)
Create / open a file.
1-D histogram with a float 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.
A Pave (see TPave) with text, lines or/and boxes inside.
const char * Data() const
TString & Append(const char *cs)