45 ClassImp(RooSegmentedIntegrator2D);
52 void RooSegmentedIntegrator2D::registerIntegrator(RooNumIntFactory& fact)
54 fact.storeProtoIntegrator(
new RooSegmentedIntegrator2D(),RooArgSet(),RooSegmentedIntegrator1D::Class()->GetName()) ;
62 RooSegmentedIntegrator2D::RooSegmentedIntegrator2D() :
63 _xIntegrator(0), _xint(0)
72 RooSegmentedIntegrator2D::RooSegmentedIntegrator2D(
const RooAbsFunc&
function,
const RooNumIntConfig& config) :
73 RooSegmentedIntegrator1D(*(_xint=new RooIntegratorBinding(*(_xIntegrator=new RooSegmentedIntegrator1D(function,config)))),config)
82 RooSegmentedIntegrator2D::RooSegmentedIntegrator2D(
const RooAbsFunc&
function, Double_t xmin, Double_t xmax,
83 Double_t ymin, Double_t ymax,
84 const RooNumIntConfig& config) :
85 RooSegmentedIntegrator1D(*(_xint=new RooIntegratorBinding(*(_xIntegrator=new RooSegmentedIntegrator1D(function,ymin,ymax,config)))),xmin,xmax,config)
93 RooAbsIntegrator* RooSegmentedIntegrator2D::clone(
const RooAbsFunc&
function,
const RooNumIntConfig& config)
const
95 return new RooSegmentedIntegrator2D(
function,config) ;
103 RooSegmentedIntegrator2D::~RooSegmentedIntegrator2D()
106 delete _xIntegrator ;
115 Bool_t RooSegmentedIntegrator2D::checkLimits()
const
117 if(_useIntegrandLimits) {
118 assert(0 != integrand() && integrand()->isValid());
119 _xmin= integrand()->getMinLimit(0);
120 _xmax= integrand()->getMaxLimit(0);
122 _range= _xmax - _xmin;
124 oocoutE((TObject*)0,InputArguments) <<
"RooIntegrator1D::checkLimits: bad range with min >= max" << endl;
127 Bool_t ret = (RooNumber::isInfinite(_xmin) || RooNumber::isInfinite(_xmax)) ? kFALSE : kTRUE;
131 Double_t segSize = (_xmax - _xmin) / _nseg ;
133 for (i=0 ; i<_nseg ; i++) {
134 _array[i]->setLimits(_xmin+i*segSize,_xmin+(i+1)*segSize) ;