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