45 double argNominal, std::vector<double>
const& lowVec, std::vector<double>
const& highVec) :
55 double argNominal, std::vector<double>
const& lowVec, std::vector<double>
const& highVec,
56 std::vector<int>
const& codes) :
58 _paramList(
"paramList",
"List of paramficients",this),
61 for (
auto param : paramList) {
63 coutE(InputArguments) <<
"FlexibleInterpVar::ctor(" <<
GetName() <<
") ERROR: paramficient " << param->GetName()
64 <<
" is not of type RooAbsReal" << std::endl ;
72 for (std::size_t i = 0; i < codes.size(); ++i) {
77 coutE(InputArguments) <<
"FlexibleInterpVar::ctor(" << GetName() <<
") invalid input std::vectors " << std::endl;
78 R__ASSERT(_low.size() == _paramList.size());
79 R__ASSERT(_low.size() == _high.size());
80 R__ASSERT(_low.size() == _interpCode.size());
91 _paramList(
"paramList",
"List of coefficients",this)
120 coutE(InputArguments) <<
"FlexibleInterpVar::setInterpCode ERROR: " << param.
GetName() <<
" is not in list"
129 for (std::size_t i = 0; i <
_interpCode.size(); ++i) {
137 if (code < 0 || code > 5) {
138 coutE(InputArguments) <<
"FlexibleInterpVar::setInterpCode ERROR: " << param.
GetName()
139 <<
" with unknown interpolation code " << code <<
", keeping current code "
147 coutE(InputArguments) <<
"FlexibleInterpVar::setInterpCode ERROR: " << param.
GetName()
148 <<
" with unknown interpolation code " << code <<
", defaulting to code 2" << std::endl;
158 coutW(InputArguments) <<
"FlexibleInterpVar::setNominal : nominal is now " << newNominal << std::endl ;
169 coutE(InputArguments) <<
"FlexibleInterpVar::setLow ERROR: " << param.
GetName()
170 <<
" is not in list" << std::endl ;
172 coutW(InputArguments) <<
"FlexibleInterpVar::setLow : " << param.
GetName()
173 <<
" is now " << newLow << std::endl ;
174 _low.at(index) = newLow;
185 coutE(InputArguments) <<
"FlexibleInterpVar::setHigh ERROR: " << param.
GetName()
186 <<
" is not in list" << std::endl ;
188 coutW(InputArguments) <<
"FlexibleInterpVar::setHigh : " << param.
GetName()
189 <<
" is now " << newHigh << std::endl ;
190 _high.at(index) = newHigh;
202 if(
_low.at(i) <= 0.001 )
coutE(InputArguments) <<
GetName() <<
", " <<
_paramList.at(i)->GetName() <<
": low value = " <<
_low.at(i) << std::endl;
215 for (std::size_t i = 0; i <
_paramList.size(); ++i) {
237 for (std::size_t i = 0; i <
_paramList.size(); ++i) {
258 os <<
indent <<
"--- FlexibleInterpVar ---" << std::endl;
264 for (
int i=0;i<(
int)
_low.size();i++) {
266 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
int Int_t
Signed integer 4 bytes (int).
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
void setValueDirty()
Mark the element dirty. This forces a re-evaluation when a value is requested.
RooAbsArg()
Default constructor.
double getVal(const RooArgSet *normalisationSet=nullptr) const
Evaluate object.
RooAbsReal()
coverity[UNINIT_CTOR] Default constructor
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.
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.