/***************************************************************************** * Project: RooFit * * Package: RooFitCore * * File: $Id$ * Authors: * * WV, Wouter Verkerke, UC Santa Barbara, verkerke@slac.stanford.edu * * DK, David Kirkby, UC Irvine, dkirkby@uci.edu * * * * Copyright (c) 2000-2005, Regents of the University of California * * and Stanford University. All rights reserved. * * * * Redistribution and use in source and binary forms, * * with or without modification, are permitted according to the terms * * listed in LICENSE (http://roofit.sourceforge.net/license.txt) * *****************************************************************************/ #ifndef ROO_BIN_INTEGRATOR #define ROO_BIN_INTEGRATOR #include "RooAbsIntegrator.h" #include "RooNumIntConfig.h" #include #include class RooBinIntegrator : public RooAbsIntegrator { public: // Constructors, assignment etc RooBinIntegrator(const RooAbsFunc& function, int numBins=100) ; RooBinIntegrator(const RooAbsFunc& function, const RooNumIntConfig& config) ; ~RooBinIntegrator() override; bool checkLimits() const override; double integral(const double *yvec=nullptr) override ; using RooAbsIntegrator::setLimits ; bool setLimits(double* xmin, double* xmax) override; bool setUseIntegrandLimits(bool flag) override {_useIntegrandLimits = flag ; return true ; } protected: friend class RooNumIntFactory ; static void registerIntegrator(RooNumIntFactory& fact) ; RooBinIntegrator(const RooBinIntegrator&) ; // Numerical integrator workspace mutable std::vector _xmin; /// _xmax; ///> _binb; /// _x ; ///