RooMomentMorph.h

Go to the documentation of this file.
00001 /*****************************************************************************
00002  * Project: RooFit                                                           *
00003  *                                                                           *
00004   * This code was autogenerated by RooClassFactory                            * 
00005  *****************************************************************************/
00006 
00007 #ifndef ROOMOMENTMORPH
00008 #define ROOMOMENTMORPH
00009 
00010 #include "RooAbsPdf.h"
00011 #include "RooRealProxy.h"
00012 #include "RooCategoryProxy.h"
00013 #include "RooAbsReal.h"
00014 #include "RooAbsCategory.h"
00015 #include "RooSetProxy.h"
00016 #include "RooListProxy.h"
00017 #include "RooArgList.h"
00018 
00019 #include "TMatrixD.h"
00020 #include "TVectorD.h"
00021 
00022 #include <vector>
00023 #include <string>
00024 class RooChangeTracker ;
00025 
00026 class RooMomentMorph : public RooAbsPdf {
00027 public:
00028 
00029   enum Setting { Linear, NonLinear, NonLinearPosFractions, NonLinearLinFractions } ;
00030 
00031   RooMomentMorph() ;
00032 
00033   RooMomentMorph(const char *name, const char *title, RooAbsReal& _m, const RooArgList& varList,
00034                const RooArgList& pdfList, const RooArgList& mrefList, const Setting& setting = NonLinearPosFractions);
00035   RooMomentMorph(const char *name, const char *title, RooAbsReal& _m, const RooArgList& varList,
00036                const RooArgList& pdfList, const TVectorD& mrefpoints, const Setting& setting = NonLinearPosFractions );
00037   RooMomentMorph(const RooMomentMorph& other, const char* name=0) ;
00038   virtual TObject* clone(const char* newname) const { return new RooMomentMorph(*this,newname); }
00039   virtual ~RooMomentMorph();
00040 
00041   void     setMode(const Setting& setting) { _setting = setting; }
00042 
00043   virtual Bool_t selfNormalized() const { 
00044     // P.d.f is self normalized
00045     return kTRUE ; 
00046   }
00047 
00048   virtual Double_t getVal(const RooArgSet* set=0) const ;
00049   RooAbsPdf* sumPdf(const RooArgSet* nset) ;
00050 
00051 protected:
00052 
00053   class CacheElem : public RooAbsCacheElement {
00054   public:
00055     CacheElem(RooAbsPdf& sumPdf, RooChangeTracker& tracker, RooArgList flist) : _sumPdf(&sumPdf), _tracker(&tracker) { _frac.add(flist) ; } ;
00056     void operModeHook(RooAbsArg::OperMode) {};
00057     virtual ~CacheElem() ; 
00058     virtual RooArgList containedArgs(Action) ;
00059     RooAbsPdf* _sumPdf ;
00060     RooChangeTracker* _tracker ; 
00061     RooArgList _frac ;
00062 
00063     RooRealVar* frac(Int_t i ) ;
00064     const RooRealVar* frac(Int_t i ) const ; 
00065     void calculateFractions(const RooMomentMorph& self, Bool_t verbose=kTRUE) const;
00066   } ;
00067   mutable RooObjCacheManager _cacheMgr ; //! The cache manager
00068   mutable RooArgSet* _curNormSet ; //! Current normalization set
00069 
00070   friend class CacheElem ; // Cache needs to be able to clear _norm pointer
00071 
00072   Double_t evaluate() const ;
00073 
00074   void     initialize();
00075   CacheElem* getCache(const RooArgSet* nset) const ;
00076 
00077   inline   Int_t ij(const Int_t& i, const Int_t& j) const { return (i*_varList.getSize()+j); }
00078   int      idxmin(const double& m) const;
00079   int      idxmax(const double& m) const;
00080 
00081   RooRealProxy m ;
00082   RooSetProxy  _varList ;
00083   RooListProxy _pdfList ;
00084   mutable TVectorD* _mref;
00085 
00086   TIterator* _varItr ;   //! do not persist
00087   TIterator* _pdfItr ;   //!
00088   mutable TMatrixD* _M; //
00089 
00090   Setting _setting;
00091 
00092   ClassDef(RooMomentMorph,1) // Your description goes here...
00093 };
00094  
00095 #endif
00096 
00097 

Generated on Tue Jul 5 14:26:14 2011 for ROOT_528-00b_version by  doxygen 1.5.1