RooFunctor1DBinding.h

Go to the documentation of this file.
00001 /*****************************************************************************
00002  * Project: RooFit                                                           *
00003  * Package: RooFitCore                                                       *
00004  *    File: $Id: RooFunctor1DBinding.h 28963 2009-06-12 15:47:45Z wouter $
00005  * Authors:                                                                  *
00006  *   WV, Wouter Verkerke, NIKHEF, verkerke@nikhef.nl                         *
00007  *                                                                           *
00008  * Copyright (c) 2000-2008, NIKHEF, Regents of the University of California  *
00009  *                          and Stanford University. All rights reserved.    *
00010  *                                                                           *
00011  *****************************************************************************/
00012 
00013 #ifndef ROOFUNCTOR1DBINDING
00014 #define ROOFUNCTOR1DBINDING
00015 
00016 #include "TString.h"
00017 #include "RooAbsReal.h"
00018 #include "RooArgList.h"
00019 #include "RooListProxy.h"
00020 #include "RooAbsPdf.h"
00021 #include "RooRealProxy.h"
00022 #include "RooMsgService.h"
00023 #include <string>
00024 #include <map>
00025 #include <vector>
00026 #include "Math/IFunction.h"
00027 
00028 
00029 namespace RooFit {
00030 
00031 RooAbsReal* bindFunction(const char* name, const ROOT::Math::IBaseFunctionOneDim& ftor, RooAbsReal& vars) ;
00032 RooAbsPdf*  bindPdf(const char* name, const ROOT::Math::IBaseFunctionOneDim& ftor, RooAbsReal& vars) ;
00033 
00034 }
00035 
00036 
00037 class RooFunctor1DBinding : public RooAbsReal {
00038 public:
00039   RooFunctor1DBinding() {
00040     // Default constructor
00041   } ; 
00042   RooFunctor1DBinding(const char *name, const char *title, const ROOT::Math::IBaseFunctionOneDim& ftor, RooAbsReal& var);
00043   RooFunctor1DBinding(const RooFunctor1DBinding& other, const char* name=0) ;
00044   virtual TObject* clone(const char* newname) const { return new RooFunctor1DBinding(*this,newname); }
00045   inline virtual ~RooFunctor1DBinding() {}
00046   void printArgs(ostream& os) const ;
00047 
00048 protected:
00049 
00050   Double_t evaluate() const ;
00051 
00052   const ROOT::Math::IBaseFunctionOneDim* func ;    // Functor
00053   RooRealProxy                       var ;    // Argument reference
00054   
00055 
00056 private:
00057 
00058   ClassDef(RooFunctor1DBinding,1) // RooAbsReal binding to a ROOT::Math::IBaseFunctionOneDim
00059 };
00060 
00061 
00062 
00063 class RooFunctor1DPdfBinding : public RooAbsPdf {
00064 public:
00065   RooFunctor1DPdfBinding() {
00066     // Default constructor
00067   } ; 
00068   RooFunctor1DPdfBinding(const char *name, const char *title, const ROOT::Math::IBaseFunctionOneDim& ftor, RooAbsReal& vars);
00069   RooFunctor1DPdfBinding(const RooFunctor1DPdfBinding& other, const char* name=0) ;
00070   virtual TObject* clone(const char* newname) const { return new RooFunctor1DPdfBinding(*this,newname); }
00071   inline virtual ~RooFunctor1DPdfBinding() {}
00072   void printArgs(ostream& os) const ;
00073 
00074 protected:
00075 
00076   Double_t evaluate() const ;
00077 
00078   const ROOT::Math::IBaseFunctionOneDim* func ;    // Functor
00079   RooRealProxy                           var ;    // Argument reference
00080   
00081 
00082 private:
00083 
00084   ClassDef(RooFunctor1DPdfBinding,1) // RooAbsPdf binding to a ROOT::Math::IBaseFunctionOneDim
00085 };
00086 
00087 
00088 #endif

Generated on Tue Jul 5 14:26:10 2011 for ROOT_528-00b_version by  doxygen 1.5.1