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, bool paramRelative=true);
28 RooParamHistFunc(const char *name, const char *title, const RooAbsArg& x, RooDataHist& dh, bool paramRelative=true);
29 RooParamHistFunc(const char *name, const char *title, RooDataHist& dh, const RooParamHistFunc& paramSource, bool paramRelative=true) ;
30 RooParamHistFunc(const RooParamHistFunc& other, const char* name=nullptr) ;
31 TObject* clone(const char* newname) const override { return new RooParamHistFunc(*this,newname); }
32
33 std::list<double>* binBoundaries(RooAbsRealLValue& /*obs*/, double /*xlo*/, double /*xhi*/) const override ;
34 std::list<double>* plotSamplingHint(RooAbsRealLValue& obs, double xlo, double xhi) const override ;
35 bool isBinnedDistribution(const RooArgSet&) const override { return true ; }
36
37
38 bool forceAnalyticalInt(const RooAbsArg&) const override { return true ; }
39 Int_t getAnalyticalIntegralWN(RooArgSet& allVars, RooArgSet& analVars, const RooArgSet* normSet,const char* rangeName=nullptr) const override ;
40 double analyticalIntegralWN(Int_t code, const RooArgSet* normSet, const char* rangeName=nullptr) const override ;
41
42 double getActual(Int_t ibin) ;
43 void setActual(Int_t ibin, double newVal) ;
44 double getNominal(Int_t ibin) const ;
45 double getNominalError(Int_t ibin) const ;
46
47 const RooArgList& paramList() const { return _p ; }
48
49 void translate(RooFit::Detail::CodeSquashContext &ctx) const override;
50
51 protected:
52
53 friend class RooHistConstraint ;
54
58 bool _relParam ;
59
60 double evaluate() const override ;
61
62private:
63
65};
66
67#endif
#define ClassDefOverride(name, id)
Definition Rtypes.h:341
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:77
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:55
Container class to hold N-dimensional binned data.
Definition RooDataHist.h:39
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 ...
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.
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...
Mother of all ROOT objects.
Definition TObject.h:41
Double_t x[n]
Definition legend1.C:17