#ifndef ROOPROFILELL
#define ROOPROFILELL
#include "RooAbsReal.h"
#include "RooRealProxy.h"
#include "RooSetProxy.h"
#include <map>
#include <string>
class RooMinuit ;
class RooProfileLL : public RooAbsReal {
public:
RooProfileLL() ;
RooProfileLL(const char *name, const char *title, RooAbsReal& nll, const RooArgSet& observables);
RooProfileLL(const RooProfileLL& other, const char* name=0) ;
virtual TObject* clone(const char* newname) const { return new RooProfileLL(*this,newname); }
virtual ~RooProfileLL() ;
void setAlwaysStartFromMin(Bool_t flag) { _startFromMin = flag ; }
Bool_t alwaysStartFromMin() const { return _startFromMin ; }
RooMinuit* minuit() { return _minuit ; }
RooAbsReal& nll() { return const_cast<RooAbsReal&>(_nll.arg()) ; }
const RooArgSet& bestFitParams() const ;
const RooArgSet& bestFitObs() const ;
virtual RooAbsReal* createProfile(const RooArgSet& paramsOfInterest) ;
virtual Bool_t redirectServersHook(const RooAbsCollection& , Bool_t , Bool_t , Bool_t ) ;
void clearAbsMin() { _absMinValid = kFALSE ; }
protected:
void validateAbsMin() const ;
RooRealProxy _nll ;
RooSetProxy _obs ;
RooSetProxy _par ;
Bool_t _startFromMin ;
TIterator* _piter ;
TIterator* _oiter ;
mutable RooMinuit* _minuit ;
mutable Bool_t _absMinValid ;
mutable Double_t _absMin ;
mutable RooArgSet _paramAbsMin ;
mutable RooArgSet _obsAbsMin ;
mutable std::map<std::string,bool> _paramFixed ;
Double_t evaluate() const ;
private:
ClassDef(RooProfileLL,0)
};
#endif