57 _catList(
"catList",
"list of cats", this),
58 _effFuncList(
"effFuncList",
"list of eff funcs",this),
59 _ignoreNonVisible(ignoreNonVisible)
65 coutE(
InputArguments) <<
"RooMultiBinomial::ctor(" <<
GetName() <<
") ERROR: Wrong input, should have equal number of categories and efficiencies." << endl;
66 throw string(
"RooMultiBinomial::ctor() ERROR: Wrong input, should have equal number of categories and efficiencies") ;
78 _catList(
"catList",this,other._catList),
79 _effFuncList(
"effFuncList",this,other._effFuncList),
80 _ignoreNonVisible(other._ignoreNonVisible)
105 vector<Double_t> effFuncVal(effFuncListSize);
106 for (
int i=0; i<effFuncListSize; ++i) {
112 for (
int i=0; i<effFuncListSize; ++i) {
113 if (effFuncVal[i]>1) {
114 coutW(
Eval) <<
"WARNING: Efficency >1 (equal to " << effFuncVal[i]
115 <<
" ), for i = " << i <<
"...TRUNCATED" << endl;
116 effFuncVal[i] = 1.0 ;
117 }
else if (effFuncVal[i]<0) {
118 effFuncVal[i] = 0.0 ;
119 coutW(
Eval) <<
"WARNING: Efficency <0 (equal to " << effFuncVal[i]
120 <<
" ), for i = " << i <<
"...TRUNCATED" << endl;
124 vector<Double_t> effValue(effFuncListSize);
129 for (
int i=0; i<effFuncListSize; ++i) {
132 effValue[i] = effFuncVal[i] ;
136 effValue[i] = 1 - effFuncVal[i] ;
148 for (
int i=0; i<effFuncListSize; ++i) {
149 _effVal=_effVal*effValue[i];
RooListProxy _effFuncList
virtual ~RooMultiBinomial()
Destructor.
virtual Bool_t add(const RooAbsArg &var, Bool_t silent=kFALSE)
Reimplementation of standard RooArgList::add()
virtual const char * GetName() const
Returns name of object.
RooAbsReal is the common abstract base class for objects that represent a real value and implements f...
ClassImp(RooMultiBinomial)
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...