Logo ROOT   6.12/07
Reference Guide
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 <vector>
23 #include <string>
24 class RooChangeTracker;
25 
27 public:
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 = 0);
37  virtual TObject *clone(const char *newname) const { return new RooMomentMorphFunc(*this, newname); }
38  virtual ~RooMomentMorphFunc();
39 
40  void setMode(const Setting &setting) { _setting = setting; }
41 
42  void useHorizontalMorphing(bool val) { _useHorizMorph = val; }
43 
44  virtual Bool_t selfNormalized() const
45  {
46  // P.d.f is self normalized
47  return kTRUE;
48  }
49 
50  virtual Double_t getVal(const RooArgSet *set = 0) const;
51  RooAbsReal *sumFunc(const RooArgSet *nset);
52  const RooAbsReal *sumFunc(const RooArgSet *nset) const;
53 
54  virtual std::list<Double_t> *plotSamplingHint(RooAbsRealLValue &obs, Double_t xlo, Double_t xhi) const;
55  virtual std::list<Double_t> *binBoundaries(RooAbsRealLValue & /*obs*/, Double_t /*xlo*/, Double_t /*xhi*/) const;
56  Bool_t isBinnedDistribution(const RooArgSet &obs) const;
57 
58 protected:
59  class CacheElem : public RooAbsCacheElement {
60  public:
61  CacheElem(RooAbsReal &sumFunc, RooChangeTracker &tracker, const RooArgList &flist)
62  : _sumFunc(&sumFunc), _tracker(&tracker)
63  {
64  _frac.add(flist);
65  };
67  virtual ~CacheElem();
72 
73  RooRealVar *frac(Int_t i);
74  const RooRealVar *frac(Int_t i) const;
75  void calculateFractions(const RooMomentMorphFunc &self, Bool_t verbose = kTRUE) const;
76  };
77  mutable RooObjCacheManager _cacheMgr; //! The cache manager
78  mutable RooArgSet *_curNormSet; //! Current normalization set
79 
80  friend class CacheElem; // Cache needs to be able to clear _norm pointer
81 
82  Double_t evaluate() const;
83 
84  void initialize();
85  CacheElem *getCache(const RooArgSet *nset) const;
86 
87  inline Int_t ij(const Int_t &i, const Int_t &j) const { return (i * _varList.getSize() + j); }
88  int idxmin(const double &m) const;
89  int idxmax(const double &m) const;
90 
94  mutable TVectorD *_mref;
95 
96  TIterator *_varItr; //! do not persist
98  mutable TMatrixD *_M; //
99 
101 
103 
104  ClassDef(RooMomentMorphFunc, 3) // Your description goes here...
105 };
106 
107 #endif
virtual TObject * clone(const char *newname) const
virtual Bool_t add(const RooAbsArg &var, Bool_t silent=kFALSE)
Add the specified argument to list.
void operModeHook(RooAbsArg::OperMode)
Interface for operation mode change calls.
RooAbsReal * sumFunc(const RooArgSet *nset)
void useHorizontalMorphing(bool val)
int idxmax(const double &m) const
void setMode(const Setting &setting)
int Int_t
Definition: RtypesCore.h:41
bool Bool_t
Definition: RtypesCore.h:59
RooObjCacheManager _cacheMgr
Iterator abstract base class.
Definition: TIterator.h:30
TMatrixT.
Definition: TMatrixDfwd.h:22
#define ClassDef(name, id)
Definition: Rtypes.h:320
Bool_t isBinnedDistribution(const RooArgSet &obs) const
virtual std::list< Double_t > * plotSamplingHint(RooAbsRealLValue &obs, Double_t xlo, Double_t xhi) const
RooRealVar represents a fundamental (non-derived) real valued object.
Definition: RooRealVar.h:36
int idxmin(const double &m) const
Int_t getSize() const
virtual Double_t getVal(const RooArgSet *set=0) const
virtual RooArgList containedArgs(Action)
RooAbsCacheElement is the abstract base class for objects to be stored in RooAbsCache cache manager o...
RooListProxy is the concrete proxy for RooArgList objects.
Definition: RooListProxy.h:25
Int_t ij(const Int_t &i, const Int_t &j) const
double Double_t
Definition: RtypesCore.h:55
RooAbsReal is the common abstract base class for objects that represent a real value and implements f...
Definition: RooAbsReal.h:53
virtual std::list< Double_t > * binBoundaries(RooAbsRealLValue &, Double_t, Double_t) const
Class RooObjCacheManager is an implementation of class RooCacheManager<RooAbsCacheElement> and specia...
CacheElem * getCache(const RooArgSet *nset) const
CacheElem(RooAbsReal &sumFunc, RooChangeTracker &tracker, const RooArgList &flist)
RooChangeTracker is a meta object that tracks value changes in a given set of RooAbsArgs by registeri...
Mother of all ROOT objects.
Definition: TObject.h:37
virtual Bool_t selfNormalized() const
RooAbsRealLValue is the common abstract base class for objects that represent a real value that may a...
RooArgSet * _curNormSet
The cache manager.
RooSetProxy is the concrete proxy for RooArgSet objects.
Definition: RooSetProxy.h:24
RooRealProxy is the concrete proxy for RooAbsReal objects A RooRealProxy is the general mechanism to ...
Definition: RooRealProxy.h:23
Double_t evaluate() const
TIterator * _pdfItr
do not persist
void calculateFractions(const RooMomentMorphFunc &self, Bool_t verbose=kTRUE) const
const Bool_t kTRUE
Definition: RtypesCore.h:87
char name[80]
Definition: TGX11.cxx:109