50 bool ignoreNonVisible) :
52 _catList(
"catList",
"list of cats", this),
53 _effFuncList(
"effFuncList",
"list of eff funcs",this),
54 _ignoreNonVisible(ignoreNonVisible)
60 coutE(InputArguments) <<
"RooMultiBinomial::ctor(" <<
GetName() <<
") ERROR: Wrong input, should have equal number of categories and efficiencies." << endl;
61 throw string(
"RooMultiBinomial::ctor() ERROR: Wrong input, should have equal number of categories and efficiencies") ;
71 _catList(
"catList",this,other._catList),
72 _effFuncList(
"effFuncList",this,other._effFuncList),
73 _ignoreNonVisible(other._ignoreNonVisible)
94 vector<double> effFuncVal(effFuncListSize);
95 for (
int i=0; i<effFuncListSize; ++i) {
101 for (
int i=0; i<effFuncListSize; ++i) {
102 if (effFuncVal[i]>1) {
103 coutW(Eval) <<
"WARNING: Efficiency >1 (equal to " << effFuncVal[i]
104 <<
" ), for i = " << i <<
"...TRUNCATED" << endl;
105 effFuncVal[i] = 1.0 ;
106 }
else if (effFuncVal[i]<0) {
107 effFuncVal[i] = 0.0 ;
108 coutW(Eval) <<
"WARNING: Efficiency <0 (equal to " << effFuncVal[i]
109 <<
" ), for i = " << i <<
"...TRUNCATED" << endl;
113 vector<double> effValue(effFuncListSize);
114 bool notVisible =
true;
118 for (
int i=0; i<effFuncListSize; ++i) {
121 effValue[i] = effFuncVal[i] ;
125 effValue[i] = 1 - effFuncVal[i] ;
137 for (
int i=0; i<effFuncListSize; ++i) {
138 _effVal=_effVal*effValue[i];
A space to attach TBranches.
Int_t getSize() const
Return the number of elements in the collection.
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.
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
~RooMultiBinomial() override
Destructor.
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.