#include "RooFit.h"
#include "RooEfficiency.h"
#include "RooEfficiency.h"
#include "RooStreamParser.h"
#include "RooArgList.h"
ClassImp(RooEfficiency)
;
RooEfficiency::RooEfficiency(const char *name, const char *title, const RooAbsReal& effFunc, const RooAbsCategory& cat, const char* sigCatName) :
RooAbsPdf(name,title),
_cat("cat","Signal/Background category",this,(RooAbsCategory&)cat),
_effFunc("effFunc","Efficiency modeling function",this,(RooAbsReal&)effFunc),
_sigCatName(sigCatName)
{
}
RooEfficiency::RooEfficiency(const RooEfficiency& other, const char* name) :
RooAbsPdf(other, name),
_cat("cat",this,other._cat),
_effFunc("effFunc",this,other._effFunc),
_sigCatName(other._sigCatName)
{
}
RooEfficiency::~RooEfficiency()
{
}
Double_t RooEfficiency::evaluate() const
{
Double_t effFuncVal = _effFunc ;
if (_effFunc>1) {
effFuncVal = 1.0 ;
} else if (_effFunc<0) {
effFuncVal = 0.0 ;
}
if (_cat == _sigCatName) {
return effFuncVal ;
} else {
return 1 - effFuncVal ;
}
}
ROOT page - Class index - Class Hierarchy - Top of the page
This page has been automatically generated. If you have any comments or suggestions about the page layout send a mail to ROOT support, or contact the developers with any questions or problems regarding ROOT.