00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #ifndef RooStats_Heaviside
00023 #include "RooStats/Heaviside.h"
00024 #endif
00025 #ifndef ROO_ABS_REAL
00026 #include "RooAbsReal.h"
00027 #endif
00028
00029 ClassImp(RooStats::Heaviside)
00030
00031 using namespace RooFit;
00032 using namespace RooStats;
00033
00034 Heaviside::Heaviside(const char *name, const char *title,
00035 RooAbsReal& _x,
00036 RooAbsReal& _c) :
00037 RooAbsReal(name,title),
00038 x("x","x",this,_x),
00039 c("c","c",this,_c)
00040 {
00041 }
00042
00043 Heaviside::Heaviside(const Heaviside& other, const char* name) :
00044 RooAbsReal(other,name),
00045 x("x",this,other.x),
00046 c("c",this,other.c)
00047 {
00048 }
00049
00050 Double_t Heaviside::evaluate() const
00051 {
00052
00053 if (((Double_t)x) >= ((Double_t)c))
00054 return 1.0;
00055 else
00056 return 0.0;
00057 }