11 #ifndef ROOSTATS_FLEXIBLEINTERPVAR
12 #define ROOSTATS_FLEXIBLEINTERPVAR
23 namespace HistFactory{
25 class FlexibleInterpVar :
public RooAbsReal {
29 FlexibleInterpVar(
const char *name,
const char *title,
30 const RooArgList& _paramList,
31 Double_t nominal,
const RooArgList& low,
const RooArgList& high);
33 FlexibleInterpVar(
const char *name,
const char *title,
34 const RooArgList& _paramList,
35 double nominal, std::vector<double> low, std::vector<double> high);
37 FlexibleInterpVar(
const char *name,
const char *title,
38 const RooArgList& _paramList,
double nominal, std::vector<double> low,
39 std::vector<double> high,std::vector<int> code);
41 FlexibleInterpVar(
const char *name,
const char *title);
42 FlexibleInterpVar(
const FlexibleInterpVar&,
const char*);
44 void setInterpCode(RooAbsReal& param,
int code);
45 void setAllInterpCodes(
int code);
46 void setGlobalBoundary(
double boundary) {_interpBoundary = boundary;}
47 void setNominal(Double_t newNominal);
48 void setLow(RooAbsReal& param, Double_t newLow);
49 void setHigh(RooAbsReal& param, Double_t newHigh);
51 void printAllInterpCodes();
53 virtual TObject* clone(
const char* newname)
const {
return new FlexibleInterpVar(*
this, newname); }
54 virtual ~FlexibleInterpVar() ;
56 virtual void printMultiline(std::ostream& os, Int_t contents, Bool_t verbose = kFALSE, TString indent =
"")
const;
57 virtual void printFlexibleInterpVars(std::ostream& os)
const;
61 double PolyInterpValue(
int i,
double x)
const;
65 RooListProxy _paramList ;
67 std::vector<double> _low;
68 std::vector<double> _high;
69 std::vector<int> _interpCode;
70 Double_t _interpBoundary;
72 TIterator* _paramIter ;
74 mutable Bool_t _logInit ;
75 mutable std::vector< double> _polCoeff;
77 Double_t evaluate()
const;
79 ClassDef(RooStats::HistFactory::FlexibleInterpVar,2)