23double MyFunc (
double *
x,
double *p ) {
29 MyDerivFunc(TF1 *
f): fFunc(
f) {}
31 return fFunc->Derivative(*
x);
37 MyIntegFunc(TF1 *
f): fFunc(
f) {}
38 double Integral (
double *
x,
double * )
const {
39 double a = fFunc->GetXmin();
40 return fFunc->Integral(
a, *
x);
47void exampleFunctor() {
53 f1->SetParameters(0.,1.);
54 f1->SetMaximum(3);
f1->SetMinimum(-1);
66 MyDerivFunc * deriv =
new MyDerivFunc(
f1);
82 MyIntegFunc * intg =
new MyIntegFunc(
f1);
83 TF1 * f3 =
new TF1(
"f3",intg,&MyIntegFunc::Integral,
xmin,
xmax, 0);
89 l->AddEntry(
f1,
"Func");
90 l->AddEntry(f2,
"Deriv.");
91 l->AddEntry(f3,
"Integral");
TRObject operator()(const T1 &t1) const
virtual void SetLineColor(Color_t lcolor)
Set the line color.
void Draw(Option_t *option="") override
Default Draw method for all objects.
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.