Logo ROOT  
Reference Guide
No Matches
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"
19#include <string>
20#include <vector>
24 RooNumRunningInt(const char *name, const char *title, RooAbsReal& _func, RooRealVar& _x, const char* binningName="cache");
25 RooNumRunningInt(const RooNumRunningInt& other, const char* name=nullptr) ;
26 TObject* clone(const char* newname) const override { return new RooNumRunningInt(*this,newname); }
27 ~RooNumRunningInt() override ;
31 class RICacheElem: public FuncCacheElem {
32 public:
33 RICacheElem(const RooNumRunningInt& ri, const RooArgSet* nset) ;
35 void calculate(bool cdfmode) ;
36 void addRange(Int_t ixlo, Int_t ixhi, Int_t nbins) ;
37 void addPoint(Int_t ix) ;
40 std::vector<double> _ax ;
41 std::vector<double> _ay ;
44 } ;
46 friend class RICacheElem ;
47 const char* binningName() const override { return _binningName.c_str() ; }
48 FuncCacheElem* createCache(const RooArgSet* nset) const override ;
49 const char* inputBaseName() const override ;
50 RooFit::OwningPtr<RooArgSet> actualObservables(const RooArgSet& nset) const override ;
51 RooFit::OwningPtr<RooArgSet> actualParameters(const RooArgSet& nset) const override ;
52 void fillCacheObject(FuncCacheElem& cacheFunc) const override ;
53 double evaluate() const override ;
55 const char* payloadUniqueSuffix() const override { return func.arg().aggregateCacheUniqueSuffix() ; }
57 RooRealProxy func ; ///< Proxy to functions whose running integral is calculated
58 RooRealProxy x ; ///< Integrated observable
59 std::string _binningName ; ///< Name of binning to be used for cache histogram
63 ClassDefOverride(RooNumRunningInt,1) // Numeric calculator for running integral of a given function
RooAbsReal * _func
Pointer to original input function.
#define ClassDefOverride(name, id)
Definition Rtypes.h:341
char name[80]
Definition TGX11.cxx:110
const char * aggregateCacheUniqueSuffix() const
Abstract base class for functions that need or want to cache their evaluate() output in a RooHistFunc...
Abstract base class for objects that represent a real value and implements functionality common to al...
Definition RooAbsReal.h:59
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:55
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...
Implementation of RooAbsCachedReal that represents a running integral.
TObject * clone(const char *newname) const override
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.
RooFit::OwningPtr< RooArgSet > actualParameters(const RooArgSet &nset) const override
Return the parameters of the cache created by RooAbsCachedPdf.
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.
RooFit::OwningPtr< 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...
~RooNumRunningInt() override
const char * payloadUniqueSuffix() const override
RooRealProxy x
Integrated observable.
void fillCacheObject(FuncCacheElem &cacheFunc) const override
Fill the cache object by calling its calculate() method.
Variable that can be changed from the outside.
Definition RooRealVar.h:37
const T & arg() const
Return reference to object held in proxy.
Mother of all ROOT objects.
Definition TObject.h:41
T * OwningPtr
An alias for raw pointers for indicating that the return type of a RooFit function is an owning point...
Definition Config.h:35