CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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
< 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_.

17  :
18  RooAbsReal(other, name), e_(other.e_), x_(X::name(), this, other.x_) {
19  std::cout << ">>> making new RooFitFunction" << std::endl;
20  std::vector<std::pair<boost::shared_ptr<double>, RooRealProxy> >::const_iterator
21  i = other.pars_.begin(), end = other.pars_.end();
22  for(; i != end; ++i) {
23  std::cout << ">>> adding par to RooFitFunction" << std::endl;
24  pars_.push_back(std::make_pair(i->first, RooRealProxy(i->second.GetName(), this, i->second)));
25  }
26  }
int i
Definition: DBlmapReader.cc:9
#define end
Definition: vmac.h:37
std::vector< std::pair< boost::shared_ptr< double >, RooRealProxy > > pars_
tuple cout
Definition: gather_cfg.py:145
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.

28  :
29  RooAbsReal(name, title), e_(e), x_(X::name(), X::name(), this, x) {
30  }
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().

33  :
34  RooAbsReal(name, title), e_(e), x_(X::name(), X::name(), this, x) {
35  pars_.push_back(std::make_pair(a.ptr(), RooRealProxy(a.name().c_str(), a.name().c_str(), this, rA)));
36  }
const std::string & name() const
Definition: Parameter.h:13
boost::shared_ptr< double > ptr() const
Definition: Parameter.h:19
std::vector< std::pair< boost::shared_ptr< double >, RooRealProxy > > pars_
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().

40  :
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:13
boost::shared_ptr< double > ptr() const
Definition: Parameter.h:19
std::vector< std::pair< boost::shared_ptr< double >, RooRealProxy > > pars_
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().

49  :
50  RooAbsReal(name, title), e_(e), x_(X::name(), X::name(), this, x) {
51  pars_.push_back(std::make_pair(a.ptr(), RooRealProxy(a.name().c_str(), a.name().c_str(), this, rA)));
52  pars_.push_back(std::make_pair(b.ptr(), RooRealProxy(b.name().c_str(), b.name().c_str(), this, rB)));
53  pars_.push_back(std::make_pair(c.ptr(), RooRealProxy(c.name().c_str(), c.name().c_str(), this, rC)));
54  }
const std::string & name() const
Definition: Parameter.h:13
boost::shared_ptr< double > ptr() const
Definition: Parameter.h:19
std::vector< std::pair< boost::shared_ptr< double >, RooRealProxy > > pars_
template<typename X, typename Expr>
virtual root::RooFitFunction< X, Expr >::~RooFitFunction ( )
inlinevirtual

Definition at line 55 of file RooFitFunction.h.

55 { }

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().

Referenced by counter.Counter::register().

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

Definition at line 59 of file RooFitFunction.h.

59  {
60  return new RooFitFunction<X, Expr>(* this, newName);
61  }
template<typename X, typename Expr>
Double_t root::RooFitFunction< X, Expr >::evaluate ( ) const
inlineprivate

Definition at line 66 of file RooFitFunction.h.

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

66  {
67  X::set(x_);
68  std::vector<std::pair<boost::shared_ptr<double>, RooRealProxy> >::const_iterator
69  i = pars_.begin(), end = pars_.end();
70  for(; i != end; ++i) *(i->first) = i->second;
71  return e_();
72  }
int i
Definition: DBlmapReader.cc:9
#define end
Definition: vmac.h:37
std::vector< std::pair< boost::shared_ptr< double >, RooRealProxy > > pars_

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().