CMS 3D CMS Logo

/afs/cern.ch/work/a/aaltunda/public/www/CMSSW_5_3_14/src/HiggsAnalysis/CombinedLimit/interface/VerticalInterpPdf.h

Go to the documentation of this file.
00001 #ifndef ROO_REAL_SUM_PDF_SAFE
00002 #define ROO_REAL_SUM_PDF_SAFE
00003 
00007 #include "RooAbsPdf.h"
00008 #include "RooListProxy.h"
00009 #include "RooAICRegistry.h"
00010 #include "RooObjCacheManager.h"
00011 
00012 class VerticalInterpPdf : public RooAbsPdf {
00013 public:
00014 
00015   VerticalInterpPdf() ;
00016   VerticalInterpPdf(const char *name, const char *title, const RooArgList& funcList, const RooArgList& coefList, Double_t quadraticRegion=0., Int_t quadraticAlgo=0) ;
00017   VerticalInterpPdf(const VerticalInterpPdf& other, const char* name=0) ;
00018   virtual TObject* clone(const char* newname) const { return new VerticalInterpPdf(*this,newname) ; }
00019   virtual ~VerticalInterpPdf() ;
00020 
00021   Double_t evaluate() const ;
00022   virtual Bool_t checkObservables(const RooArgSet* nset) const ;        
00023 
00024   virtual Bool_t forceAnalyticalInt(const RooAbsArg&) const { return kTRUE ; }
00025   Int_t getAnalyticalIntegralWN(RooArgSet& allVars, RooArgSet& numVars, const RooArgSet* normSet, const char* rangeName=0) const ;
00026   Double_t analyticalIntegralWN(Int_t code, const RooArgSet* normSet, const char* rangeName=0) const ;
00027 
00028   const RooArgList& funcList() const { return _funcList ; }
00029   const RooArgList& coefList() const { return _coefList ; }
00030 
00031 protected:
00032   
00033   class CacheElem : public RooAbsCacheElement {
00034   public:
00035     CacheElem()  {} ;
00036     virtual ~CacheElem() {} ; 
00037     virtual RooArgList containedArgs(Action) { RooArgList ret(_funcIntList) ; ret.add(_funcNormList) ; return ret ; }
00038     RooArgList _funcIntList ;
00039     RooArgList _funcNormList ;
00040   } ;
00041   mutable RooObjCacheManager _normIntMgr ; // The integration cache manager
00042 
00043   RooListProxy _funcList ;   //  List of component FUNCs
00044   RooListProxy _coefList ;  //  List of coefficients
00045   Double_t     _quadraticRegion;
00046   Int_t        _quadraticAlgo;
00047   TIterator* _funcIter ;     
00048   TIterator* _coefIter ;    
00049 
00050   Double_t interpolate(Double_t coeff, Double_t central, RooAbsReal *fUp, RooAbsReal *fDown) const ; 
00051 
00052 private:
00053 
00054   ClassDef(VerticalInterpPdf,2) // PDF constructed from a sum of (non-pdf) functions
00055 };
00056 
00057 #endif