// RooNovosibirsk implements the Novosibirsk function
// END_HTML
#include "RooFit.h"
#include <math.h>
#include "TMath.h"
#include "RooNovosibirsk.h"
#include "RooRealVar.h"
ClassImp(RooNovosibirsk)
RooNovosibirsk::RooNovosibirsk(const char *name, const char *title,
RooAbsReal& _x, RooAbsReal& _peak,
RooAbsReal& _width, RooAbsReal& _tail) :
RooAbsPdf(name, title),
x("x","x",this,_x),
width("width","width",this,_width),
peak("peak","peak",this,_peak),
tail("tail","tail",this,_tail)
{
}
RooNovosibirsk::RooNovosibirsk(const RooNovosibirsk& other, const char *name):
RooAbsPdf(other,name),
x("x",this,other.x),
width("width",this,other.width),
peak("peak",this,other.peak),
tail("tail",this,other.tail)
{
}
Double_t RooNovosibirsk::evaluate() const {
double qa=0,qb=0,qc=0,qx=0,qy=0;
if(TMath::Abs(tail) < 1.e-7)
qc = 0.5*TMath::Power(((x-peak)/width),2);
else {
qa = tail*sqrt(log(4.));
qb = sinh(qa)/qa;
qx = (x-peak)/width*qb;
qy = 1.+tail*qx;
if( qy > 1.E-7)
qc = 0.5*(TMath::Power((log(qy)/tail),2) + tail*tail);
else
qc = 15.0;
}
return exp(-qc);
}
Last change: Wed Jun 25 08:33:36 2008
Last generated: 2008-06-25 08:33
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.