00001 /***************************************************************************** 00002 * Project: RooFit * 00003 * Package: RooFitCore * 00004 * File: $Id: RooRealBinding.h,v 1.9 2007/05/11 09:11:30 verkerke Exp $ 00005 * Authors: * 00006 * WV, Wouter Verkerke, UC Santa Barbara, verkerke@slac.stanford.edu * 00007 * DK, David Kirkby, UC Irvine, dkirkby@uci.edu * 00008 * * 00009 * Copyright (c) 2000-2005, Regents of the University of California * 00010 * and Stanford University. All rights reserved. * 00011 * * 00012 * Redistribution and use in source and binary forms, * 00013 * with or without modification, are permitted according to the terms * 00014 * listed in LICENSE (http://roofit.sourceforge.net/license.txt) * 00015 *****************************************************************************/ 00016 #ifndef ROO_REAL_BINDING 00017 #define ROO_REAL_BINDING 00018 00019 #include "RooAbsFunc.h" 00020 00021 class RooAbsRealLValue; 00022 class RooAbsReal; 00023 class RooArgSet; 00024 00025 class RooRealBinding : public RooAbsFunc { 00026 public: 00027 RooRealBinding(const RooAbsReal& func, const RooArgSet &vars, const RooArgSet* nset=0, Bool_t clipInvalid=kFALSE, const TNamed* rangeName=0); 00028 RooRealBinding(const RooRealBinding& other, const RooArgSet* nset=0) ; 00029 virtual ~RooRealBinding(); 00030 00031 virtual Double_t operator()(const Double_t xvector[]) const; 00032 virtual Double_t getMinLimit(UInt_t dimension) const; 00033 virtual Double_t getMaxLimit(UInt_t dimension) const; 00034 00035 virtual void saveXVec() const ; 00036 virtual void restoreXVec() const ; 00037 00038 virtual const char* getName() const ; 00039 00040 virtual std::list<Double_t>* plotSamplingHint(RooAbsRealLValue& /*obs*/, Double_t /*xlo*/, Double_t /*xhi*/) const ; 00041 00042 protected: 00043 00044 void loadValues(const Double_t xvector[]) const; 00045 const RooAbsReal *_func; 00046 RooAbsRealLValue **_vars; 00047 const RooArgSet *_nset; 00048 mutable Bool_t _xvecValid; 00049 Bool_t _clipInvalid ; 00050 mutable Double_t* _xsave ; 00051 const TNamed* _rangeName ; //! 00052 00053 ClassDef(RooRealBinding,0) // Function binding to RooAbsReal object 00054 }; 00055 00056 #endif 00057