Numerical integration using R passing the function from ROOT
std::vector<Double_t> BreitWignerVectorized(std::vector<Double_t> xx)
{
std::vector<Double_t>
result(xx.size());
for(
Int_t i=0;i<xx.size();i++)
{
}
}
double BreitWignerWrap(
double x){
}
{
Double_t value=
r.Eval(
"integrate(BreitWigner, lower = -2, upper = 2)$value");
std::cout.precision(18);
std::cout<<
"Integral of the BreitWigner Function in the interval [-2, 2] R = "<<
value<<std::endl;
std::cout<<
"Integral of the BreitWigner Function in the interval [-2, 2] MathMore = "<<
value<<std::endl;
TF1 f1(
"BreitWigner",
"BreitWignerWrap(x)");
std::cout<<
"Integral of the BreitWigner Function in the interval [-2, 2] TF1 = "<<
value<<std::endl;
value=
r.Eval(
"integrate(BreitWigner, lower = -Inf, upper = Inf)$value");
std::cout<<
"Integral of BreitWigner Function in the interval [-Inf, Inf] R = "<<
value<<std::endl;
}
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t r
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t result
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void value
User Class for performing numerical integration of a function in one dimension.
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
virtual Double_t Integral(Double_t a, Double_t b, Double_t epsrel=1.e-12)
IntegralOneDim or analytical integral.
Double_t BreitWigner(Double_t x, Double_t mean=0, Double_t gamma=1)
Calculates a Breit Wigner function with mean and gamma.
- Author
Definition in file Integration.C.