Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
RooHistConstraint.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 ROOHISTCONSTRAINT
12#define ROOHISTCONSTRAINT
13
14#include <RooAbsPdf.h>
15#include <RooListProxy.h>
16
17class R__DEPRECATED(6, 46,
18 "Its functionality is too close to the HistFactory classes. Please constrain the parameters of "
19 "the HistFactory class ParamHistFunc with one RooPoisson per bin instead, as shown in the "
20 "rf709_BarlowBeeston tutorial.") RooHistConstraint : public RooAbsPdf {
21public:
23 RooHistConstraint(const char *name, const char *title, const RooArgSet& phfSet, int threshold=1000000);
24 RooHistConstraint(const RooHistConstraint& other, const char* name=nullptr) ;
25 TObject* clone(const char* newname=nullptr) const override { return new RooHistConstraint(*this,newname); }
26
27 double getLogVal(const RooArgSet* set=nullptr) const override ;
28
29 /// It makes only sense to use the RooHistConstraint when normalized over the
30 /// set of all gammas, in which case it is self-normalized because the used
31 /// TMath::Poisson function is normalized.
32 bool selfNormalized() const override { return true; }
33
34protected:
35
36 RooListProxy _gamma ;
37 RooListProxy _nominal ;
38 bool _relParam = false;
39
40 double evaluate() const override ;
41
42private:
43
45};
46
47#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
virtual TObject * clone(const char *newname=nullptr) const =0
Abstract interface for all probability density functions.
Definition RooAbsPdf.h:32
virtual bool selfNormalized() const
Shows if a PDF is self-normalized, which means that no attempt is made to add a normalization term.
Definition RooAbsPdf.h:203
virtual double getLogVal(const RooArgSet *set=nullptr) const
Return the log of the current value with given normalization An error message is printed if the argum...
virtual double evaluate() const =0
Evaluate this PDF / function / constant. Needs to be overridden by all derived classes.
RooArgSet is a container object that can hold multiple RooAbsArg objects.
Definition RooArgSet.h:24
Mother of all ROOT objects.
Definition TObject.h:42