Logo ROOT  
Reference Guide
RooFunctorBinding.h
Go to the documentation of this file.
1/*****************************************************************************
2 * Project: RooFit *
3 * Package: RooFitCore *
4 * File: $Id$
5 * Authors: *
6 * WV, Wouter Verkerke, NIKHEF, verkerke@nikhef.nl *
7 * *
8 * Copyright (c) 2000-2008, NIKHEF, Regents of the University of California *
9 * and Stanford University. All rights reserved. *
10 * *
11 *****************************************************************************/
12
13#ifndef ROOFUNCTORBINDING
14#define ROOFUNCTORBINDING
15
16#include "TString.h"
17#include "RooAbsReal.h"
18#include "RooArgList.h"
19#include "RooListProxy.h"
20#include "RooAbsPdf.h"
21#include "RooRealProxy.h"
22#include "RooMsgService.h"
23#include <string>
24#include "Math/IFunction.h"
25
26namespace RooFit {
27
28RooAbsReal* bindFunction(const char* name, const ROOT::Math::IBaseFunctionMultiDim& ftor,const RooArgList& vars) ;
29RooAbsPdf* bindPdf(const char* name, const ROOT::Math::IBaseFunctionMultiDim& ftor, const RooArgList& vars) ;
30
31}
32
34public:
36 // Default constructor
37 } ;
38 RooFunctorBinding(const char *name, const char *title, const ROOT::Math::IBaseFunctionMultiDim& ftor, const RooArgList& vars);
39 RooFunctorBinding(const RooFunctorBinding& other, const char* name=0) ;
40 virtual TObject* clone(const char* newname) const { return new RooFunctorBinding(*this,newname); }
41 inline virtual ~RooFunctorBinding() { delete[] x ; }
42 void printArgs(std::ostream& os) const ;
43
44protected:
45
46 Double_t evaluate() const ;
47
49 RooListProxy vars ; // Argument reference
50 Double_t* x ; // Argument value array
51
52
53private:
54
55 ClassDef(RooFunctorBinding,1) // RooAbsReal binding to a ROOT::Math::IBaseFunctionMultiDim
56};
57
58
59
61public:
63 // Default constructor
64 } ;
65 RooFunctorPdfBinding(const char *name, const char *title, const ROOT::Math::IBaseFunctionMultiDim& ftor, const RooArgList& vars);
66 RooFunctorPdfBinding(const RooFunctorPdfBinding& other, const char* name=0) ;
67 virtual TObject* clone(const char* newname) const { return new RooFunctorPdfBinding(*this,newname); }
68 inline virtual ~RooFunctorPdfBinding() { delete[] x ; }
69 void printArgs(std::ostream& os) const ;
70
71protected:
72
73 Double_t evaluate() const ;
74
76 RooListProxy vars ; // Argument reference
77 Double_t* x ; // Argument value array
78
79
80private:
81
82 ClassDef(RooFunctorPdfBinding,1) // RooAbsPdf binding to a ROOT::Math::IBaseFunctionMultiDim
83};
84
85
86#endif
double Double_t
Definition: RtypesCore.h:57
#define ClassDef(name, id)
Definition: Rtypes.h:322
char name[80]
Definition: TGX11.cxx:109
RooAbsReal is the common abstract base class for objects that represent a real value and implements f...
Definition: RooAbsReal.h:60
RooArgList is a container object that can hold multiple RooAbsArg objects.
Definition: RooArgList.h:21
RooFunctorBinding makes math functions from ROOT usable in RooFit.
virtual TObject * clone(const char *newname) const
const ROOT::Math::IBaseFunctionMultiDim * func
virtual ~RooFunctorBinding()
Double_t evaluate() const
Evaluate this PDF / function / constant. Needs to be overridden by all derived classes.
void printArgs(std::ostream &os) const
Print object arguments, ie its proxies.
RooFunctorPdfBinding makes math functions from ROOT usable as PDFs in RooFit.
void printArgs(std::ostream &os) const
Print object arguments, ie its proxies.
Double_t evaluate() const
Evaluate this PDF / function / constant. Needs to be overridden by all derived classes.
virtual TObject * clone(const char *newname) const
const ROOT::Math::IBaseFunctionMultiDim * func
RooListProxy is the concrete proxy for RooArgList objects.
Definition: RooListProxy.h:25
Mother of all ROOT objects.
Definition: TObject.h:37
The namespace RooFit contains mostly switches that change the behaviour of functions of PDFs (or othe...
RooAbsPdf * bindPdf(const char *name, CFUNCD1D func, RooAbsReal &x)
RooAbsReal * bindFunction(const char *name, CFUNCD1D func, RooAbsReal &x)