54 _catList("catList","list of cats", this),
55 _effFuncList("effFuncList","list of eff funcs",this),
56 _ignoreNonVisible(ignoreNonVisible)
58 _catList.add(catList);
59 _effFuncList.add(effFuncList);
61 if (_catList.getSize() != effFuncList.getSize()) {
62 coutE(
InputArguments) <<
"RooMultiBinomial::ctor(" <<
GetName() <<
") ERROR: Wrong input, should have equal number of categories and efficiencies." << endl;
63 throw string(
"RooMultiBinomial::ctor() ERROR: Wrong input, should have equal number of categories and efficiencies") ;
73 _catList(
"catList",this,other._catList),
74 _effFuncList(
"effFuncList",this,other._effFuncList),
75 _ignoreNonVisible(other._ignoreNonVisible)
96 vector<Double_t> effFuncVal(effFuncListSize);
97 for (
int i=0; i<effFuncListSize; ++i) {
103 for (
int i=0; i<effFuncListSize; ++i) {
104 if (effFuncVal[i]>1) {
105 coutW(
Eval) <<
"WARNING: Efficiency >1 (equal to " << effFuncVal[i]
106 <<
" ), for i = " << i <<
"...TRUNCATED" << endl;
107 effFuncVal[i] = 1.0 ;
108 }
else if (effFuncVal[i]<0) {
109 effFuncVal[i] = 0.0 ;
110 coutW(
Eval) <<
"WARNING: Efficiency <0 (equal to " << effFuncVal[i]
111 <<
" ), for i = " << i <<
"...TRUNCATED" << endl;
115 vector<Double_t> effValue(effFuncListSize);
120 for (
int i=0; i<effFuncListSize; ++i) {
123 effValue[i] = effFuncVal[i] ;
127 effValue[i] = 1 - effFuncVal[i] ;
139 for (
int i=0; i<effFuncListSize; ++i) {
140 _effVal=_effVal*effValue[i];
RooListProxy _effFuncList
std::string GetName(const std::string &scope_name)
virtual ~RooMultiBinomial()
Destructor.
RooAbsReal is the common abstract base class for objects that represent a real value and implements f...
RooMultiBinomial is an efficiency function which makes all combinations of efficiencies given as inpu...
RooAbsCategory is the common abstract base class for objects that represent a discrete value with a f...
virtual Double_t evaluate() const
Calculate the raw value of the function which is the effFunc value if cat==1 and it is (1-effFunc) if...