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
25public:
27 RooParamHistFunc(const char *name, const char *title, RooDataHist &dh, const RooAbsArg &x,
28 const RooParamHistFunc *paramSource = nullptr, bool paramRelative = true);
29 RooParamHistFunc(const RooParamHistFunc& other, const char* name=nullptr) ;
30 TObject* clone(const char* newname) const override { return new RooParamHistFunc(*this,newname); }
31
32 std::list<double>* binBoundaries(RooAbsRealLValue& /*obs*/, double /*xlo*/, double /*xhi*/) const override ;
33 std::list<double>* plotSamplingHint(RooAbsRealLValue& obs, double xlo, double xhi) const override ;
34 bool isBinnedDistribution(const RooArgSet&) const override { return true ; }
35
36
37 bool forceAnalyticalInt(const RooAbsArg&) const override { return true ; }
38 Int_t getAnalyticalIntegralWN(RooArgSet& allVars, RooArgSet& analVars, const RooArgSet* normSet,const char* rangeName=nullptr) const override ;
39 double analyticalIntegralWN(Int_t code, const RooArgSet* normSet, const char* rangeName=nullptr) const override ;
40
41 double getActual(Int_t ibin) ;
42 void setActual(Int_t ibin, double newVal) ;
43 double getNominal(Int_t ibin) const ;
44 double getNominalError(Int_t ibin) const ;
45
46 const RooArgList& paramList() const { return _p ; }
47
48 void translate(RooFit::Detail::CodeSquashContext &ctx) const override;
49
50 protected:
51
52 friend class RooHistConstraint ;
53
57 bool _relParam ;
58
59 double evaluate() const override ;
60
61private:
62
64};
65
66#endif
#define ClassDefOverride(name, id)
Definition Rtypes.h:346
char name[80]
Definition TGX11.cxx:110
Common abstract base class for objects that represent a value and a "shape" in RooFit.
Definition RooAbsArg.h:79
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: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:24
Container class to hold N-dimensional binned data.
Definition RooDataHist.h:40
A class to maintain the context for squashing of RooFit models into code.
The RooHistConstraint implements constraint terms for a binned PDF with statistical uncertainties.
A histogram function that assigns scale parameters to every bin.
void setActual(Int_t ibin, double newVal)
double evaluate() const override
Evaluate this PDF / function / constant. Needs to be overridden by all derived classes.
const RooArgList & paramList() const
double getNominalError(Int_t ibin) const
double getActual(Int_t ibin)
TObject * clone(const char *newname) const override
double analyticalIntegralWN(Int_t code, const RooArgSet *normSet, const char *rangeName=nullptr) const override
Implement analytical integrations by doing appropriate weighting from component integrals functions t...
double getNominal(Int_t ibin) const
bool forceAnalyticalInt(const RooAbsArg &) const override
void translate(RooFit::Detail::CodeSquashContext &ctx) const override
This function defines a translation for each RooAbsReal based object that can be used to express the ...
std::list< double > * plotSamplingHint(RooAbsRealLValue &obs, double xlo, double xhi) const override
Return sampling hint for making curves of (projections) of this function as the recursive division st...
bool isBinnedDistribution(const RooArgSet &) const override
Tests if the distribution is binned. Unless overridden by derived classes, this always returns false.
std::list< double > * binBoundaries(RooAbsRealLValue &, double, double) const override
Return sampling hint for making curves of (projections) of this function as the recursive division st...
Int_t getAnalyticalIntegralWN(RooArgSet &allVars, RooArgSet &analVars, const RooArgSet *normSet, const char *rangeName=nullptr) const override
Advertise that all integrals can be handled internally.
Mother of all ROOT objects.
Definition TObject.h:41
Double_t x[n]
Definition legend1.C:17