38using std::endl, std::vector, std::string;
49 bool ignoreNonVisible) :
51 _catList(
"catList",
"list of cats", this),
52 _effFuncList(
"effFuncList",
"list of eff funcs",this),
53 _ignoreNonVisible(ignoreNonVisible)
59 coutE(InputArguments) <<
"RooMultiBinomial::ctor(" <<
GetName() <<
") ERROR: Wrong input, should have equal number of categories and efficiencies." << std::endl;
60 throw string(
"RooMultiBinomial::ctor() ERROR: Wrong input, should have equal number of categories and efficiencies") ;
70 _catList(
"catList",this,other._catList),
71 _effFuncList(
"effFuncList",this,other._effFuncList),
72 _ignoreNonVisible(other._ignoreNonVisible)
86 vector<double> effFuncVal(effFuncListSize);
87 for (
int i=0; i<effFuncListSize; ++i) {
93 for (
int i=0; i<effFuncListSize; ++i) {
94 if (effFuncVal[i]>1) {
95 coutW(Eval) <<
"WARNING: Efficiency >1 (equal to " << effFuncVal[i]
96 <<
" ), for i = " << i <<
"...TRUNCATED" << std::endl;
98 }
else if (effFuncVal[i]<0) {
100 coutW(Eval) <<
"WARNING: Efficiency <0 (equal to " << effFuncVal[i]
101 <<
" ), for i = " << i <<
"...TRUNCATED" << std::endl;
105 vector<double> effValue(effFuncListSize);
106 bool notVisible =
true;
110 for (
int i=0; i<effFuncListSize; ++i) {
113 effValue[i] = effFuncVal[i] ;
117 effValue[i] = 1 - effFuncVal[i] ;
119 coutW(Eval) <<
"WARNING: WRONG CATEGORY NAMES GIVEN!, label = " << (
static_cast<RooAbsCategory&
>(
_catList[i])).getCurrentIndex() << std::endl;
129 for (
double ev : effValue) {
A space to attach TBranches.
Storage_t::size_type size() const
Abstract base class for objects that represent a real value and implements functionality common to al...
RooArgList is a container object that can hold multiple RooAbsArg objects.
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...
RooMultiBinomial is an efficiency function which makes all combinations of efficiencies given as inpu...
RooListProxy _effFuncList
double evaluate() const override
Calculate the raw value of the function which is the effFunc value if cat==1 and it is (1-effFunc) if...
const char * GetName() const override
Returns name of object.