/***************************************************************************** * Project: RooFit * * * * This code was autogenerated by RooClassFactory * *****************************************************************************/ // Your description goes here... #include "Riostream.h" #include "FwdFoldPdf.h" #include "RooRealVar.h" #include "RooAbsReal.h" #include "RooAbsCategory.h" #include #include "TMath.h" ClassImp(FwdFoldPdf) FwdFoldPdf::FwdFoldPdf(const char *name, const char *title, RooAbsReal& _x, RooArgList& _Ng) : RooAbsPdf(name,title), x("x","x",this,_x), Ng(_Ng) { } FwdFoldPdf::FwdFoldPdf(const FwdFoldPdf& other, const char* name) : RooAbsPdf(other,name), x("x",this,other.x), Ng(other.Ng) { } Double_t FwdFoldPdf::evaluate() const { // ENTER EXPRESSION IN TERMS OF VARIABLE ARGUMENTS HERE Int_t meas_bin_mo = matrix->GetYaxis()->FindBin(x); Double_t expected = 0; for(int ibx=0; ibxGetNbinsX(); ibx++){ Int_t globalbin = matrix->GetBin(ibx+1,meas_bin_mo+1); Double_t Ngi = ((RooRealVar*) Ng.at(ibx))->getValV(); expected += Ngi*matrix->GetBinContent(globalbin); } return expected ; }