#ifndef ROO_CHI2_VAR
#define ROO_CHI2_VAR
#include "RooAbsOptTestStatistic.h"
#include "RooCmdArg.h"
#include "RooDataHist.h"
#include "RooAbsPdf.h"
class RooChi2Var : public RooAbsOptTestStatistic {
public:
RooChi2Var(const char *name, const char* title, RooAbsReal& func, RooDataHist& data,
const RooCmdArg& arg1 , const RooCmdArg& arg2=RooCmdArg::none(),const RooCmdArg& arg3=RooCmdArg::none(),
const RooCmdArg& arg4=RooCmdArg::none(), const RooCmdArg& arg5=RooCmdArg::none(),const RooCmdArg& arg6=RooCmdArg::none(),
const RooCmdArg& arg7=RooCmdArg::none(), const RooCmdArg& arg8=RooCmdArg::none(),const RooCmdArg& arg9=RooCmdArg::none()) ;
RooChi2Var(const char *name, const char* title, RooAbsPdf& pdf, RooDataHist& data,
const RooCmdArg& arg1 , const RooCmdArg& arg2=RooCmdArg::none(),const RooCmdArg& arg3=RooCmdArg::none(),
const RooCmdArg& arg4=RooCmdArg::none(), const RooCmdArg& arg5=RooCmdArg::none(),const RooCmdArg& arg6=RooCmdArg::none(),
const RooCmdArg& arg7=RooCmdArg::none(), const RooCmdArg& arg8=RooCmdArg::none(),const RooCmdArg& arg9=RooCmdArg::none()) ;
enum FuncMode { Function, Pdf, ExtendedPdf } ;
RooChi2Var(const char *name, const char *title, RooAbsPdf& pdf, RooDataHist& data,
Bool_t extended=kFALSE, const char* rangeName=0, const char* addCoefRangeName=0,
Int_t nCPU=1, RooFit::MPSplit interleave=RooFit::BulkPartition, Bool_t verbose=kTRUE, Bool_t splitCutRange=kTRUE, RooDataHist::ErrorType=RooDataHist::SumW2) ;
RooChi2Var(const char *name, const char *title, RooAbsReal& func, RooDataHist& data,
const RooArgSet& projDeps, FuncMode funcMode, const char* rangeName=0, const char* addCoefRangeName=0,
Int_t nCPU=1, RooFit::MPSplit interleave=RooFit::BulkPartition, Bool_t verbose=kTRUE, Bool_t splitCutRange=kTRUE, RooDataHist::ErrorType=RooDataHist::SumW2) ;
RooChi2Var(const RooChi2Var& other, const char* name=0);
virtual TObject* clone(const char* newname) const { return new RooChi2Var(*this,newname); }
virtual RooAbsTestStatistic* create(const char *name, const char *title, RooAbsReal& pdf, RooAbsData& dhist,
const RooArgSet& projDeps, const char* rangeName=0, const char* addCoefRangeName=0,
Int_t nCPU=1, RooFit::MPSplit interleave=RooFit::BulkPartition,Bool_t verbose=kTRUE, Bool_t splitCutRange=kTRUE, Bool_t = kFALSE) {
return new RooChi2Var(name,title,(RooAbsPdf&)pdf,(RooDataHist&)dhist,projDeps,_funcMode,rangeName,
addCoefRangeName,nCPU,interleave,verbose, splitCutRange,_etype) ;
}
virtual ~RooChi2Var();
virtual Double_t defaultErrorLevel() const {
return 1.0 ;
}
protected:
static RooArgSet _emptySet ;
RooDataHist::ErrorType _etype ;
FuncMode _funcMode ;
virtual Double_t evaluatePartition(Int_t firstEvent, Int_t lastEvent, Int_t stepSize) const ;
ClassDef(RooChi2Var,1)
};
#endif