Logo ROOT  
Reference Guide
Go to the documentation of this file.
2 * Project: RooFit *
3 * *
4 * Copyright (c) 2000-2005, Regents of the University of California *
5 * and Stanford University. All rights reserved. *
6 * *
7 * Redistribution and use in source and binary forms, *
8 * with or without modification, are permitted according to the terms *
9 * listed in LICENSE (http://roofit.sourceforge.net/license.txt) *
10 *****************************************************************************/
15#include "RooAbsCachedReal.h"
16#include "RooRealProxy.h"
17#include "RooAbsReal.h"
18#include <string>
22 RooNumRunningInt(const char *name, const char *title, RooAbsReal& _func, RooRealVar& _x, const char* binningName="cache");
23 RooNumRunningInt(const RooNumRunningInt& other, const char* name=0) ;
24 TObject* clone(const char* newname) const override { return new RooNumRunningInt(*this,newname); }
25 ~RooNumRunningInt() override ;
29 class RICacheElem: public FuncCacheElem {
30 public:
31 RICacheElem(const RooNumRunningInt& ri, const RooArgSet* nset) ;
32 ~RICacheElem() override ;
34 void calculate(bool cdfmode) ;
35 void addRange(Int_t ixlo, Int_t ixhi, Int_t nbins) ;
36 void addPoint(Int_t ix) ;
39 double* _ax ;
40 double* _ay ;
43 } ;
45 friend class RICacheElem ;
46 const char* binningName() const override { return _binningName.c_str() ; }
47 FuncCacheElem* createCache(const RooArgSet* nset) const override ;
48 const char* inputBaseName() const override ;
49 RooArgSet* actualObservables(const RooArgSet& nset) const override ;
50 RooArgSet* actualParameters(const RooArgSet& nset) const override ;
51 void fillCacheObject(FuncCacheElem& cacheFunc) const override ;
52 double evaluate() const override ;
54 const char* payloadUniqueSuffix() const override { return func.arg().aggregateCacheUniqueSuffix() ; }
56 RooRealProxy func ; ///< Proxy to functions whose running integral is calculated
57 RooRealProxy x ; ///< Intergrated observable
58 std::string _binningName ; ///< Name of binning to be used for cache histogram
62 ClassDefOverride(RooNumRunningInt,1) // Numeric calculator for running integral of a given function
#define ClassDefOverride(name, id)
Definition: Rtypes.h:339
char name[80]
Definition: TGX11.cxx:110
const char * aggregateCacheUniqueSuffix() const
Definition: RooAbsArg.cxx:2276
RooAbsCachedReal is the abstract base class for functions that need or want to cache their evaluate()...
friend class FuncCacheElem
RooAbsReal is the common abstract base class for objects that represent a real value and implements f...
Definition: RooAbsReal.h:64
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:57
~RICacheElem() override
void addRange(Int_t ixlo, Int_t ixhi, Int_t nbins)
Fill all empty histogram bins in the range [ixlo,ixhi] where nbins is the total number of histogram b...
RooArgList containedArgs(Action) override
Return all RooAbsArg components contained in cache element.
void addPoint(Int_t ix)
Sample function at bin ix.
void calculate(bool cdfmode)
Calculate the numeric running integral and store the result in the cache histogram provided by RooAbs...
RICacheElem(const RooNumRunningInt &ri, const RooArgSet *nset)
Construct RunningIntegral CacheElement.
Class RooNumRunningInt is an implementation of RooAbsCachedReal that represents a running integral.
TObject * clone(const char *newname) const override
RooNumRunningInt(const char *name, const char *title, RooAbsReal &_func, RooRealVar &_x, const char *binningName="cache")
Construct running integral of function '_func' over x_print from the lower bound on _x to the present...
const char * binningName() const override
std::string _binningName
Name of binning to be used for cache histogram.
double evaluate() const override
Dummy function that is never called.
const char * inputBaseName() const override
Return unique name for RooAbsCachedPdf cache components constructed from input function name.
RooRealProxy func
Proxy to functions whose running integral is calculated.
FuncCacheElem * createCache(const RooArgSet *nset) const override
Create custom cache element for running integral calculations.
~RooNumRunningInt() override
const char * payloadUniqueSuffix() const override
RooArgSet * actualParameters(const RooArgSet &nset) const override
Return the parameters of the cache created by RooAbsCachedPdf.
RooArgSet * actualObservables(const RooArgSet &nset) const override
Return observable in nset to be cached by RooAbsCachedPdf this is always the x observable that is int...
RooRealProxy x
Intergrated observable.
void fillCacheObject(FuncCacheElem &cacheFunc) const override
Fill the cache object by calling its calculate() method.
RooRealVar represents a variable that can be changed from the outside.
Definition: RooRealVar.h:40
const T & arg() const
Return reference to object held in proxy.
Mother of all ROOT objects.
Definition: TObject.h:37