#ifndef ROO_RESOLUTION_MODEL
#define ROO_RESOLUTION_MODEL
#include "RooAbsPdf.h"
#include "RooRealProxy.h"
#include "RooRealVar.h"
#include "RooFormulaVar.h"
class RooAbsAnaConvPdf;
class RooResolutionModel : public RooAbsPdf {
public:
inline RooResolutionModel() : _basis(0) { }
RooResolutionModel(const char *name, const char *title, RooRealVar& x) ;
RooResolutionModel(const RooResolutionModel& other, const char* name=0);
virtual TObject* clone(const char* newname) const = 0 ;
virtual ~RooResolutionModel();
virtual RooAbsGenContext* modelGenContext(const RooAbsAnaConvPdf&, const RooArgSet&,
const RooDataSet*, const RooArgSet*,
Bool_t) const { return 0; }
Double_t getValV(const RooArgSet* nset=0) const ;
virtual RooResolutionModel* convolution(RooFormulaVar* basis, RooAbsArg* owner) const ;
RooRealVar& convVar() const ;
const RooRealVar& basisConvVar() const ;
inline Bool_t isBasisSupported(const char* name) const { return basisCode(name)?kTRUE:kFALSE ; }
virtual Int_t basisCode(const char* name) const = 0 ;
virtual void normLeafServerList(RooArgSet& list) const ;
Double_t getNorm(const RooArgSet* nset=0) const ;
inline const RooFormulaVar& basis() const { return _basis?*_basis:*identity() ; }
Bool_t isConvolved() { return _basis ? kTRUE : kFALSE ; }
virtual void printMultiline(std::ostream& os, Int_t content, Bool_t verbose=kFALSE, TString indent="") const ;
static void cleanup() ;
static RooFormulaVar* identity() ;
protected:
static RooFormulaVar* _identity ;
friend class RooConvGenContext ;
friend class RooAddModel ;
RooRealProxy x ;
virtual Bool_t redirectServersHook(const RooAbsCollection& newServerList, Bool_t mustReplaceAll, Bool_t nameChange, Bool_t isRecursive) ;
virtual void changeBasis(RooFormulaVar* basis) ;
Bool_t traceEvalHook(Double_t value) const ;
friend class RooAbsAnaConvPdf ;
Int_t _basisCode ;
RooFormulaVar* _basis ;
Bool_t _ownBasis ;
ClassDef(RooResolutionModel,1)
};
#endif