Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
RooMoment.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_MOMENT
17#define ROO_MOMENT
18
19#include "RooAbsMoment.h"
20#include "RooRealProxy.h"
21#include "RooSetProxy.h"
22
23
24class RooRealVar;
25
26class RooMoment : public RooAbsMoment {
27public:
28
29 RooMoment() = default;
30 RooMoment(const char *name, const char *title, RooAbsReal& func, RooRealVar& x, Int_t order=1, bool central=false, bool takeRoot=false) ;
31 RooMoment(const char *name, const char *title, RooAbsReal& func, RooRealVar& x, const RooArgSet& nset, Int_t order=1, bool central=false, bool takeRoot=false,
32 bool intNSet=false) ;
33
34 RooMoment(const RooMoment& other, const char *name = nullptr);
35 TObject* clone(const char* newname) const override { return new RooMoment(*this, newname); }
36
37 const RooAbsReal& xF() { return _xf.arg() ; }
38 const RooAbsReal& ixF() { return _ixf.arg() ; }
39 const RooAbsReal& iF() { return _if.arg() ; }
40
41protected:
42
43 RooRealProxy _xf ; ///< X*F
44 RooRealProxy _ixf ; ///< Int(X*F(X))dx ;
45 RooRealProxy _if ; ///< Int(F(x))dx ;
46 double evaluate() const override;
47
48 ClassDefOverride(RooMoment,1) // Representation of moment in a RooAbsReal in a given RooRealVar
49};
50
51#endif
#define ClassDefOverride(name, id)
Definition Rtypes.h:346
char name[80]
Definition TGX11.cxx:110
bool central() const
Int_t order() const
Abstract base class for objects that represent a real value and implements functionality common to al...
Definition RooAbsReal.h:59
RooArgSet is a container object that can hold multiple RooAbsArg objects.
Definition RooArgSet.h:24
const RooAbsReal & iF()
Definition RooMoment.h:39
RooRealProxy _xf
X*F.
Definition RooMoment.h:43
RooMoment()=default
double evaluate() const override
Calculate value.
const RooAbsReal & xF()
Definition RooMoment.h:37
RooRealProxy _if
Int(F(x))dx ;.
Definition RooMoment.h:45
TObject * clone(const char *newname) const override
Definition RooMoment.h:35
RooRealProxy _ixf
Int(X*F(X))dx ;.
Definition RooMoment.h:44
const RooAbsReal & ixF()
Definition RooMoment.h:38
Variable that can be changed from the outside.
Definition RooRealVar.h:37
Mother of all ROOT objects.
Definition TObject.h:41
Double_t x[n]
Definition legend1.C:17