// RooSegmentedIntegrator2D implements an adaptive one-dimensional
// numerical integration algorithm.
// END_HTML
#include "RooFit.h"
#include "Riostream.h"
#include "TClass.h"
#include "RooSegmentedIntegrator2D.h"
#include "RooArgSet.h"
#include "RooIntegratorBinding.h"
#include "RooRealVar.h"
#include "RooNumber.h"
#include "RooNumIntFactory.h"
#include "RooMsgService.h"
#include <assert.h>
using namespace std;
ClassImp(RooSegmentedIntegrator2D)
;
void RooSegmentedIntegrator2D::registerIntegrator(RooNumIntFactory& fact)
{
fact.storeProtoIntegrator(new RooSegmentedIntegrator2D(),RooArgSet(),RooSegmentedIntegrator1D::Class()->GetName()) ;
}
RooSegmentedIntegrator2D::RooSegmentedIntegrator2D() :
_xIntegrator(0), _xint(0)
{
}
RooSegmentedIntegrator2D::RooSegmentedIntegrator2D(const RooAbsFunc& function, const RooNumIntConfig& config) :
RooSegmentedIntegrator1D(*(_xint=new RooIntegratorBinding(*(_xIntegrator=new RooSegmentedIntegrator1D(function,config)))),config)
{
}
RooSegmentedIntegrator2D::RooSegmentedIntegrator2D(const RooAbsFunc& function, Double_t xmin, Double_t xmax,
Double_t ymin, Double_t ymax,
const RooNumIntConfig& config) :
RooSegmentedIntegrator1D(*(_xint=new RooIntegratorBinding(*(_xIntegrator=new RooSegmentedIntegrator1D(function,ymin,ymax,config)))),xmin,xmax,config)
{
}
RooAbsIntegrator* RooSegmentedIntegrator2D::clone(const RooAbsFunc& function, const RooNumIntConfig& config) const
{
return new RooSegmentedIntegrator2D(function,config) ;
}
RooSegmentedIntegrator2D::~RooSegmentedIntegrator2D()
{
delete _xint ;
delete _xIntegrator ;
}
Bool_t RooSegmentedIntegrator2D::checkLimits() const
{
if(_useIntegrandLimits) {
assert(0 != integrand() && integrand()->isValid());
_xmin= integrand()->getMinLimit(0);
_xmax= integrand()->getMaxLimit(0);
}
_range= _xmax - _xmin;
if(_range <= 0) {
oocoutE((TObject*)0,InputArguments) << "RooIntegrator1D::checkLimits: bad range with min >= max" << endl;
return kFALSE;
}
Bool_t ret = (RooNumber::isInfinite(_xmin) || RooNumber::isInfinite(_xmax)) ? kFALSE : kTRUE;
if (_array && ret) {
Double_t segSize = (_xmax - _xmin) / _nseg ;
Int_t i ;
for (i=0 ; i<_nseg ; i++) {
_array[i]->setLimits(_xmin+i*segSize,_xmin+(i+1)*segSize) ;
}
}
return ret ;
}
RooSegmentedIntegrator2D.cxx:1 RooSegmentedIntegrator2D.cxx:2 RooSegmentedIntegrator2D.cxx:3 RooSegmentedIntegrator2D.cxx:4 RooSegmentedIntegrator2D.cxx:5 RooSegmentedIntegrator2D.cxx:6 RooSegmentedIntegrator2D.cxx:7 RooSegmentedIntegrator2D.cxx:8 RooSegmentedIntegrator2D.cxx:9 RooSegmentedIntegrator2D.cxx:10 RooSegmentedIntegrator2D.cxx:11 RooSegmentedIntegrator2D.cxx:12 RooSegmentedIntegrator2D.cxx:13 RooSegmentedIntegrator2D.cxx:14 RooSegmentedIntegrator2D.cxx:15 RooSegmentedIntegrator2D.cxx:16 RooSegmentedIntegrator2D.cxx:17 RooSegmentedIntegrator2D.cxx:18 RooSegmentedIntegrator2D.cxx:19 RooSegmentedIntegrator2D.cxx:20 RooSegmentedIntegrator2D.cxx:21 RooSegmentedIntegrator2D.cxx:22 RooSegmentedIntegrator2D.cxx:23 RooSegmentedIntegrator2D.cxx:24 RooSegmentedIntegrator2D.cxx:25 RooSegmentedIntegrator2D.cxx:26 RooSegmentedIntegrator2D.cxx:27 RooSegmentedIntegrator2D.cxx:28 RooSegmentedIntegrator2D.cxx:29 RooSegmentedIntegrator2D.cxx:30 RooSegmentedIntegrator2D.cxx:31 RooSegmentedIntegrator2D.cxx:32 RooSegmentedIntegrator2D.cxx:33 RooSegmentedIntegrator2D.cxx:34 RooSegmentedIntegrator2D.cxx:35 RooSegmentedIntegrator2D.cxx:36 RooSegmentedIntegrator2D.cxx:37 RooSegmentedIntegrator2D.cxx:38 RooSegmentedIntegrator2D.cxx:39 RooSegmentedIntegrator2D.cxx:40 RooSegmentedIntegrator2D.cxx:41 RooSegmentedIntegrator2D.cxx:42 RooSegmentedIntegrator2D.cxx:43 RooSegmentedIntegrator2D.cxx:44 RooSegmentedIntegrator2D.cxx:45 RooSegmentedIntegrator2D.cxx:46 RooSegmentedIntegrator2D.cxx:47 RooSegmentedIntegrator2D.cxx:48 RooSegmentedIntegrator2D.cxx:49 RooSegmentedIntegrator2D.cxx:50 RooSegmentedIntegrator2D.cxx:51 RooSegmentedIntegrator2D.cxx:52 RooSegmentedIntegrator2D.cxx:53 RooSegmentedIntegrator2D.cxx:54 RooSegmentedIntegrator2D.cxx:55 RooSegmentedIntegrator2D.cxx:56 RooSegmentedIntegrator2D.cxx:57 RooSegmentedIntegrator2D.cxx:58 RooSegmentedIntegrator2D.cxx:59 RooSegmentedIntegrator2D.cxx:60 RooSegmentedIntegrator2D.cxx:61 RooSegmentedIntegrator2D.cxx:62 RooSegmentedIntegrator2D.cxx:63 RooSegmentedIntegrator2D.cxx:64 RooSegmentedIntegrator2D.cxx:65 RooSegmentedIntegrator2D.cxx:66 RooSegmentedIntegrator2D.cxx:67 RooSegmentedIntegrator2D.cxx:68 RooSegmentedIntegrator2D.cxx:69 RooSegmentedIntegrator2D.cxx:70 RooSegmentedIntegrator2D.cxx:71 RooSegmentedIntegrator2D.cxx:72 RooSegmentedIntegrator2D.cxx:73 RooSegmentedIntegrator2D.cxx:74 RooSegmentedIntegrator2D.cxx:75 RooSegmentedIntegrator2D.cxx:76 RooSegmentedIntegrator2D.cxx:77 RooSegmentedIntegrator2D.cxx:78 RooSegmentedIntegrator2D.cxx:79 RooSegmentedIntegrator2D.cxx:80 RooSegmentedIntegrator2D.cxx:81 RooSegmentedIntegrator2D.cxx:82 RooSegmentedIntegrator2D.cxx:83 RooSegmentedIntegrator2D.cxx:84 RooSegmentedIntegrator2D.cxx:85 RooSegmentedIntegrator2D.cxx:86 RooSegmentedIntegrator2D.cxx:87 RooSegmentedIntegrator2D.cxx:88 RooSegmentedIntegrator2D.cxx:89 RooSegmentedIntegrator2D.cxx:90 RooSegmentedIntegrator2D.cxx:91 RooSegmentedIntegrator2D.cxx:92 RooSegmentedIntegrator2D.cxx:93 RooSegmentedIntegrator2D.cxx:94 RooSegmentedIntegrator2D.cxx:95 RooSegmentedIntegrator2D.cxx:96 RooSegmentedIntegrator2D.cxx:97 RooSegmentedIntegrator2D.cxx:98 RooSegmentedIntegrator2D.cxx:99 RooSegmentedIntegrator2D.cxx:100 RooSegmentedIntegrator2D.cxx:101 RooSegmentedIntegrator2D.cxx:102 RooSegmentedIntegrator2D.cxx:103 RooSegmentedIntegrator2D.cxx:104 RooSegmentedIntegrator2D.cxx:105 RooSegmentedIntegrator2D.cxx:106 RooSegmentedIntegrator2D.cxx:107 RooSegmentedIntegrator2D.cxx:108 RooSegmentedIntegrator2D.cxx:109 RooSegmentedIntegrator2D.cxx:110 RooSegmentedIntegrator2D.cxx:111 RooSegmentedIntegrator2D.cxx:112 RooSegmentedIntegrator2D.cxx:113 RooSegmentedIntegrator2D.cxx:114 RooSegmentedIntegrator2D.cxx:115 RooSegmentedIntegrator2D.cxx:116 RooSegmentedIntegrator2D.cxx:117 RooSegmentedIntegrator2D.cxx:118 RooSegmentedIntegrator2D.cxx:119 RooSegmentedIntegrator2D.cxx:120 RooSegmentedIntegrator2D.cxx:121 RooSegmentedIntegrator2D.cxx:122 RooSegmentedIntegrator2D.cxx:123 RooSegmentedIntegrator2D.cxx:124 RooSegmentedIntegrator2D.cxx:125 RooSegmentedIntegrator2D.cxx:126 RooSegmentedIntegrator2D.cxx:127 RooSegmentedIntegrator2D.cxx:128 RooSegmentedIntegrator2D.cxx:129 RooSegmentedIntegrator2D.cxx:130 RooSegmentedIntegrator2D.cxx:131 RooSegmentedIntegrator2D.cxx:132 RooSegmentedIntegrator2D.cxx:133 RooSegmentedIntegrator2D.cxx:134 RooSegmentedIntegrator2D.cxx:135 RooSegmentedIntegrator2D.cxx:136 RooSegmentedIntegrator2D.cxx:137 RooSegmentedIntegrator2D.cxx:138