/***************************************************************************** * Project: RooFit * * * * This code was autogenerated by RooClassFactory * *****************************************************************************/ // Your description goes here... #include "Riostream.h" #include "RooAmpLandau_mpv.h" #include "RooAbsReal.h" #include "RooAbsCategory.h" #include #include "TMath.h" ClassImp(RooAmpLandau_mpv); RooAmpLandau_mpv::RooAmpLandau_mpv(const char *name, const char *title, RooAbsReal& _x, RooAbsReal& _y, RooAbsReal& _mx, RooAbsReal& _my, RooAbsReal& _sig, RooAbsReal& _amp, RooAbsReal& _noise) : RooAbsReal(name,title), x("x","x",this,_x), y("y","y",this,_y), mx("mx","mx",this,_mx), my("my","my",this,_my), sig("sig","sig",this,_sig), amp("amp","amp",this,_amp), noise("noise","noise",this,_noise) { ; } RooAmpLandau_mpv::RooAmpLandau_mpv(const RooAmpLandau_mpv& other, const char* name) : RooAbsReal(other,name), x("x",this,other.x), y("y",this,other.y), mx("mx",this,other.mx), my("my",this,other.my), sig("sig",this,other.sig), amp("amp",this,other.amp), noise("noise",this,other.noise) { } Double_t RooAmpLandau_mpv::evaluate() const { double dist=(x-mx)*(x-mx)+(y-my)*(y-my); double expo=-0.5*dist/(sig*sig); double retval=amp*exp(expo)+noise; if (retval<=0) retval=1e-10; return retval; }