Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
RooParamHistFunc.h
Go to the documentation of this file.
1/*
2 * Project: RooFit
3 *
4 * Copyright (c) 2023, CERN
5 *
6 * Redistribution and use in source and binary forms,
7 * with or without modification, are permitted according to the terms
8 * listed in LICENSE (http://roofit.sourceforge.net/license.txt)
9 */
10
11#ifndef ROO_PARAM_HIST_FUNC
12#define ROO_PARAM_HIST_FUNC
13
14#include "RooAbsPdf.h"
15#include "RooRealProxy.h"
16#include "RooCategoryProxy.h"
17#include "RooAbsReal.h"
18#include "RooAbsCategory.h"
19#include "RooListProxy.h"
20#include "RooSetProxy.h"
21#include "RooDataHist.h"
22#include <list>
23
24class R__DEPRECATED(6, 46,
25 "Its functionality is too close to the HistFactory classes. Please use the HistFactory class "
26 "ParamHistFunc instead, multiplying it with a RooHistFunc, as shown in the rf709_BarlowBeeston "
27 "tutorial.") RooParamHistFunc : public RooAbsReal {
28public:
29 RooParamHistFunc() {} ;
30 RooParamHistFunc(const char *name, const char *title, RooDataHist &dh, const RooAbsArg &x,
31 const RooParamHistFunc *paramSource = nullptr, bool paramRelative = true);
32 RooParamHistFunc(const RooParamHistFunc& other, const char* name=nullptr) ;
33 TObject* clone(const char* newname=nullptr) const override { return new RooParamHistFunc(*this,newname); }
34
35 std::list<double>* binBoundaries(RooAbsRealLValue& /*obs*/, double /*xlo*/, double /*xhi*/) const override ;
36 std::list<double>* plotSamplingHint(RooAbsRealLValue& obs, double xlo, double xhi) const override ;
37 bool isBinnedDistribution(const RooArgSet&) const override { return true ; }
38
39
40 bool forceAnalyticalInt(const RooAbsArg&) const override { return true ; }
41 Int_t getAnalyticalIntegralWN(RooArgSet& allVars, RooArgSet& analVars, const RooArgSet* normSet,const char* rangeName=nullptr) const override ;
42 double analyticalIntegralWN(Int_t code, const RooArgSet* normSet, const char* rangeName=nullptr) const override ;
43
44 double getActual(Int_t ibin) ;
45 void setActual(Int_t ibin, double newVal) ;
46 double getNominal(Int_t ibin) const ;
47 double getNominalError(Int_t ibin) const ;
48
49 const RooArgList& xList() const { return _x ; }
50 const RooArgList& paramList() const { return _p ; }
51 const RooDataHist& dataHist() const { return _dh ; }
52 bool relParam() const { return _relParam; }
53
54 protected:
55
56 friend class RooHistConstraint ;
57
58 RooListProxy _x ;
59 RooListProxy _p ;
60 RooDataHist _dh ;
61 bool _relParam = false;
62
63 double evaluate() const override ;
64
65private:
66
68};
69
70#endif
#define R__DEPRECATED(MAJOR, MINOR, REASON)
Definition RConfig.hxx:486
#define ClassDefOverride(name, id)
Definition Rtypes.h:347
char name[80]
Definition TGX11.cxx:142
Common abstract base class for objects that represent a value and a "shape" in RooFit.
Definition RooAbsArg.h:77
virtual TObject * clone(const char *newname=nullptr) const =0
Abstract base class for objects that represent a real value that may appear on the left hand side of ...
Abstract base class for objects that represent a real value and implements functionality common to al...
Definition RooAbsReal.h:63
virtual std::list< double > * binBoundaries(RooAbsRealLValue &obs, double xlo, double xhi) const
Retrieve bin boundaries if this distribution is binned in obs.
virtual Int_t getAnalyticalIntegralWN(RooArgSet &allVars, RooArgSet &analVars, const RooArgSet *normSet, const char *rangeName=nullptr) const
Variant of getAnalyticalIntegral that is also passed the normalization set that should be applied to ...
virtual bool forceAnalyticalInt(const RooAbsArg &) const
Definition RooAbsReal.h:170
virtual double evaluate() const =0
Evaluate this PDF / function / constant. Needs to be overridden by all derived classes.
virtual double analyticalIntegralWN(Int_t code, const RooArgSet *normSet, const char *rangeName=nullptr) const
Implements the actual analytical integral(s) advertised by getAnalyticalIntegral.
virtual bool isBinnedDistribution(const RooArgSet &) const
Tests if the distribution is binned. Unless overridden by derived classes, this always returns false.
Definition RooAbsReal.h:343
virtual std::list< double > * plotSamplingHint(RooAbsRealLValue &obs, double xlo, double xhi) const
Interface for returning an optional hint for initial sampling points when constructing a curve projec...
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:24
Container class to hold N-dimensional binned data.
Definition RooDataHist.h:40
Mother of all ROOT objects.
Definition TObject.h:42
Double_t x[n]
Definition legend1.C:17