CMS 3D CMS Logo

Public Member Functions | Private Member Functions | Private Attributes

root::RooFitFunction< X, Expr > Class Template Reference

#include <RooFitFunction.h>

List of all members.

Public Member Functions

void add (RooAbsReal &rA, funct::Parameter &a)
virtual TObject * clone (const char *newName) const
 RooFitFunction (const char *name, const char *title, const Expr &e, RooAbsReal &x, RooAbsReal &rA, funct::Parameter &a)
 RooFitFunction (const char *name, const char *title, const Expr &e, RooAbsReal &x, RooAbsReal &rA, funct::Parameter &a, RooAbsReal &rB, funct::Parameter &b)
 RooFitFunction (const char *name, const char *title, const Expr &e, RooAbsReal &x, RooAbsReal &rA, funct::Parameter &a, RooAbsReal &rB, funct::Parameter &b, RooAbsReal &rC, funct::Parameter &c)
 RooFitFunction (const char *name, const char *title, const Expr &e, RooAbsReal &x)
 RooFitFunction (const RooFitFunction< X, Expr > &other, const char *name=0)
virtual ~RooFitFunction ()

Private Member Functions

Double_t evaluate () const

Private Attributes

Expr e_
std::vector< std::pair
< boost::shared_ptr< double >
, RooRealProxy > > 
pars_
RooRealProxy x_

Detailed Description

template<typename X, typename Expr>
class root::RooFitFunction< X, Expr >

Definition at line 15 of file RooFitFunction.h.


Constructor & Destructor Documentation

template<typename X, typename Expr>
root::RooFitFunction< X, Expr >::RooFitFunction ( const RooFitFunction< X, Expr > &  other,
const char *  name = 0 
) [inline]

Definition at line 17 of file RooFitFunction.h.

References gather_cfg::cout, end, i, and root::RooFitFunction< X, Expr >::pars_.

                                                                              :
      RooAbsReal(other, name), e_(other.e_), x_(X::name(), this, other.x_) {
      std::cout << ">>> making new RooFitFunction" << std::endl;
      std::vector<std::pair<boost::shared_ptr<double>, RooRealProxy> >::const_iterator 
        i = other.pars_.begin(), end = other.pars_.end();
      for(; i != end; ++i) {
        std::cout << ">>> adding par to RooFitFunction" << std::endl;
        pars_.push_back(std::make_pair(i->first, RooRealProxy(i->second.GetName(), this, i->second)));
      }
    }
template<typename X, typename Expr>
root::RooFitFunction< X, Expr >::RooFitFunction ( const char *  name,
const char *  title,
const Expr &  e,
RooAbsReal &  x 
) [inline]

Definition at line 27 of file RooFitFunction.h.

                                                   : 
      RooAbsReal(name, title), e_(e), x_(X::name(), X::name(), this, x) {
    } 
template<typename X, typename Expr>
root::RooFitFunction< X, Expr >::RooFitFunction ( const char *  name,
const char *  title,
const Expr &  e,
RooAbsReal &  x,
RooAbsReal &  rA,
funct::Parameter a 
) [inline]

Definition at line 31 of file RooFitFunction.h.

References funct::Parameter::name(), root::RooFitFunction< X, Expr >::pars_, and funct::Parameter::ptr().

                                                        : 
      RooAbsReal(name, title), e_(e), x_(X::name(), X::name(), this, x) {
      pars_.push_back(std::make_pair(a.ptr(), RooRealProxy(a.name().c_str(), a.name().c_str(), this, rA)));
    } 
template<typename X, typename Expr>
root::RooFitFunction< X, Expr >::RooFitFunction ( const char *  name,
const char *  title,
const Expr &  e,
RooAbsReal &  x,
RooAbsReal &  rA,
funct::Parameter a,
RooAbsReal &  rB,
funct::Parameter b 
) [inline]

Definition at line 37 of file RooFitFunction.h.

References funct::Parameter::name(), root::RooFitFunction< X, Expr >::pars_, and funct::Parameter::ptr().

                                                        : 
      RooAbsReal(name, title), e_(e), x_(X::name(), X::name(), this, x) {
      pars_.push_back(std::make_pair(a.ptr(), RooRealProxy(a.name().c_str(), a.name().c_str(), this, rA)));
      pars_.push_back(std::make_pair(b.ptr(), RooRealProxy(b.name().c_str(), b.name().c_str(), this, rB)));
    } 
template<typename X, typename Expr>
root::RooFitFunction< X, Expr >::RooFitFunction ( const char *  name,
const char *  title,
const Expr &  e,
RooAbsReal &  x,
RooAbsReal &  rA,
funct::Parameter a,
RooAbsReal &  rB,
funct::Parameter b,
RooAbsReal &  rC,
funct::Parameter c 
) [inline]

Definition at line 45 of file RooFitFunction.h.

References funct::Parameter::name(), root::RooFitFunction< X, Expr >::pars_, and funct::Parameter::ptr().

                                                        : 
      RooAbsReal(name, title), e_(e), x_(X::name(), X::name(), this, x) {
      pars_.push_back(std::make_pair(a.ptr(), RooRealProxy(a.name().c_str(), a.name().c_str(), this, rA)));
      pars_.push_back(std::make_pair(b.ptr(), RooRealProxy(b.name().c_str(), b.name().c_str(), this, rB)));
      pars_.push_back(std::make_pair(c.ptr(), RooRealProxy(c.name().c_str(), c.name().c_str(), this, rC)));
    } 
template<typename X, typename Expr>
virtual root::RooFitFunction< X, Expr >::~RooFitFunction ( ) [inline, virtual]

Definition at line 55 of file RooFitFunction.h.

{ }

Member Function Documentation

template<typename X, typename Expr>
void root::RooFitFunction< X, Expr >::add ( RooAbsReal &  rA,
funct::Parameter a 
) [inline]

Definition at line 56 of file RooFitFunction.h.

References funct::Parameter::name(), root::RooFitFunction< X, Expr >::pars_, and funct::Parameter::ptr().

                                                  {
      pars_.push_back(std::make_pair(a.ptr(), RooRealProxy(a.name().c_str(), a.name().c_str(), this, rA)));      
    }
template<typename X, typename Expr>
virtual TObject* root::RooFitFunction< X, Expr >::clone ( const char *  newName) const [inline, virtual]

Definition at line 59 of file RooFitFunction.h.

                                                      { 
      return new RooFitFunction<X, Expr>(* this, newName);
    }
template<typename X, typename Expr>
Double_t root::RooFitFunction< X, Expr >::evaluate ( ) const [inline, private]

Definition at line 66 of file RooFitFunction.h.

References root::RooFitFunction< X, Expr >::e_, end, i, root::RooFitFunction< X, Expr >::pars_, runtimedef::set(), and root::RooFitFunction< X, Expr >::x_.

                              {
      X::set(x_);
      std::vector<std::pair<boost::shared_ptr<double>, RooRealProxy> >::const_iterator 
        i = pars_.begin(), end = pars_.end();
      for(; i != end; ++i) *(i->first) = i->second;
      return  e_();
    }

Member Data Documentation

template<typename X, typename Expr>
Expr root::RooFitFunction< X, Expr >::e_ [private]

Definition at line 63 of file RooFitFunction.h.

Referenced by root::RooFitFunction< X, Expr >::evaluate().

template<typename X, typename Expr>
std::vector<std::pair<boost::shared_ptr<double>, RooRealProxy> > root::RooFitFunction< X, Expr >::pars_ [private]
template<typename X, typename Expr>
RooRealProxy root::RooFitFunction< X, Expr >::x_ [private]

Definition at line 64 of file RooFitFunction.h.

Referenced by root::RooFitFunction< X, Expr >::evaluate().