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 "RooAbsReal.h"
17#include "RooArgList.h"
18#include "RooListProxy.h"
19#include "RooAbsPdf.h"
20#include "RooRealProxy.h"
21#include "RooMsgService.h"
22#include "Math/IFunction.h"
23
24namespace RooFit {
25
26RooAbsReal* bindFunction(const char* name, const ROOT::Math::IBaseFunctionMultiDim& ftor,const RooArgList& vars) ;
27RooAbsPdf* bindPdf(const char* name, const ROOT::Math::IBaseFunctionMultiDim& ftor, const RooArgList& vars) ;
28
29}
30
32public:
34 // Default constructor
35 } ;
36 RooFunctorBinding(const char *name, const char *title, const ROOT::Math::IBaseFunctionMultiDim& ftor, const RooArgList& vars);
37 RooFunctorBinding(const RooFunctorBinding& other, const char* name=0) ;
38 TObject* clone(const char* newname) const override { return new RooFunctorBinding(*this,newname); }
39 inline ~RooFunctorBinding() override { delete[] x ; }
40 void printArgs(std::ostream& os) const override ;
41
42protected:
43
44 double evaluate() const override ;
45
47 RooListProxy vars ; // Argument reference
48 double* x ; // Argument value array
49
50
51private:
52
53 ClassDefOverride(RooFunctorBinding,1) // RooAbsReal binding to a ROOT::Math::IBaseFunctionMultiDim
54};
55
56
57
59public:
61 // Default constructor
62 } ;
63 RooFunctorPdfBinding(const char *name, const char *title, const ROOT::Math::IBaseFunctionMultiDim& ftor, const RooArgList& vars);
64 RooFunctorPdfBinding(const RooFunctorPdfBinding& other, const char* name=0) ;
65 TObject* clone(const char* newname) const override { return new RooFunctorPdfBinding(*this,newname); }
66 inline ~RooFunctorPdfBinding() override { delete[] x ; }
67 void printArgs(std::ostream& os) const override ;
68
69protected:
70
71 double evaluate() const override ;
72
74 RooListProxy vars ; // Argument reference
75 double* x ; // Argument value array
76
77
78private:
79
80 ClassDefOverride(RooFunctorPdfBinding,1) // RooAbsPdf binding to a ROOT::Math::IBaseFunctionMultiDim
81};
82
83
84#endif
#define ClassDefOverride(name, id)
Definition: Rtypes.h:339
char name[80]
Definition: TGX11.cxx:110
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
RooFunctorBinding makes math functions from ROOT usable in RooFit.
TObject * clone(const char *newname) const override
const ROOT::Math::IBaseFunctionMultiDim * func
double evaluate() const override
Evaluate this PDF / function / constant. Needs to be overridden by all derived classes.
void printArgs(std::ostream &os) const override
Interface for printing of object arguments.
~RooFunctorBinding() override
RooFunctorPdfBinding makes math functions from ROOT usable as PDFs in RooFit.
void printArgs(std::ostream &os) const override
Interface for printing of object arguments.
TObject * clone(const char *newname) const override
const ROOT::Math::IBaseFunctionMultiDim * func
double evaluate() const override
Evaluate this PDF / function / constant. Needs to be overridden by all derived classes.
~RooFunctorPdfBinding() override
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...
Definition: Common.h:18
RooAbsPdf * bindPdf(const char *name, CFUNCD1D func, RooAbsReal &x)
RooAbsReal * bindFunction(const char *name, CFUNCD1D func, RooAbsReal &x)