#ifndef ROOSTATS_MarkovChain
#define ROOSTATS_MarkovChain
#ifndef ROOT_Rtypes
#include "Rtypes.h"
#endif
#ifndef ROOT_TNamed
#include "TNamed.h"
#endif
#ifndef ROO_REAL_VAR
#include "RooRealVar.h"
#endif
#ifndef ROO_DATA_SET
#include "RooDataSet.h"
#endif
#ifndef ROO_DATA_HIST
#include "RooDataHist.h"
#endif
#ifndef ROOT_THnSparse
#include "THnSparse.h"
#endif
using namespace std;
namespace RooStats {
class MarkovChain : public TNamed {
public:
MarkovChain();
MarkovChain(RooArgSet& parameters);
MarkovChain(const char* name, const char* title, RooArgSet& parameters);
virtual void Add(RooArgSet& entry, Double_t nllValue, Double_t weight = 1.0);
virtual void AddFast(RooArgSet& entry, Double_t nllValue, Double_t weight = 1.0);
virtual void SetParameters(RooArgSet& parameters);
virtual Int_t Size() const { return fChain->numEntries(); }
virtual const RooArgSet* Get(Int_t i) const { return fChain->get(i); }
virtual const RooArgSet* Get() const { return fChain->get(); }
virtual Double_t Weight() const;
virtual Double_t Weight(Int_t i) const;
virtual Double_t NLL(Int_t i) const;
virtual Double_t NLL() const;
virtual RooDataSet* GetAsDataSet(RooArgSet* whichVars = NULL) const;
virtual RooDataSet* GetAsDataSet(RooCmdArg arg1,
RooCmdArg arg2 = RooCmdArg(), RooCmdArg arg3 = RooCmdArg(),
RooCmdArg arg4 = RooCmdArg(), RooCmdArg arg5 = RooCmdArg(),
RooCmdArg arg6 = RooCmdArg(), RooCmdArg arg7 = RooCmdArg(),
RooCmdArg arg8 = RooCmdArg()) const;
virtual const RooDataSet* GetAsConstDataSet() const { return fChain; }
virtual RooDataHist* GetAsDataHist(RooArgSet* whichVars = NULL) const;
virtual RooDataHist* GetAsDataHist(RooCmdArg arg1,
RooCmdArg arg2 = RooCmdArg(), RooCmdArg arg3 = RooCmdArg(),
RooCmdArg arg4 = RooCmdArg(), RooCmdArg arg5 = RooCmdArg(),
RooCmdArg arg6 = RooCmdArg(), RooCmdArg arg7 = RooCmdArg(),
RooCmdArg arg8 = RooCmdArg()) const;
virtual THnSparse* GetAsSparseHist(RooAbsCollection* whichVars = NULL) const;
virtual THnSparse* GetAsSparseHist(RooAbsCollection& whichVars) const
{ return GetAsSparseHist(&whichVars); }
virtual RooRealVar* GetNLLVar() const
{ return (RooRealVar*)fNLL->Clone(); }
virtual RooRealVar* GetWeightVar() const
{ return (RooRealVar*)fWeight->Clone(); }
virtual ~MarkovChain()
{
delete fParameters;
delete fDataEntry;
delete fChain;
}
protected:
RooArgSet * fParameters;
RooArgSet * fDataEntry;
RooDataSet* fChain;
RooRealVar* fNLL;
RooRealVar* fWeight;
ClassDef(MarkovChain,1);
};
}
#endif