Logo ROOT   6.14/05
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 <map>
25 #include <vector>
26 #include "Math/IFunction.h"
27 
28 namespace RooFit {
29 
30 RooAbsReal* bindFunction(const char* name, const ROOT::Math::IBaseFunctionMultiDim& ftor,const RooArgList& vars) ;
31 RooAbsPdf* bindPdf(const char* name, const ROOT::Math::IBaseFunctionMultiDim& ftor, const RooArgList& vars) ;
32 
33 }
34 
35 class RooFunctorBinding : public RooAbsReal {
36 public:
37  RooFunctorBinding() : func(0), x(0) {
38  // Default constructor
39  } ;
40  RooFunctorBinding(const char *name, const char *title, const ROOT::Math::IBaseFunctionMultiDim& ftor, const RooArgList& vars);
41  RooFunctorBinding(const RooFunctorBinding& other, const char* name=0) ;
42  virtual TObject* clone(const char* newname) const { return new RooFunctorBinding(*this,newname); }
43  inline virtual ~RooFunctorBinding() { delete[] x ; }
44  void printArgs(std::ostream& os) const ;
45 
46 protected:
47 
48  Double_t evaluate() const ;
49 
51  RooListProxy vars ; // Argument reference
52  Double_t* x ; // Argument value array
53 
54 
55 private:
56 
57  ClassDef(RooFunctorBinding,1) // RooAbsReal binding to a ROOT::Math::IBaseFunctionMultiDim
58 };
59 
60 
61 
63 public:
64  RooFunctorPdfBinding() : func(0), x(0) {
65  // Default constructor
66  } ;
67  RooFunctorPdfBinding(const char *name, const char *title, const ROOT::Math::IBaseFunctionMultiDim& ftor, const RooArgList& vars);
68  RooFunctorPdfBinding(const RooFunctorPdfBinding& other, const char* name=0) ;
69  virtual TObject* clone(const char* newname) const { return new RooFunctorPdfBinding(*this,newname); }
70  inline virtual ~RooFunctorPdfBinding() { delete[] x ; }
71  void printArgs(std::ostream& os) const ;
72 
73 protected:
74 
75  Double_t evaluate() const ;
76 
78  RooListProxy vars ; // Argument reference
79  Double_t* x ; // Argument value array
80 
81 
82 private:
83 
84  ClassDef(RooFunctorPdfBinding,1) // RooAbsPdf binding to a ROOT::Math::IBaseFunctionMultiDim
85 };
86 
87 
88 #endif
RooAbsPdf * bindPdf(const char *name, CFUNCD1D func, RooAbsReal &x)
virtual ~RooFunctorBinding()
virtual TObject * clone(const char *newname) const
void evaluate(typename Architecture_t::Matrix_t &A, EActivationFunction f)
Apply the given activation function to each value in the given matrix A.
Definition: Functions.h:87
RooAbsReal * bindFunction(const char *name, CFUNCD1D func, RooAbsReal &x)
Double_t x[n]
Definition: legend1.C:17
#define ClassDef(name, id)
Definition: Rtypes.h:320
RooCFunction1Binding is a templated implementation of class RooAbsReal that binds generic C(++) funct...
const ROOT::Math::IBaseFunctionMultiDim * func
Documentation for the abstract class IBaseFunctionMultiDim.
Definition: IFunction.h:62
const ROOT::Math::IBaseFunctionMultiDim * func
RooListProxy is the concrete proxy for RooArgList objects.
Definition: RooListProxy.h:25
virtual TObject * clone(const char *newname) const
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
Mother of all ROOT objects.
Definition: TObject.h:37
RooAbsPdf is the abstract interface for all probability density functions The class provides hybrid a...
Definition: RooAbsPdf.h:41
char name[80]
Definition: TGX11.cxx:109