00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025 #include "RooFit.h"
00026
00027 #include <math.h>
00028 #include "TMath.h"
00029
00030 #include "RooNovosibirsk.h"
00031 #include "RooRealVar.h"
00032
00033 ClassImp(RooNovosibirsk)
00034
00035
00036
00037
00038 RooNovosibirsk::RooNovosibirsk(const char *name, const char *title,
00039 RooAbsReal& _x, RooAbsReal& _peak,
00040 RooAbsReal& _width, RooAbsReal& _tail) :
00041
00042
00043 RooAbsPdf(name, title),
00044 x("x","x",this,_x),
00045 width("width","width",this,_width),
00046 peak("peak","peak",this,_peak),
00047 tail("tail","tail",this,_tail)
00048 {
00049 }
00050
00051
00052
00053 RooNovosibirsk::RooNovosibirsk(const RooNovosibirsk& other, const char *name):
00054 RooAbsPdf(other,name),
00055 x("x",this,other.x),
00056 width("width",this,other.width),
00057 peak("peak",this,other.peak),
00058 tail("tail",this,other.tail)
00059 {
00060 }
00061
00062
00063
00064 Double_t RooNovosibirsk::evaluate() const {
00065
00066
00067
00068 double qa=0,qb=0,qc=0,qx=0,qy=0;
00069
00070 if(TMath::Abs(tail) < 1.e-7)
00071 qc = 0.5*TMath::Power(((x-peak)/width),2);
00072 else {
00073 qa = tail*sqrt(log(4.));
00074 qb = sinh(qa)/qa;
00075 qx = (x-peak)/width*qb;
00076 qy = 1.+tail*qx;
00077
00078
00079
00080 if( qy > 1.E-7)
00081 qc = 0.5*(TMath::Power((log(qy)/tail),2) + tail*tail);
00082 else
00083 qc = 15.0;
00084 }
00085
00086
00087
00088 return exp(-qc);
00089
00090 }