Logo ROOT   6.08/07
Reference Guide
RooFirstMoment.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_FIRST_MOMENT
17 #define ROO_FIRST_MOMENT
18 
19 #include "RooAbsMoment.h"
20 #include "RooRealProxy.h"
21 #include "RooSetProxy.h"
22 
23 
24 class RooRealVar;
25 class RooArgList ;
26 
27 class RooFirstMoment : public RooAbsMoment {
28 public:
29 
30  RooFirstMoment() ;
31  RooFirstMoment(const char *name, const char *title, RooAbsReal& func, RooRealVar& x) ;
32  RooFirstMoment(const char *name, const char *title, RooAbsReal& func, RooRealVar& x, const RooArgSet& nset, Bool_t intNSet=kFALSE) ;
33  virtual ~RooFirstMoment() ;
34 
35  RooFirstMoment(const RooFirstMoment& other, const char* name = 0);
36  virtual TObject* clone(const char* newname) const { return new RooFirstMoment(*this, newname); }
37 
38  const RooAbsReal& xF() { return _xf.arg() ; }
39  const RooAbsReal& ixF() { return _ixf.arg() ; }
40  const RooAbsReal& iF() { return _if.arg() ; }
41 
42 protected:
43 
44  RooRealProxy _xf ; // X*F
45  RooRealProxy _ixf ; // Int(X*F(X))dx ;
46  RooRealProxy _if ; // Int(F(x))dx ;
47  Double_t evaluate() const;
48 
49  ClassDef(RooFirstMoment,1) // Representation of moment in a RooAbsReal in a given RooRealVar
50 };
51 
52 #endif
RooFirstMoment represents the first, second, or third order derivative of any RooAbsReal as calculate...
bool Bool_t
Definition: RtypesCore.h:59
RooRealProxy _ixf
const Bool_t kFALSE
Definition: Rtypes.h:92
RooAbsMoment represents the first, second, or third order derivative of any RooAbsReal as calculated ...
Definition: RooAbsMoment.h:27
const RooAbsReal & xF()
Double_t x[n]
Definition: legend1.C:17
#define ClassDef(name, id)
Definition: Rtypes.h:254
RooRealProxy _xf
RooRealVar represents a fundamental (non-derived) real valued object.
Definition: RooRealVar.h:37
RooFirstMoment()
Default constructor.
virtual ~RooFirstMoment()
Destructor.
const RooAbsReal & iF()
double Double_t
Definition: RtypesCore.h:55
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
RooRealProxy _if
virtual TObject * clone(const char *newname) const
Mother of all ROOT objects.
Definition: TObject.h:37
RooRealProxy is the concrete proxy for RooAbsReal objects A RooRealProxy is the general mechanism to ...
Definition: RooRealProxy.h:23
Double_t evaluate() const
Calculate value.
const RooAbsReal & arg() const
Definition: RooRealProxy.h:43
const RooAbsReal & ixF()
char name[80]
Definition: TGX11.cxx:109