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< boost::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_.

16  :
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<boost::shared_ptr<double>, RooRealProxy> >::const_iterator
20  i = other.pars_.begin(), 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  }
#define end
Definition: vmac.h:39
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 
)
inline

Definition at line 26 of file RooFitFunction.h.

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 30 of file RooFitFunction.h.

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

32  :
33  RooAbsReal(name, title), e_(e), x_(X::name(), X::name(), this, x) {
34  pars_.push_back(std::make_pair(a.ptr(), RooRealProxy(a.name().c_str(), a.name().c_str(), this, rA)));
35  }
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 36 of file RooFitFunction.h.

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

39  :
40  RooAbsReal(name, title), e_(e), x_(X::name(), X::name(), this, x) {
41  pars_.push_back(std::make_pair(a.ptr(), RooRealProxy(a.name().c_str(), a.name().c_str(), this, rA)));
42  pars_.push_back(std::make_pair(b.ptr(), RooRealProxy(b.name().c_str(), b.name().c_str(), this, rB)));
43  }
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 44 of file RooFitFunction.h.

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

48  :
49  RooAbsReal(name, title), e_(e), x_(X::name(), X::name(), this, x) {
50  pars_.push_back(std::make_pair(a.ptr(), RooRealProxy(a.name().c_str(), a.name().c_str(), this, rA)));
51  pars_.push_back(std::make_pair(b.ptr(), RooRealProxy(b.name().c_str(), b.name().c_str(), this, rB)));
52  pars_.push_back(std::make_pair(c.ptr(), RooRealProxy(c.name().c_str(), c.name().c_str(), this, rC)));
53  }
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 54 of file RooFitFunction.h.

54 { }

Member Function Documentation

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

Definition at line 55 of file RooFitFunction.h.

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

Referenced by counter.Counter::register().

55  {
56  pars_.push_back(std::make_pair(a.ptr(), RooRealProxy(a.name().c_str(), a.name().c_str(), this, rA)));
57  }
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 58 of file RooFitFunction.h.

References mps_merge::newName.

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

Definition at line 65 of file RooFitFunction.h.

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

65  {
66  X::set(x_);
67  std::vector<std::pair<boost::shared_ptr<double>, RooRealProxy> >::const_iterator
68  i = pars_.begin(), end = pars_.end();
69  for(; i != end; ++i) *(i->first) = i->second;
70  return e_();
71  }
#define end
Definition: vmac.h:39
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 62 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 63 of file RooFitFunction.h.