#include "RooFit.h"
#include "RooEffProd.h"
#include "RooEffGenContext.h"
ClassImp(RooEffProd)
  ;
RooEffProd::RooEffProd(const char *name, const char *title, 
                             RooAbsPdf& pdf, RooAbsReal& eff) :
  RooAbsPdf(name,title),
  _pdf("pdf","pre-efficiency pdf", this,pdf),
  _eff("eff","efficiency function",this,eff)
{  
}
RooEffProd::RooEffProd(const RooEffProd& other, const char* name) : 
  RooAbsPdf(other, name),
  _pdf("pdf",this,other._pdf),
  _eff("acc",this,other._eff)
{
}
RooEffProd::~RooEffProd() 
{
}
Double_t RooEffProd::evaluate() const
{
    return eff()->getVal() * pdf()->getVal();
}
RooAbsGenContext* RooEffProd::genContext(const RooArgSet &vars, const RooDataSet *prototype,
                                            const RooArgSet* auxProto, Bool_t verbose) const
{
  assert(pdf()!=0);
  assert(eff()!=0);
  return new RooEffGenContext(*this,*pdf(),*eff(),vars,prototype,auxProto,verbose) ;
}
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.