RooNumRunningInt.h

Go to the documentation of this file.
00001 /*****************************************************************************
00002  * Project: RooFit                                                           *
00003  *                                                                           *
00004  * Copyright (c) 2000-2005, Regents of the University of California          *
00005  *                          and Stanford University. All rights reserved.    *
00006  *                                                                           *
00007  * Redistribution and use in source and binary forms,                        *
00008  * with or without modification, are permitted according to the terms        *
00009  * listed in LICENSE (http://roofit.sourceforge.net/license.txt)             *
00010  *****************************************************************************/
00011 
00012 #ifndef ROONUMRUNNINGINT
00013 #define ROONUMRUNNINGINT
00014 
00015 #include "RooAbsCachedReal.h"
00016 #include "RooRealProxy.h"
00017 #include "RooAbsReal.h"
00018 
00019 
00020 class RooNumRunningInt : public RooAbsCachedReal {
00021 public:
00022   RooNumRunningInt(const char *name, const char *title, RooAbsReal& _func, RooRealVar& _x, const char* binningName="cache");
00023   RooNumRunningInt(const RooNumRunningInt& other, const char* name=0) ;
00024   virtual TObject* clone(const char* newname) const { return new RooNumRunningInt(*this,newname); }
00025   virtual ~RooNumRunningInt() ;
00026 
00027 protected:
00028 
00029   class RICacheElem: public FuncCacheElem {
00030   public:
00031     RICacheElem(const RooNumRunningInt& ri, const RooArgSet* nset) ;
00032     ~RICacheElem() ;
00033     virtual RooArgList containedArgs(Action) ;
00034     void calculate(Bool_t cdfmode) ;
00035     void addRange(Int_t ixlo, Int_t ixhi, Int_t nbins) ;
00036     void addPoint(Int_t ix) ;
00037 
00038     RooNumRunningInt* _self ;
00039     Double_t* _ax ;
00040     Double_t* _ay ;    
00041     RooRealVar* _xx ; 
00042 
00043   } ;
00044 
00045   friend class RICacheElem ;
00046   virtual const char* binningName() const { return _binningName.c_str() ; }
00047   virtual FuncCacheElem* createCache(const RooArgSet* nset) const ;
00048   virtual const char* inputBaseName() const ; 
00049   virtual RooArgSet* actualObservables(const RooArgSet& nset) const ;
00050   virtual RooArgSet* actualParameters(const RooArgSet& nset) const ;
00051   virtual void fillCacheObject(FuncCacheElem& cacheFunc) const ;
00052   virtual Double_t evaluate() const ;
00053 
00054   virtual const char* payloadUniqueSuffix() const { return func.arg().aggregateCacheUniqueSuffix() ; }
00055   
00056   RooRealProxy func ; // Proxy to functions whose running integral is calculated
00057   RooRealProxy x   ; // Intergrated observable
00058   std::string _binningName ; // Name of binning to be used for cache histogram
00059 
00060 private:
00061 
00062   ClassDef(RooNumRunningInt,1) // Numeric calculator for running integral of a given function
00063 
00064 };
00065  
00066 #endif

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