Logo ROOT  
Reference Guide
RooDerivative.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_DERIVATIVE
17 #define ROO_DERIVATIVE
18 
19 #include "RooAbsReal.h"
20 #include "RooRealProxy.h"
21 #include "RooSetProxy.h"
22 
23 
24 #include "Math/WrappedFunction.h"
26 
27 
28 class RooRealVar;
29 class RooArgList ;
30 
31 class RooDerivative : public RooAbsReal {
32 public:
33 
34  RooDerivative() ;
35  RooDerivative(const char *name, const char *title, RooAbsReal& func, RooRealVar& x, Int_t order=1, Double_t eps=0.001) ;
36  RooDerivative(const char *name, const char *title, RooAbsReal& func, RooRealVar& x, const RooArgSet& nset, Int_t order=1, Double_t eps=0.001) ;
37  virtual ~RooDerivative() ;
38 
39  RooDerivative(const RooDerivative& other, const char* name = 0);
40  virtual TObject* clone(const char* newname) const { return new RooDerivative(*this, newname); }
41 
42  Int_t order() const { return _order ; }
43  Double_t eps() const { return _eps ; }
44  void setEps(Double_t e) { _eps = e ; }
45 
46  Bool_t redirectServersHook(const RooAbsCollection& /*newServerList*/, Bool_t /*mustReplaceAll*/, Bool_t /*nameChange*/, Bool_t /*isRecursive*/) ;
47 
48 protected:
49 
50  Int_t _order ; // Derivation order
51  Double_t _eps ; // Precision
52  RooSetProxy _nset ; // Normalization set (optional)
53  RooRealProxy _func ; // Input function
54  RooRealProxy _x ; // Observable
55  mutable RooFunctor* _ftor ; //! Functor binding of RooAbsReal
56  mutable ROOT::Math::RichardsonDerivator *_rd ; //! Derivator
57 
58  Double_t evaluate() const;
59 
60  ClassDef(RooDerivative,1) // Representation of derivative of any RooAbsReal
61 };
62 
63 #endif
RooDerivative::_eps
Double_t _eps
Definition: RooDerivative.h:51
RooDerivative::_order
Int_t _order
Definition: RooDerivative.h:50
e
#define e(i)
Definition: RSha256.hxx:103
RooAbsReal.h
RooDerivative::eps
Double_t eps() const
Definition: RooDerivative.h:43
RooDerivative::_x
RooRealProxy _x
Definition: RooDerivative.h:54
RooDerivative::RooDerivative
RooDerivative()
Default constructor.
Definition: RooDerivative.cxx:54
RooDerivative
RooDerivative represents the first, second, or third order derivative of any RooAbsReal as calculated...
Definition: RooDerivative.h:31
RooDerivative::_nset
RooSetProxy _nset
Definition: RooDerivative.h:52
RooSetProxy
RooSetProxy is the concrete proxy for RooArgSet objects.
Definition: RooSetProxy.h:23
RooDerivative::~RooDerivative
virtual ~RooDerivative()
Destructor.
Definition: RooDerivative.cxx:116
RooArgList
RooArgList is a container object that can hold multiple RooAbsArg objects.
Definition: RooArgList.h:21
RooDerivative::_ftor
RooFunctor * _ftor
Definition: RooDerivative.h:55
RichardsonDerivator.h
x
Double_t x[n]
Definition: legend1.C:17
ROOT::Math::RichardsonDerivator
User class for calculating the derivatives of a function.
Definition: RichardsonDerivator.h:55
RooAbsReal
RooAbsReal is the common abstract base class for objects that represent a real value and implements f...
Definition: RooAbsReal.h:61
RooSetProxy.h
bool
RooDerivative::order
Int_t order() const
Definition: RooDerivative.h:42
RooDerivative::setEps
void setEps(Double_t e)
Definition: RooDerivative.h:44
RooRealProxy.h
RooAbsCollection
RooAbsCollection is an abstract container object that can hold multiple RooAbsArg objects.
Definition: RooAbsCollection.h:31
RooDerivative::clone
virtual TObject * clone(const char *newname) const
Definition: RooDerivative.h:40
RooTemplateProxy< RooAbsReal >
Double_t
double Double_t
Definition: RtypesCore.h:59
RooFunctor
Lightweight interface adaptor that exports a RooAbsPdf as a functor.
Definition: RooFunctor.h:25
RooDerivative::evaluate
Double_t evaluate() const
Derivator
Definition: RooDerivative.cxx:127
TObject
Mother of all ROOT objects.
Definition: TObject.h:37
ClassDef
#define ClassDef(name, id)
Definition: Rtypes.h:325
name
char name[80]
Definition: TGX11.cxx:110
RooDerivative::_func
RooRealProxy _func
Definition: RooDerivative.h:53
WrappedFunction.h
RooRealVar
RooRealVar represents a variable that can be changed from the outside.
Definition: RooRealVar.h:37
RooDerivative::_rd
ROOT::Math::RichardsonDerivator * _rd
Functor binding of RooAbsReal.
Definition: RooDerivative.h:56
RooDerivative::redirectServersHook
Bool_t redirectServersHook(const RooAbsCollection &, Bool_t, Bool_t, Bool_t)
Zap functor and derivator ;.
Definition: RooDerivative.cxx:148
RooArgSet
RooArgSet is a container object that can hold multiple RooAbsArg objects.
Definition: RooArgSet.h:29
int