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)
 
TObject * clone (const char *newName) const override
 
 RooFitFunction (const RooFitFunction< X, Expr > &other, const char *name=nullptr)
 
 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)
 
 ~RooFitFunction () override
 

Private Member Functions

Double_t evaluate () const override
 

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

◆ RooFitFunction() [1/5]

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

Definition at line 16 of file RooFitFunction.h.

References gather_cfg::cout, mps_fire::end, mps_fire::i, trackingPlots::other, 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_

◆ RooFitFunction() [2/5]

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.

References x.

◆ RooFitFunction() [3/5]

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 a, root::RooFitFunction< X, Expr >::pars_, and x.

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  }
std::vector< std::pair< std::shared_ptr< double >, RooRealProxy > > pars_
double a
Definition: hdecay.h:119

◆ RooFitFunction() [4/5]

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 a, b, root::RooFitFunction< X, Expr >::pars_, and x.

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  }
std::vector< std::pair< std::shared_ptr< double >, RooRealProxy > > pars_
double b
Definition: hdecay.h:118
double a
Definition: hdecay.h:119

◆ RooFitFunction() [5/5]

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 a, b, c, root::RooFitFunction< X, Expr >::pars_, and x.

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  }
std::vector< std::pair< std::shared_ptr< double >, RooRealProxy > > pars_
double b
Definition: hdecay.h:118
double a
Definition: hdecay.h:119

◆ ~RooFitFunction()

template<typename X, typename Expr>
root::RooFitFunction< X, Expr >::~RooFitFunction ( )
inlineoverride

Definition at line 60 of file RooFitFunction.h.

60 {}

Member Function Documentation

◆ add()

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 a, and root::RooFitFunction< X, Expr >::pars_.

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  }
std::vector< std::pair< std::shared_ptr< double >, RooRealProxy > > pars_
double a
Definition: hdecay.h:119

◆ clone()

template<typename X, typename Expr>
TObject* root::RooFitFunction< X, Expr >::clone ( const char *  newName) const
inlineoverride

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

◆ evaluate()

template<typename X, typename Expr>
Double_t root::RooFitFunction< X, Expr >::evaluate ( ) const
inlineoverrideprivate

Definition at line 70 of file RooFitFunction.h.

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

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_

Member Data Documentation

◆ e_

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

◆ pars_

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

◆ x_

template<typename X, typename Expr>
RooRealProxy root::RooFitFunction< X, Expr >::x_
private

Definition at line 68 of file RooFitFunction.h.

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