#ifndef ROO_REAL_INTEGRAL
#define ROO_REAL_INTEGRAL
#include "RooAbsReal.h"
#include "RooArgSet.h"
#include "RooAbsPdf.h"
#include "RooRealProxy.h"
#include "RooSetProxy.h"
#include "RooListProxy.h"
class RooArgSet ;
class TH1F ;
class RooAbsCategory ;
class RooRealVar ;
class RooAbsIntegrator ;
class RooNumIntConfig ;
class RooRealIntegral : public RooAbsReal {
public:
RooRealIntegral() ;
RooRealIntegral(const char *name, const char *title, const RooAbsReal& function, const RooArgSet& depList,
const RooArgSet* funcNormSet=0, const RooNumIntConfig* config=0, const char* rangeName=0) ;
RooRealIntegral(const RooRealIntegral& other, const char* name=0);
virtual TObject* clone(const char* newname) const { return new RooRealIntegral(*this,newname); }
virtual ~RooRealIntegral();
Bool_t isValid() const { return _valid; }
void printMultiline(ostream& os, Int_t contents, Bool_t verbose=kFALSE, TString indent="") const ;
void printMetaArgs(ostream& os) const ;
const RooArgSet& numIntCatVars() const { return _sumList ; }
const RooArgSet& numIntRealVars() const { return _intList ; }
const RooArgSet& anaIntVars() const { return _anaList ; }
void setCacheNumeric(Bool_t flag) {
_cacheNum = flag ;
}
Bool_t getCacheNumeric() {
return _cacheNum ;
}
static void setCacheAllNumeric(Int_t ndim) {
_cacheAllNDim = ndim ;
}
static Int_t getCacheAllNumeric() {
return _cacheAllNDim ;
}
virtual std::list<Double_t>* plotSamplingHint(RooAbsRealLValue& obs, Double_t xlo, Double_t xhi) const {
return _function.arg().plotSamplingHint(obs,xlo,xhi) ;
}
virtual RooAbsReal* createIntegral(const RooArgSet& iset, const RooArgSet* nset=0, const RooNumIntConfig* cfg=0, const char* rangeName=0) const ;
protected:
mutable Bool_t _valid;
const RooArgSet& parameters() const ;
enum IntOperMode { Hybrid, Analytic, PassThrough } ;
Bool_t initNumIntegrator() const;
void autoSelectDirtyMode() ;
virtual Double_t sum() const ;
virtual Double_t integrate() const ;
virtual Double_t jacobianProduct() const ;
Double_t evaluate() const ;
virtual Bool_t isValidReal(Double_t value, Bool_t printError=kFALSE) const ;
Bool_t servesExclusively(const RooAbsArg* server,const RooArgSet& exclLVBranches, const RooArgSet& allBranches) const ;
virtual Bool_t redirectServersHook(const RooAbsCollection& newServerList,
Bool_t mustReplaceAll, Bool_t nameChange, Bool_t isRecursive) ;
mutable RooSetProxy _sumList ;
mutable RooSetProxy _intList ;
mutable RooSetProxy _anaList ;
mutable RooSetProxy _jacList ;
mutable RooSetProxy _facList ;
mutable RooArgSet _facListOwned ;
TIterator* _facListIter ;
TIterator* _jacListIter ;
RooRealProxy _function ;
RooArgSet* _funcNormSet ;
mutable RooArgSet _saveInt ;
mutable RooArgSet _saveSum ;
RooNumIntConfig* _iconfig ;
mutable RooListProxy _sumCat ;
TIterator* _sumCatIter ;
Int_t _mode ;
IntOperMode _intOperMode ;
mutable Bool_t _restartNumIntEngine ;
mutable RooAbsIntegrator* _numIntEngine ;
mutable RooAbsFunc *_numIntegrand;
TNamed* _rangeName ;
mutable RooArgSet* _params ;
Bool_t _cacheNum ;
static Int_t _cacheAllNDim ;
virtual void operModeHook() ;
ClassDef(RooRealIntegral,2)
};
#endif