54 _catList(
"catList",
"list of cats", this),
55 _effFuncList(
"effFuncList",
"list of eff funcs",this),
56 _ignoreNonVisible(ignoreNonVisible)
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];
RooAbsCategory is the common abstract base class for objects that represent a discrete value with a f...
RooAbsReal is the common abstract base class for objects that represent a real value and implements f...
RooArgList is a container object that can hold multiple RooAbsArg objects.
virtual Bool_t add(const RooAbsArg &var, Bool_t silent=kFALSE)
Reimplementation of standard RooArgList::add()
RooMultiBinomial is an efficiency function which makes all combinations of efficiencies given as inpu...
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...
virtual ~RooMultiBinomial()
Destructor.
RooListProxy _effFuncList
virtual const char * GetName() const
Returns name of object.