46 double argNominal, std::vector<double>
const& lowVec, std::vector<double>
const& highVec) :
56 double argNominal, std::vector<double>
const& lowVec, std::vector<double>
const& highVec,
57 std::vector<int>
const& codes) :
59 _paramList(
"paramList",
"List of paramficients",this),
60 _nominal(argNominal), _low(lowVec), _high(highVec)
62 for (
auto param : paramList) {
64 coutE(InputArguments) <<
"FlexibleInterpVar::ctor(" <<
GetName() <<
") ERROR: paramficient " << param->
GetName()
65 <<
" is not of type RooAbsReal" << std::endl ;
73 for (std::size_t i = 0; i < codes.size(); ++i) {
78 coutE(InputArguments) <<
"FlexibleInterpVar::ctor(" <<
GetName() <<
") invalid input std::vectors " << std::endl;
92 _paramList(
"paramList",
"List of coefficients",this)
101 _paramList(
"paramList",this,other._paramList),
102 _nominal(other._nominal), _low(other._low), _high(other._high), _interpCode(other._interpCode), _interpBoundary(other._interpBoundary)
121 coutE(InputArguments) <<
"FlexibleInterpVar::setInterpCode ERROR: " << param.
GetName() <<
" is not in list"
130 for (std::size_t i = 0; i <
_interpCode.size(); ++i) {
138 if (code < 0 || code > 5) {
139 coutE(InputArguments) <<
"FlexibleInterpVar::setInterpCode ERROR: " << param.
GetName()
140 <<
" with unknown interpolation code " << code <<
", keeping current code "
148 coutE(InputArguments) <<
"FlexibleInterpVar::setInterpCode ERROR: " << param.
GetName()
149 <<
" with unknown interpolation code " << code <<
", defaulting to code 2" << std::endl;
159 coutW(InputArguments) <<
"FlexibleInterpVar::setNominal : nominal is now " << newNominal << std::endl ;
170 coutE(InputArguments) <<
"FlexibleInterpVar::setLow ERROR: " << param.
GetName()
171 <<
" is not in list" << std::endl ;
173 coutW(InputArguments) <<
"FlexibleInterpVar::setLow : " << param.
GetName()
174 <<
" is now " << newLow << std::endl ;
186 coutE(InputArguments) <<
"FlexibleInterpVar::setHigh ERROR: " << param.
GetName()
187 <<
" is not in list" << std::endl ;
189 coutW(InputArguments) <<
"FlexibleInterpVar::setHigh : " << param.
GetName()
190 <<
" is now " << newHigh << std::endl ;
259 os <<
indent <<
"--- FlexibleInterpVar ---" << std::endl;
265 for (
int i=0;i<(
int)
_low.size();i++) {
267 os << std::setw(36) << param.
GetName()<<
": "<<std::setw(7) <<
_low[i]<<
" "<<std::setw(7) <<
_high[i]
size_t size(const MatrixT &matrix)
retrieve the size of a square matrix
static void indent(ostringstream &buf, int indent_level)
#define R__ASSERT(e)
Checks condition e and reports a fatal error if it's false.
static unsigned int total
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t index
Common abstract base class for objects that represent a value and a "shape" in RooFit.
void setValueDirty()
Mark the element dirty. This forces a re-evaluation when a value is requested.
Int_t index(const RooAbsArg *arg) const
Returns index of given arg, or -1 if arg is not in the collection.
Storage_t::size_type size() const
Abstract base class for objects that represent a real value and implements functionality common to al...
double getVal(const RooArgSet *normalisationSet=nullptr) const
Evaluate object.
void printMultiline(std::ostream &os, Int_t contents, bool verbose=false, TString indent="") const override
Structure printing.
RooArgList is a container object that can hold multiple RooAbsArg objects.
RooAbsArg * at(Int_t idx) const
Return object at given index, or nullptr if index is out of range.
bool add(const RooAbsArg &var, bool valueServer, bool shapeServer, bool silent)
Overloaded RooCollection_t::add() method insert object into set and registers object as server to own...
std::span< const double > at(RooAbsArg const *arg, RooAbsArg const *caller=nullptr)
std::span< double > output()
std::vector< int > _interpCode
void doEval(RooFit::EvalContext &) const override
Base function for computing multiple values of a RooAbsReal.
std::vector< double > _high
void printMultiline(std::ostream &os, Int_t contents, bool verbose=false, TString indent="") const override
Interface for detailed printing of object.
void setInterpCode(RooAbsReal ¶m, int code)
void printAllInterpCodes()
void setLow(RooAbsReal ¶m, double newLow)
void setInterpCodeForParam(int iParam, int code)
void setHigh(RooAbsReal ¶m, double newHigh)
void setAllInterpCodes(int code)
std::vector< double > _low
double evaluate() const override
Calculate and return value of polynomial.
~FlexibleInterpVar() override
Destructor.
void setNominal(double newNominal)
virtual void printFlexibleInterpVars(std::ostream &os) const
FlexibleInterpVar()
Default constructor.
const char * GetName() const override
Returns name of object.
double flexibleInterpSingle(unsigned int code, double low, double high, double boundary, double nominal, double paramVal, double res)
Namespace for the RooStats classes.
static T Min()
Returns maximum representation for type T.