ROOT  6.06/09
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 //
19 // BEGIN_HTML
20 // RooAbsMoment represents the first, second, or third order derivative
21 // of any RooAbsReal as calculated (numerically) by the MathCore Richardson
22 // derivator class.
23 // END_HTML
24 //
25 
26 
27 #include "RooFit.h"
28 
29 #include "Riostream.h"
30 #include "Riostream.h"
31 #include <math.h>
32 #include <string>
33 
34 #include "RooAbsMoment.h"
35 #include "RooAbsReal.h"
36 #include "RooAbsPdf.h"
37 #include "RooErrorHandler.h"
38 #include "RooArgSet.h"
39 #include "RooMsgService.h"
40 #include "RooRealVar.h"
41 #include "RooFunctor.h"
42 #include "RooFormulaVar.h"
43 #include "RooGlobalFunc.h"
44 #include "RooConstVar.h"
45 #include "RooRealIntegral.h"
46 #include <string>
47 using namespace std ;
48 
49 
51 ;
52 
53 
54 ////////////////////////////////////////////////////////////////////////////////
55 /// Default constructor
56 
57 RooAbsMoment::RooAbsMoment() : _order(1), _takeRoot(kFALSE)
58 {
59 }
60 
61 
62 
63 ////////////////////////////////////////////////////////////////////////////////
64 
65 RooAbsMoment::RooAbsMoment(const char* name, const char* title, RooAbsReal& func, RooRealVar& x, Int_t orderIn, Bool_t takeRoot) :
66  RooAbsReal(name, title),
67  _order(orderIn),
68  _takeRoot(takeRoot),
69  _nset("nset","nset",this,kFALSE,kFALSE),
70  _func("function","function",this,func,kFALSE,kFALSE),
71  _x("x","x",this,x,kFALSE,kFALSE),
72  _mean("!mean","!mean",this,kFALSE,kFALSE)
73 {
74 }
75 
76 
77 ////////////////////////////////////////////////////////////////////////////////
78 
79 RooAbsMoment::RooAbsMoment(const RooAbsMoment& other, const char* name) :
80  RooAbsReal(other, name),
81  _order(other._order),
82  _takeRoot(other._takeRoot),
83  _nset("nset",this,other._nset),
84  _func("function",this,other._func),
85  _x("x",this,other._x),
86  _mean("!mean","!mean",this,kFALSE,kFALSE)
87 {
88 }
89 
90 
91 
92 ////////////////////////////////////////////////////////////////////////////////
93 /// Destructor
94 
96 {
97 }
98 
99 
100 
virtual ~RooAbsMoment()
Destructor.
int Int_t
Definition: RtypesCore.h:41
bool Bool_t
Definition: RtypesCore.h:59
const Bool_t kFALSE
Definition: Rtypes.h:92
STL namespace.
Double_t x[n]
Definition: legend1.C:17
RooAbsReal is the common abstract base class for objects that represent a real value and implements f...
Definition: RooAbsReal.h:53
double func(double *x, double *p)
Definition: stressTF1.cxx:213
#define name(a, b)
Definition: linkTestLib0.cpp:5
ClassImp(RooAbsMoment)
RooAbsMoment()
Default constructor.