CMS 3D CMS Logo

List of all members | Public Member Functions | Private Member Functions | Private Attributes
root::RooFitFunction< X, Expr > Class Template Reference

#include <RooFitFunction.h>

Inheritance diagram for root::RooFitFunction< X, Expr >:

Public Member Functions

void add (RooAbsReal &rA, funct::Parameter &a)
 
virtual TObject * clone (const char *newName) const
 
 RooFitFunction (const RooFitFunction< X, Expr > &other, const char *name=0)
 
 RooFitFunction (const char *name, const char *title, const Expr &e, RooAbsReal &x)
 
 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)
 
virtual ~RooFitFunction ()
 

Private Member Functions

Double_t evaluate () const
 

Private Attributes

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

Detailed Description

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

Definition at line 14 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 16 of file RooFitFunction.h.

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

17  : RooAbsReal(other, name), e_(other.e_), x_(X::name(), this, other.x_) {
18  std::cout << ">>> making new RooFitFunction" << std::endl;
19  std::vector<std::pair<std::shared_ptr<double>, RooRealProxy> >::const_iterator i = other.pars_.begin(),
20  end = other.pars_.end();
21  for (; i != end; ++i) {
22  std::cout << ">>> adding par to RooFitFunction" << std::endl;
23  pars_.push_back(std::make_pair(i->first, RooRealProxy(i->second.GetName(), this, i->second)));
24  }
25  }
std::vector< std::pair< std::shared_ptr< double >, RooRealProxy > > pars_
#define end
Definition: vmac.h:39
template<typename X, typename Expr>
root::RooFitFunction< X, Expr >::RooFitFunction ( const char *  name,
const char *  title,
const Expr &  e,
RooAbsReal &  x 
)
inline
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 28 of file RooFitFunction.h.

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

30  : RooAbsReal(name, title), e_(e), x_(X::name(), X::name(), this, x) {
31  pars_.push_back(std::make_pair(a.ptr(), RooRealProxy(a.name().c_str(), a.name().c_str(), this, rA)));
32  }
const std::string & name() const
Definition: Parameter.h:12
std::vector< std::pair< std::shared_ptr< double >, RooRealProxy > > pars_
std::shared_ptr< double > ptr() const
Definition: Parameter.h:18
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 33 of file RooFitFunction.h.

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

41  : RooAbsReal(name, title), e_(e), x_(X::name(), X::name(), this, x) {
42  pars_.push_back(std::make_pair(a.ptr(), RooRealProxy(a.name().c_str(), a.name().c_str(), this, rA)));
43  pars_.push_back(std::make_pair(b.ptr(), RooRealProxy(b.name().c_str(), b.name().c_str(), this, rB)));
44  }
const std::string & name() const
Definition: Parameter.h:12
std::vector< std::pair< std::shared_ptr< double >, RooRealProxy > > pars_
std::shared_ptr< double > ptr() const
Definition: Parameter.h:18
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().

55  : RooAbsReal(name, title), e_(e), x_(X::name(), X::name(), this, x) {
56  pars_.push_back(std::make_pair(a.ptr(), RooRealProxy(a.name().c_str(), a.name().c_str(), this, rA)));
57  pars_.push_back(std::make_pair(b.ptr(), RooRealProxy(b.name().c_str(), b.name().c_str(), this, rB)));
58  pars_.push_back(std::make_pair(c.ptr(), RooRealProxy(c.name().c_str(), c.name().c_str(), this, rC)));
59  }
const std::string & name() const
Definition: Parameter.h:12
std::vector< std::pair< std::shared_ptr< double >, RooRealProxy > > pars_
std::shared_ptr< double > ptr() const
Definition: Parameter.h:18
template<typename X, typename Expr>
virtual root::RooFitFunction< X, Expr >::~RooFitFunction ( )
inlinevirtual

Definition at line 60 of file RooFitFunction.h.

60 {}

Member Function Documentation

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

Definition at line 61 of file RooFitFunction.h.

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

Referenced by counter.Counter::register().

61  {
62  pars_.push_back(std::make_pair(a.ptr(), RooRealProxy(a.name().c_str(), a.name().c_str(), this, rA)));
63  }
const std::string & name() const
Definition: Parameter.h:12
std::vector< std::pair< std::shared_ptr< double >, RooRealProxy > > pars_
std::shared_ptr< double > ptr() const
Definition: Parameter.h:18
template<typename X, typename Expr>
virtual TObject* root::RooFitFunction< X, Expr >::clone ( const char *  newName) const
inlinevirtual

Definition at line 64 of file RooFitFunction.h.

References mps_merge::newName.

64 { return new RooFitFunction<X, Expr>(*this, newName); }
string newName
Definition: mps_merge.py:86
template<typename X, typename Expr>
Double_t root::RooFitFunction< X, Expr >::evaluate ( ) const
inlineprivate

Definition at line 70 of file RooFitFunction.h.

References root::RooFitFunction< X, Expr >::e_, end, and mps_fire::i.

70  {
71  X::set(x_);
72  std::vector<std::pair<std::shared_ptr<double>, RooRealProxy> >::const_iterator i = pars_.begin(),
73  end = pars_.end();
74  for (; i != end; ++i)
75  *(i->first) = i->second;
76  return e_();
77  }
std::vector< std::pair< std::shared_ptr< double >, RooRealProxy > > pars_
#define end
Definition: vmac.h:39

Member Data Documentation

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

Definition at line 67 of file RooFitFunction.h.

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

template<typename X, typename Expr>
std::vector<std::pair<std::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 68 of file RooFitFunction.h.