14 std::vector<Double_t>
result(xx.size());
15 for(
Int_t i=0;i<xx.size();i++)
36 std::cout.precision(18);
37 std::cout<<
"Integral of the BreitWigner Function in the interval [-2, 2] R = "<<value<<std::endl;
43 std::cout<<
"Integral of the BreitWigner Function in the interval [-2, 2] MathMore = "<<value<<std::endl;
46 TF1 f1(
"BreitWigner",
"BreitWignerWrap(x)");
48 std::cout<<
"Integral of the BreitWigner Function in the interval [-2, 2] TF1 = "<<value<<std::endl;
51 value=r.
Eval(
"integrate(BreitWigner, lower = -Inf, upper = Inf)$value");
52 std::cout<<
"Integral of BreitWigner Function in the interval [-Inf, Inf] R = "<<value<<std::endl;
Double_t BreitWigner(Double_t x, Double_t mean=0, Double_t gamma=1)
Calculate a Breit Wigner function with mean and gamma.
std::vector< Double_t > BreitWignerVectorized(std::vector< Double_t > xx)
double BreitWignerWrap(double x)
virtual Double_t Integral(Double_t a, Double_t b, Double_t epsrel=1.e-12)
IntegralOneDim or analytical integral.
Template class to wrap any C++ callable object which takes one argument i.e.
double Integral(Function &f, double a, double b)
evaluate the Integral of a function f over the defined interval (a,b)
User Class for performing numerical integration of a function in one dimension.
static TRInterface & Instance()
static method to get an TRInterface instance reference
Int_t Eval(const TString &code, TRObject &ans)
Method to eval R code and you get the result in a reference to TRObject.
This is a class to pass functions from ROOT to R