Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
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
24class RooRealVar;
25class RooArgList ;
26
27class RooAbsMoment : public RooAbsReal {
28public:
29
30 RooAbsMoment() = default;
31 RooAbsMoment(const char *name, const char *title, RooAbsReal& func, RooRealVar& x, Int_t order=1, bool takeRoot=false) ;
32 RooAbsMoment(const RooAbsMoment& other, const char* name = nullptr);
33
34 Int_t order() const { return _order ; }
35 bool central() const { return _mean.absArg() ? true : false ; }
36 RooAbsReal* mean() { return (RooAbsReal*) _mean.absArg() ; }
37
38
39protected:
40
41 Int_t _order = 1; ///< Moment order
42 Int_t _takeRoot = false; ///< Return n-order root of moment
43 RooSetProxy _nset ; ///< Normalization set (optional)
44 RooRealProxy _func ; ///< Input function
45 RooRealProxy _x ; ///< Observable
46 RooRealProxy _mean ; ///< Mean (if calculated for central moment)
47
48 ClassDefOverride(RooAbsMoment,1) // Abstract representation of moment in a RooAbsReal in a given RooRealVar
49};
50
51#endif
#define ClassDefOverride(name, id)
Definition Rtypes.h:341
char name[80]
Definition TGX11.cxx:110
RooRealProxy _mean
Mean (if calculated for central moment)
RooRealProxy _x
Observable.
RooAbsReal * mean()
Int_t _order
Moment order.
RooAbsMoment()=default
bool central() const
Int_t order() const
Int_t _takeRoot
Return n-order root of moment.
RooRealProxy _func
Input function.
RooSetProxy _nset
Normalization set (optional)
Abstract base class for objects that represent a real value and implements functionality common to al...
Definition RooAbsReal.h:59
RooArgList is a container object that can hold multiple RooAbsArg objects.
Definition RooArgList.h:22
RooAbsArg * absArg() const
Return pointer to contained argument.
Definition RooArgProxy.h:46
Variable that can be changed from the outside.
Definition RooRealVar.h:37
Double_t x[n]
Definition legend1.C:17