From efb45316ce3b776a29fbc7bae66c227daa2ed936 Mon Sep 17 00:00:00 2001 From: Vanya Belyaev Date: Tue, 13 Feb 2024 10:01:22 +0100 Subject: [PATCH] reduce integration rule for rational functions --- ostap/fitting/pdfbasic.py | 3 ++- source/src/Rational.cpp | 15 +++++++++------ 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/ostap/fitting/pdfbasic.py b/ostap/fitting/pdfbasic.py index ae2c8df3..1fb07af9 100644 --- a/ostap/fitting/pdfbasic.py +++ b/ostap/fitting/pdfbasic.py @@ -586,8 +586,9 @@ def fit_to ( self , model , data , *options ) : from ostap.fitting.roocmdarg import command cmd = command ( *options ) + return Ostap.MoreRooFit.fitTo ( model , data , cmd ) - + # ================================================================================ ## helper method to draw set of components diff --git a/source/src/Rational.cpp b/source/src/Rational.cpp index afb85a62..b2c19aa3 100644 --- a/source/src/Rational.cpp +++ b/source/src/Rational.cpp @@ -126,8 +126,9 @@ double Ostap::Math::Rational::integral s_APRECISION , // absolute precision s_RPRECISION , // relative precision m_workspace.size() , // size of workspace - s_message , - __FILE__ , __LINE__ ) ; + s_message , + __FILE__ , __LINE__ , + GSL_INTEG_GAUSS21 ) ; // return result ; } @@ -297,8 +298,9 @@ double Ostap::Math::RationalBernstein::integral s_APRECISION , // absolute precision s_RPRECISION , // relative precision m_workspace.size() , // size of workspace - s_message , - __FILE__ , __LINE__ ) ; + s_message , + __FILE__ , __LINE__ , + GSL_INTEG_GAUSS21 ) ; // return result ; } @@ -519,8 +521,9 @@ double Ostap::Math::RationalPositive::integral s_APRECISION , // absolute precision s_RPRECISION , // relative precision m_workspace.size() , // size of workspace - s_message , - __FILE__ , __LINE__ ) ; + s_message , + __FILE__ , __LINE__ , + GSL_INTEG_GAUSS21 ) ; // return result ; }