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
29 RooBarlowBeestonLL(const char *name, const char *title, RooAbsReal& nll /*, const RooArgSet& observables*/);
30 RooBarlowBeestonLL(const RooBarlowBeestonLL& other, const char* name=nullptr) ;
31 TObject* clone(const char* newname) const override { return new RooBarlowBeestonLL(*this,newname); }
32
33 // A simple class to store the
34 // necessary objects for a
35 // single gamma in a single channel
37 public:
38 bool hasStatUncert = false;
39 RooRealVar* gamma = nullptr;
41 RooArgSet* bin_center = nullptr; // Snapshot
42 RooRealVar* tau = nullptr;
44 RooAbsReal* sumPdf = nullptr;
45 double nData = -1;
46 double binVolume = 0;
47 void SetBinCenter() const;
48 };
49
51 bool getParameters(const RooArgSet* depList, RooArgSet& outputSet, bool stripDisconnected=true) const override;
52 RooAbsReal& nll() { return const_cast<RooAbsReal&>(_nll.arg()) ; }
53 void setPdf(RooAbsPdf* pdf) { _pdf = pdf; }
55
56protected:
57
58 RooRealProxy _nll ; ///< Input -log(L) function
59 RooAbsPdf* _pdf = nullptr;
60 RooAbsData* _data = nullptr;
61 mutable std::map< std::string, std::vector< BarlowCache > > _barlowCache;
62 mutable std::set< std::string > _statUncertParams;
63 mutable std::map<std::string,bool> _paramFixed ; ///< Parameter constant status at last time of use
64 double evaluate() const override ;
65
66private:
67
68 // Real-valued function representing a Barlow-Beeston minimized profile likelihood of external (likelihood) function
70};
71
72 }
73}
74
75#endif
#define ClassDefOverride(name, id)
Definition Rtypes.h:341
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:55
RooRealVar represents a 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
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 Asimov.h:19