Logo ROOT  
Reference Guide
RooAbsMoment.cxx
Go to the documentation of this file.
1/*****************************************************************************
2 * Project: RooFit *
3 * Package: RooFitCore *
4 * @(#)root/roofitcore:$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
17/**
18\file RooAbsMoment.cxx
19\class RooAbsMoment
20\ingroup Roofitcore
21
22RooAbsMoment represents the first, second, or third order derivative
23of any RooAbsReal as calculated (numerically) by the MathCore Richardson
24derivator class.
25**/
26
27
28#include "RooFit.h"
29
30#include "Riostream.h"
31#include <math.h>
32
33#include "RooAbsMoment.h"
34#include "RooAbsReal.h"
35#include "RooAbsPdf.h"
36#include "RooErrorHandler.h"
37#include "RooArgSet.h"
38#include "RooMsgService.h"
39#include "RooRealVar.h"
40#include "RooFunctor.h"
41#include "RooFormulaVar.h"
42#include "RooGlobalFunc.h"
43#include "RooConstVar.h"
44#include "RooRealIntegral.h"
45#include <string>
46using namespace std ;
47
48
50;
51
52
53////////////////////////////////////////////////////////////////////////////////
54/// Default constructor
55
56RooAbsMoment::RooAbsMoment() : _order(1), _takeRoot(kFALSE)
57{
58}
59
60
61
62////////////////////////////////////////////////////////////////////////////////
63
64RooAbsMoment::RooAbsMoment(const char* name, const char* title, RooAbsReal& func, RooRealVar& x, Int_t orderIn, Bool_t takeRoot) :
65 RooAbsReal(name, title),
66 _order(orderIn),
67 _takeRoot(takeRoot),
68 _nset("nset","nset",this,kFALSE,kFALSE),
69 _func("function","function",this,func,kFALSE,kFALSE),
70 _x("x","x",this,x,kFALSE,kFALSE),
71 _mean("!mean","!mean",this,kFALSE,kFALSE)
72{
73}
74
75
76////////////////////////////////////////////////////////////////////////////////
77
78RooAbsMoment::RooAbsMoment(const RooAbsMoment& other, const char* name) :
79 RooAbsReal(other, name),
80 _order(other._order),
81 _takeRoot(other._takeRoot),
82 _nset("nset",this,other._nset),
83 _func("function",this,other._func),
84 _x("x",this,other._x),
85 _mean("!mean","!mean",this,kFALSE,kFALSE)
86{
87}
88
89
90
91////////////////////////////////////////////////////////////////////////////////
92/// Destructor
93
95{
96}
97
98
99
const Bool_t kFALSE
Definition: RtypesCore.h:90
#define ClassImp(name)
Definition: Rtypes.h:361
char name[80]
Definition: TGX11.cxx:109
RooAbsMoment represents the first, second, or third order derivative of any RooAbsReal as calculated ...
Definition: RooAbsMoment.h:27
virtual ~RooAbsMoment()
Destructor.
RooAbsMoment()
Default constructor.
RooAbsReal is the common abstract base class for objects that represent a real value and implements f...
Definition: RooAbsReal.h:60
RooRealVar represents a variable that can be changed from the outside.
Definition: RooRealVar.h:35
Double_t x[n]
Definition: legend1.C:17