Heaviside.cxx

Go to the documentation of this file.
00001 // @(#)root/roostats:$Id: MetropolisHastings.cxx 28978 2009-06-17 14:33:31Z kbelasco $
00002 // Authors: Kevin Belasco        17/06/2009
00003 // Authors: Kyle Cranmer         17/06/2009
00004 /*************************************************************************
00005  * Copyright (C) 1995-2008, Rene Brun and Fons Rademakers.               *
00006  * All rights reserved.                                                  *
00007  *                                                                       *
00008  * For the licensing terms see $ROOTSYS/LICENSE.                         *
00009  * For the list of contributors see $ROOTSYS/README/CREDITS.             *
00010  *                                                                       *
00011  * This code was autogenerated by RooClassFactory                        * 
00012  *************************************************************************/
00013 //_________________________________________________
00014 /*
00015 BEGIN_HTML
00016 Represents the Heaviside function.
00017 Evaluates to 1.0 when ((Double_t)x) >= ((Double_t)c), 0.0 otherwise.
00018 END_HTML
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   // ENTER EXPRESSION IN TERMS OF VARIABLE ARGUMENTS HERE 
00053   if (((Double_t)x) >= ((Double_t)c))
00054      return 1.0;
00055   else
00056      return 0.0;
00057 }

Generated on Tue Jul 5 15:14:33 2011 for ROOT_528-00b_version by  doxygen 1.5.1