19std::vector<Double_t> BreitWignerVectorized(std::vector<Double_t> xx)
21 std::vector<Double_t> result(xx.size());
22 for(
Int_t i=0;i<xx.size();i++)
29double BreitWignerWrap(
double x){
40 Double_t value=
r.Eval(
"integrate(BreitWigner, lower = -2, upper = 2)$value");
42 std::cout.precision(18);
43 std::cout<<
"Integral of the BreitWigner Function in the interval [-2, 2] R = "<<value<<std::endl;
48 value=i.Integral(-2,2);
49 std::cout<<
"Integral of the BreitWigner Function in the interval [-2, 2] MathMore = "<<value<<std::endl;
52 TF1 f1(
"BreitWigner",
"BreitWignerWrap(x)");
53 value=
f1.Integral(-2,2);
54 std::cout<<
"Integral of the BreitWigner Function in the interval [-2, 2] TF1 = "<<value<<std::endl;
57 value=
r.Eval(
"integrate(BreitWigner, lower = -Inf, upper = Inf)$value");
58 std::cout<<
"Integral of BreitWigner Function in the interval [-Inf, Inf] R = "<<value<<std::endl;
int Int_t
Signed integer 4 bytes (int).
double Double_t
Double 8 bytes.
Template class to wrap any C++ callable object which takes one argument i.e.
This is a class to pass functions from ROOT to R.
ROOT R was implemented using the R Project library and the modules Rcpp and RInside.
static TRInterface & Instance()
static method to get an TRInterface instance reference
IntegratorOneDim Integrator
Double_t BreitWigner(Double_t x, Double_t mean=0, Double_t gamma=1)
Calculates a Breit Wigner function with mean and gamma.