ROOT
6.12/07
Reference Guide
roofit
roostats
src
Heaviside.cxx
Go to the documentation of this file.
1
// @(#)root/roostats:$Id: MetropolisHastings.cxx 28978 2009-06-17 14:33:31Z kbelasco $
2
// Authors: Kevin Belasco 17/06/2009
3
// Authors: Kyle Cranmer 17/06/2009
4
/*************************************************************************
5
* Copyright (C) 1995-2008, Rene Brun and Fons Rademakers. *
6
* All rights reserved. *
7
* *
8
* For the licensing terms see $ROOTSYS/LICENSE. *
9
* For the list of contributors see $ROOTSYS/README/CREDITS. *
10
* *
11
* This code was autogenerated by RooClassFactory *
12
*************************************************************************/
13
14
#include "
RooStats/Heaviside.h
"
15
#include "
RooAbsReal.h
"
16
17
using namespace
std
;
18
19
/** \class RooStats::Heaviside
20
\ingroup Roostats
21
22
Represents the Heaviside function.
23
Evaluates to 1.0 when ((Double_t)x) >= ((Double_t)c), 0.0 otherwise.
24
25
*/
26
27
ClassImp
(
RooStats::Heaviside
);
28
29
using namespace
RooFit
;
30
using namespace
RooStats
;
31
32
////////////////////////////////////////////////////////////////////////////////
33
34
Heaviside::Heaviside(
const
char
*
name
,
const
char
*title,
35
RooAbsReal
& _x,
36
RooAbsReal
& _c) :
37
RooAbsReal
(name,title),
38
x
(
"x"
,
"x"
,this,_x),
39
c(
"c"
,
"c"
,this,_c)
40
{
41
}
42
43
////////////////////////////////////////////////////////////////////////////////
44
45
Heaviside::Heaviside
(
const
Heaviside
& other,
const
char
*
name
) :
46
RooAbsReal
(other,name),
47
x
(
"x"
,this,other.
x
),
48
c
(
"c"
,this,other.
c
)
49
{
50
}
51
52
////////////////////////////////////////////////////////////////////////////////
53
54
Double_t
Heaviside::evaluate
()
const
55
{
56
// ENTER EXPRESSION IN TERMS OF VARIABLE ARGUMENTS HERE
57
if
(((
Double_t
)
x
) >= ((
Double_t
)
c
))
58
return
1.0;
59
else
60
return
0.0;
61
}
RooStats::Heaviside::evaluate
Double_t evaluate() const
Definition:
Heaviside.cxx:54
RooStats::Heaviside::c
RooRealProxy c
Definition:
Heaviside.h:31
RooStats::Heaviside::Heaviside
Heaviside()
Definition:
Heaviside.h:20
std
STL namespace.
x
Double_t x[n]
Definition:
legend1.C:17
RooFit
Definition:
RooCFunction1Binding.h:29
RooStats::Heaviside
Represents the Heaviside function.
Definition:
Heaviside.h:18
Heaviside.h
RooStats
Namespace for the RooStats classes.
Definition:
Asimov.h:20
RooAbsReal.h
ClassImp
#define ClassImp(name)
Definition:
Rtypes.h:359
Double_t
double Double_t
Definition:
RtypesCore.h:55
RooAbsReal
RooAbsReal is the common abstract base class for objects that represent a real value and implements f...
Definition:
RooAbsReal.h:53
RooStats::Heaviside::x
RooRealProxy x
Definition:
Heaviside.h:30
name
char name[80]
Definition:
TGX11.cxx:109