ROOT
6.06/09
Reference Guide
ROOT Home Page
Main Page
Related Pages
User's Classes
Namespaces
All Classes
Files
Release Notes
File List
File Members
roofit
roofitcore
inc
RooAbsMoment.h
Go to the documentation of this file.
1
/*****************************************************************************
2
* Project: RooFit *
3
* Package: RooFitCore *
4
* File: $Id$
5
* Authors: *
6
* WV, Wouter Verkerke, UC Santa Barbara, verkerke@slac.stanford.edu *
7
* DK, David Kirkby, UC Irvine, dkirkby@uci.edu *
8
* *
9
* Copyright (c) 2000-2005, Regents of the University of California *
10
* and Stanford University. All rights reserved. *
11
* *
12
* Redistribution and use in source and binary forms, *
13
* with or without modification, are permitted according to the terms *
14
* listed in LICENSE (http://roofit.sourceforge.net/license.txt) *
15
*****************************************************************************/
16
#ifndef ROO_ABS_MOMENT
17
#define ROO_ABS_MOMENT
18
19
#include "
RooAbsReal.h
"
20
#include "
RooRealProxy.h
"
21
#include "
RooSetProxy.h
"
22
23
24
class
RooRealVar
;
25
class
RooArgList
;
26
27
class
RooAbsMoment
:
public
RooAbsReal
{
28
public
:
29
30
RooAbsMoment
() ;
31
RooAbsMoment
(
const
char
*
name
,
const
char
*title,
RooAbsReal
&
func
,
RooRealVar
&
x
,
Int_t
order
=1,
Bool_t
takeRoot=
kFALSE
) ;
32
RooAbsMoment
(
const
RooAbsMoment
& other,
const
char
* name = 0);
33
virtual
~RooAbsMoment
() ;
34
35
Int_t
order
()
const
{
return
_order
; }
36
Bool_t
central
()
const
{
return
_mean
.
absArg
() ?
kTRUE
:
kFALSE
; }
37
RooAbsReal
*
mean
() {
return
(
RooAbsReal
*)
_mean
.
absArg
() ; }
38
39
40
protected
:
41
42
Int_t
_order
;
// Moment order
43
Int_t
_takeRoot
;
// Return n-order root of moment
44
RooSetProxy
_nset
;
// Normalization set (optional)
45
RooRealProxy
_func
;
// Input function
46
RooRealProxy
_x
;
// Observable
47
RooRealProxy
_mean
;
// Mean (if calculated for central moment)
48
49
ClassDef
(
RooAbsMoment
,1)
// Abstract representation of moment in a RooAbsReal in a given RooRealVar
50
};
51
52
#endif
RooAbsMoment::mean
RooAbsReal * mean()
Definition:
RooAbsMoment.h:37
RooAbsMoment::~RooAbsMoment
virtual ~RooAbsMoment()
Destructor.
Definition:
RooAbsMoment.cxx:95
RooSetProxy.h
RooAbsMoment::_takeRoot
Int_t _takeRoot
Definition:
RooAbsMoment.h:43
Int_t
int Int_t
Definition:
RtypesCore.h:41
Bool_t
bool Bool_t
Definition:
RtypesCore.h:59
kFALSE
const Bool_t kFALSE
Definition:
Rtypes.h:92
RooAbsMoment
Definition:
RooAbsMoment.h:27
x
Double_t x[n]
Definition:
legend1.C:17
ClassDef
#define ClassDef(name, id)
Definition:
Rtypes.h:254
RooAbsMoment::_x
RooRealProxy _x
Definition:
RooAbsMoment.h:46
RooRealVar
Definition:
RooRealVar.h:37
RooArgProxy::absArg
RooAbsArg * absArg() const
Definition:
RooArgProxy.h:37
RooAbsMoment::_mean
RooRealProxy _mean
Definition:
RooAbsMoment.h:47
RooAbsMoment::order
Int_t order() const
Definition:
RooAbsMoment.h:35
RooAbsMoment::_order
Int_t _order
Definition:
RooAbsMoment.h:42
RooAbsMoment::_nset
RooSetProxy _nset
Definition:
RooAbsMoment.h:44
RooRealProxy.h
RooAbsReal.h
RooAbsReal
RooAbsReal is the common abstract base class for objects that represent a real value and implements f...
Definition:
RooAbsReal.h:53
func
double func(double *x, double *p)
Definition:
stressTF1.cxx:213
name
#define name(a, b)
Definition:
linkTestLib0.cpp:5
RooAbsMoment::central
Bool_t central() const
Definition:
RooAbsMoment.h:36
RooSetProxy
Definition:
RooSetProxy.h:25
RooRealProxy
Definition:
RooRealProxy.h:23
RooArgList
Definition:
RooArgList.h:21
kTRUE
const Bool_t kTRUE
Definition:
Rtypes.h:91
RooAbsMoment::_func
RooRealProxy _func
Definition:
RooAbsMoment.h:45
RooAbsMoment::RooAbsMoment
RooAbsMoment()
Default constructor.
Definition:
RooAbsMoment.cxx:57