Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
RooMomentMorphFunc.h
Go to the documentation of this file.
1/*****************************************************************************
2 * Project: RooFit *
3 * *
4 * This code was autogenerated by RooClassFactory *
5 *****************************************************************************/
6
7#ifndef ROO_MOMENT_MORPH_FUNC
8#define ROO_MOMENT_MORPH_FUNC
9
10#include "RooAbsPdf.h"
11#include "RooRealProxy.h"
12#include "RooCategoryProxy.h"
13#include "RooAbsReal.h"
14#include "RooAbsCategory.h"
15#include "RooSetProxy.h"
16#include "RooListProxy.h"
17#include "RooArgList.h"
18
19#include "TMatrixD.h"
20#include "TVectorD.h"
21
22#include <list>
23
25
27public:
29
31
32 RooMomentMorphFunc(const char *name, const char *title, RooAbsReal &_m, const RooArgList &varList,
33 const RooArgList &pdfList, const RooArgList &mrefList, Setting setting = NonLinearPosFractions);
34 RooMomentMorphFunc(const char *name, const char *title, RooAbsReal &_m, const RooArgList &varList,
35 const RooArgList &pdfList, const TVectorD &mrefpoints, Setting setting = NonLinearPosFractions);
36 RooMomentMorphFunc(const RooMomentMorphFunc &other, const char *name = nullptr);
37 TObject *clone(const char *newname) const override { return new RooMomentMorphFunc(*this, newname); }
38 ~RooMomentMorphFunc() override;
39
40 void setMode(const Setting &setting) { _setting = setting; }
41
42 void useHorizontalMorphing(bool val) { _useHorizMorph = val; }
43
44 virtual bool selfNormalized() const
45 {
46 // P.d.f is self normalized
47 return true;
48 }
49
50 virtual double getVal(const RooArgSet *set = nullptr) const;
51 RooAbsReal *sumFunc(const RooArgSet *nset);
52 const RooAbsReal *sumFunc(const RooArgSet *nset) const;
53
54 std::list<double> *plotSamplingHint(RooAbsRealLValue &obs, double xlo, double xhi) const override;
55 std::list<double> *binBoundaries(RooAbsRealLValue & /*obs*/, double /*xlo*/, double /*xhi*/) const override;
56 bool isBinnedDistribution(const RooArgSet &obs) const override;
57
58protected:
60 public:
62 : _sumFunc(&sumFunc), _tracker(&tracker)
63 {
64 _frac.add(flist);
65 };
66 ~CacheElem() override;
71
73 const RooRealVar *frac(Int_t i) const;
74 void calculateFractions(const RooMomentMorphFunc &self, bool verbose = true) const;
75 };
76 mutable RooObjCacheManager _cacheMgr; //! The cache manager
77 mutable RooArgSet *_curNormSet; //! Current normalization set
78
79 friend class CacheElem; // Cache needs to be able to clear _norm pointer
80
81 double evaluate() const override;
82
83 void initialize();
84 CacheElem *getCache(const RooArgSet *nset) const;
85
86 inline Int_t ij(const Int_t &i, const Int_t &j) const { return (i * _varList.getSize() + j); }
87 int idxmin(const double &m) const;
88 int idxmax(const double &m) const;
89
93 mutable TVectorD *_mref;
94
95 mutable TMatrixD *_M; //
96
98
100
101 ClassDefOverride(RooMomentMorphFunc, 3) // Your description goes here...
102};
103
104#endif
#define ClassDefOverride(name, id)
Definition Rtypes.h:341
char name[80]
Definition TGX11.cxx:110
RooAbsCacheElement is the abstract base class for objects to be stored in RooAbsCache cache manager o...
Int_t getSize() const
Return the number of elements in the collection.
virtual bool add(const RooAbsArg &var, bool silent=false)
Add the specified argument to list.
RooAbsRealLValue is the common abstract base class for objects that represent a real value that may a...
RooAbsReal is the common abstract base class for objects that represent a real value and implements f...
Definition RooAbsReal.h:62
RooArgList is a container object that can hold multiple RooAbsArg objects.
Definition RooArgList.h:22
RooArgSet is a container object that can hold multiple RooAbsArg objects.
Definition RooArgSet.h:55
RooChangeTracker is a meta object that tracks value changes in a given set of RooAbsArgs by registeri...
void calculateFractions(const RooMomentMorphFunc &self, bool verbose=true) const
RooArgList containedArgs(Action) override
CacheElem(RooAbsReal &sumFunc, RooChangeTracker &tracker, const RooArgList &flist)
RooArgSet * _curNormSet
The cache manager.
bool isBinnedDistribution(const RooArgSet &obs) const override
Tests if the distribution is binned. Unless overridden by derived classes, this always returns false.
RooObjCacheManager _cacheMgr
CacheElem * getCache(const RooArgSet *nset) const
void useHorizontalMorphing(bool val)
virtual bool selfNormalized() const
double evaluate() const override
Evaluate this PDF / function / constant. Needs to be overridden by all derived classes.
RooAbsReal * sumFunc(const RooArgSet *nset)
void setMode(const Setting &setting)
int idxmin(const double &m) const
std::list< double > * binBoundaries(RooAbsRealLValue &, double, double) const override
Retrieve bin boundaries if this distribution is binned in obs.
TObject * clone(const char *newname) const override
std::list< double > * plotSamplingHint(RooAbsRealLValue &obs, double xlo, double xhi) const override
Interface for returning an optional hint for initial sampling points when constructing a curve projec...
virtual double getVal(const RooArgSet *set=nullptr) const
Int_t ij(const Int_t &i, const Int_t &j) const
int idxmax(const double &m) const
Class RooObjCacheManager is an implementation of class RooCacheManager<RooAbsCacheElement> and specia...
RooRealVar represents a variable that can be changed from the outside.
Definition RooRealVar.h:40
Mother of all ROOT objects.
Definition TObject.h:41