Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
RooBarlowBeestonLL.h
Go to the documentation of this file.
1// @(#)root/roostats:$Id$
2// Author: George Lewis, Kyle Cranmer
3/*************************************************************************
4 * Copyright (C) 1995-2008, Rene Brun and Fons Rademakers. *
5 * All rights reserved. *
6 * *
7 * For the licensing terms see $ROOTSYS/LICENSE. *
8 * For the list of contributors see $ROOTSYS/README/CREDITS. *
9 *************************************************************************/
10
11#ifndef ROOBARLOWBEESTONLL
12#define ROOBARLOWBEESTONLL
13
14#include "RooAbsReal.h"
15#include "RooRealProxy.h"
16#include "RooSetProxy.h"
17#include <map>
18#include <set>
19#include <string>
20#include <vector>
21
22namespace RooStats{
23 namespace HistFactory{
24
26public:
27
28 RooBarlowBeestonLL(const char *name, const char *title, RooAbsReal& nll /*, const RooArgSet& observables*/);
29 RooBarlowBeestonLL(const RooBarlowBeestonLL& other, const char* name=nullptr) ;
30 TObject* clone(const char* newname) const override { return new RooBarlowBeestonLL(*this,newname); }
31
32 // A simple class to store the
33 // necessary objects for a
34 // single gamma in a single channel
36 public:
37 bool hasStatUncert = false;
38 RooRealVar* gamma = nullptr;
40 RooArgSet* bin_center = nullptr; // Snapshot
41 RooRealVar* tau = nullptr;
43 RooAbsReal* sumPdf = nullptr;
44 double nData = -1;
45 double binVolume = 0;
46 void SetBinCenter() const;
47 };
48
50 bool getParameters(const RooArgSet* depList, RooArgSet& outputSet, bool stripDisconnected=true) const override;
51 RooAbsReal& nll() { return const_cast<RooAbsReal&>(_nll.arg()) ; }
52 void setPdf(RooAbsPdf* pdf) { _pdf = pdf; }
54
55protected:
56
57 RooRealProxy _nll ; ///< Input -log(L) function
58 RooAbsPdf* _pdf = nullptr;
59 RooAbsData* _data = nullptr;
60 mutable std::map< std::string, std::vector< BarlowCache > > _barlowCache;
61 mutable std::set< std::string > _statUncertParams;
62 mutable std::map<std::string,bool> _paramFixed ; ///< Parameter constant status at last time of use
63 double evaluate() const override ;
64
65private:
66
67 // Real-valued function representing a Barlow-Beeston minimized profile likelihood of external (likelihood) function
69};
70
71 }
72}
73
74#endif
#define ClassDefOverride(name, id)
Definition Rtypes.h:346
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void data
char name[80]
Definition TGX11.cxx:110
Abstract base class for binned and unbinned datasets.
Definition RooAbsData.h:57
Abstract interface for all probability density functions.
Definition RooAbsPdf.h:40
Abstract base class for objects that represent a real value and implements functionality common to al...
Definition RooAbsReal.h:59
RooArgSet is a container object that can hold multiple RooAbsArg objects.
Definition RooArgSet.h:24
Variable that can be changed from the outside.
Definition RooRealVar.h:37
Class RooBarlowBeestonLL implements the profile likelihood estimator for a given likelihood and set o...
double evaluate() const override
Optimized implementation of createProfile for profile likelihoods.
bool getParameters(const RooArgSet *depList, RooArgSet &outputSet, bool stripDisconnected=true) const override
Fills a list with leaf nodes in the arg tree starting with ourself as top node that don't match any o...
std::map< std::string, bool > _paramFixed
Parameter constant status at last time of use.
std::map< std::string, std::vector< BarlowCache > > _barlowCache
TObject * clone(const char *newname) const override
RooBarlowBeestonLL(const char *name, const char *title, RooAbsReal &nll)
RooRealProxy _nll
Input -log(L) function.
const T & arg() const
Return reference to object held in proxy.
Mother of all ROOT objects.
Definition TObject.h:41
Namespace for the RooStats classes.
Definition CodegenImpl.h:58