TDFun Class Reference

#include <TDFun.h>

List of all members.

Public Member Functions

 TDFun ()
 TDFun (const double &, const double &)
 ~TDFun ()
void Init ()
void Init (const double &, const double &)
double EvalSpline (const double &z)
double Eval (const double &z)
double Eval (const double &z, const double &b2, const double &D0)
double EvalSoft (const double &x)
double EvalSoft (const double &x, const double &b2, const double &D0)

Protected Attributes

double fxmin
double fxmax
double fD0
double fb2
TRadSpline3fd


Detailed Description

Definition at line 7 of file TDFun.h.


Constructor & Destructor Documentation

TDFun::TDFun (  ) 

Definition at line 15 of file TDFun.C.

References fd, TRadGlobal::Get_XMax(), TRadGlobal::Get_XMin(), gGlobal, and Init().

00015             {
00016   fd = NULL;
00017   Init(1-gGlobal->Get_XMax(),1-gGlobal->Get_XMin());
00018 }

TDFun::TDFun ( const double &  ,
const double &   
)

Definition at line 20 of file TDFun.C.

References fd, and Init().

00020                                                   {
00021   fd = NULL;
00022   Init(cmin,cmax);
00023 }

TDFun::~TDFun (  ) 

Definition at line 40 of file TDFun.C.

References fd.

00040              {
00041   if(fd) delete fd;
00042 }


Member Function Documentation

double TDFun::Eval ( const double &  z,
const double &  b2,
const double &  D0 
) [inline]

Definition at line 32 of file TDFun.h.

References x.

00032                                                                          {
00033     double x = 1 - z;
00034     //    double D = b2*pow(x,b2-1)*D0 - 0.5*b2*(1+z) - 
00035     //      b2*b2/8*(4*(1+z)*log(x)+(1+3*z*z)/x*log(z)+5+z);
00036     double D = b2*pow(x,b2-1)*D0 - 0.5*b2*(1+z) - 
00037       b2*b2/8*(4*(1+z)*log(x)+(1+3*z*z)/x*log1p(-x)+5+z);
00038     return D;
00039   }

double TDFun::Eval ( const double &  z  )  [inline]

Definition at line 23 of file TDFun.h.

References fb2, fD0, and x.

Referenced by TPiCrossPart::GetValue(), TMuCrossPart::GetValue(), TGGCrossPart::GetValue(), TEPCrossPart::GetValue(), and tdfun().

00023                                      {  
00024     double x = 1 - z;
00025     //    double D = fb2*pow(x,fb2-1)*fD0 - 0.5*fb2*(1+z) - 
00026     //      fb2*fb2/8*(4*(1+z)*log(x)+(1+3*z*z)/x*log(z)+5+z);
00027     double D = fb2*pow(x,fb2-1)*fD0 - 0.5*fb2*(1+z) - 
00028       fb2*fb2/8*(4*(1+z)*log(x)+(1+3*z*z)/x*log1p(-x)+5+z);
00029     return D;
00030   }

double TDFun::EvalSoft ( const double &  x,
const double &  b2,
const double &  D0 
) [inline]

Definition at line 53 of file TDFun.h.

References exp().

00053                                                                              {
00054     double z  = 1 - x;
00055     double lx = log(x);
00056     double t1 = exp(-b2*lx);
00057     double t2 = t1*x;
00058     //    double D  = D0 - t2*(0.5*(1+z) + b2/8*( 4*(1+z)*lx + 4 + (1+z))) - 
00059     //      b2/8*t1*(1+3*z*z)*log(z);
00060     double D  = D0 - t2*(0.5*(1+z) + b2/8*( 4*(1+z)*lx + 4 + (1+z))) - 
00061       b2/8*t1*(1+3*z*z)*log1p(-x);
00062     return D;
00063   }

double TDFun::EvalSoft ( const double &  x  )  [inline]

Definition at line 41 of file TDFun.h.

References exp(), fb2, and fD0.

Referenced by TPiCrossPart::GetValue(), TMuCrossPart::GetValue(), TGGCrossPart::GetValue(), and TEPCrossPart::GetValue().

00041                                          {
00042     double z  = 1 - x;
00043     double lx = log(x);
00044     double t1 = exp(-fb2*lx);
00045     double t2 = t1*x;
00046     //    double D  = fD0 - t2*(0.5*(1+z) + fb2/8*( 4*(1+z)*lx + 4 + (1+z))) - 
00047     //      fb2/8*t1*(1+3*z*z)*log(z);
00048     double D  = fD0 - t2*(0.5*(1+z) + fb2/8*( 4*(1+z)*lx + 4 + (1+z))) - 
00049       fb2/8*t1*(1+3*z*z)*log1p(-x);
00050     return D;
00051   }

double TDFun::EvalSpline ( const double &  z  )  [inline]

Definition at line 21 of file TDFun.h.

References TRadSpline3::Eval(), and fd.

00021 {return fd->Eval(z);}

void TDFun::Init ( const double &  ,
const double &   
)

Definition at line 29 of file TDFun.C.

References djr, fb2, fd, fD0, fxmax, fxmin, TRadGlobal::Get_Beta(), TRadGlobal::Get_D0(), gGlobal, and tdfun().

00029                                                       {
00030   fxmin = cmin;
00031   fxmax = cmax;
00032   fb2   = 0.5*gGlobal->Get_Beta();
00033   fD0   = gGlobal->Get_D0();
00034   djr   = this;
00035   //  TF1 fdfun("dfun",tdfun,fxmin,fxmax,0);
00036   if(fd) delete fd;
00037   fd    = new TRadSpline3("d", fxmin, fxmax, tdfun, 10001);
00038 }

void TDFun::Init (  ) 

Definition at line 25 of file TDFun.C.

References TRadGlobal::Get_XMax(), TRadGlobal::Get_XMin(), and gGlobal.

Referenced by TPiCrossPart::Init(), TMuCrossPart::Init(), TGGCrossPart::Init(), TEPCrossPart::Init(), and TDFun().

00025                 {
00026   Init(1-gGlobal->Get_XMax(),1-gGlobal->Get_XMin());
00027 }


Member Data Documentation

double TDFun::fb2 [protected]

Definition at line 12 of file TDFun.h.

Referenced by Eval(), EvalSoft(), and Init().

TRadSpline3* TDFun::fd [protected]

Definition at line 13 of file TDFun.h.

Referenced by EvalSpline(), Init(), TDFun(), and ~TDFun().

double TDFun::fD0 [protected]

Definition at line 11 of file TDFun.h.

Referenced by Eval(), EvalSoft(), and Init().

double TDFun::fxmax [protected]

Definition at line 10 of file TDFun.h.

Referenced by Init().

double TDFun::fxmin [protected]

Definition at line 9 of file TDFun.h.

Referenced by Init().


Generated on Tue Nov 29 23:35:58 2016 for BOSS_7.0.2 by  doxygen 1.4.7