フィット関数の導関数を求めたい(TF1::Derivative

 1#include <TF1.h>
 2#include <iostream>
 3
 4TF1 *f = new TF1("f", "x*x*x", -2, 2);
 5
 6// x=1.0での導関数の値を計算
 7Double_t derivative = f->Derivative(1.0);
 8
 9std::cout << "Derivative at x=1.0: " << derivative << std::endl;
10// f'(x) = 3x^2、x=1.0では3.0

TF1::Derivativeメソッドで、指定した点でのフィット関数の導関数の値を計算できます。