Logo ROOT  
Reference Guide
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=0) ;
31 TObject* clone(const char* newname) const override { return new RooBarlowBeestonLL(*this,newname); }
32 ~RooBarlowBeestonLL() override ;
33
34 // A simple class to store the
35 // necessary objects for a
36 // single gamma in a single channel
38 public:
39 bool hasStatUncert = false;
40 RooRealVar* gamma = nullptr;
42 RooArgSet* bin_center = nullptr; // Snapshot
43 RooRealVar* tau = nullptr;
45 RooAbsReal* sumPdf = nullptr;
46 double nData = -1;
47 double binVolume = 0;
48 void SetBinCenter() const;
49 };
50
52 bool getParameters(const RooArgSet* depList, RooArgSet& outputSet, bool stripDisconnected=true) const override;
53 RooAbsReal& nll() { return const_cast<RooAbsReal&>(_nll.arg()) ; }
54 bool redirectServersHook(const RooAbsCollection& /*newServerList*/,
55 bool /*mustReplaceAll*/,
56 bool /*nameChange*/,
57 bool /*isRecursive*/) override ;
58 void setPdf(RooAbsPdf* pdf) { _pdf = pdf; }
60
61protected:
62
63 RooRealProxy _nll ; ///< Input -log(L) function
66 mutable std::map< std::string, std::vector< BarlowCache > > _barlowCache;
67 mutable std::set< std::string > _statUncertParams;
68 mutable std::map<std::string,bool> _paramFixed ; ///< Parameter constant status at last time of use
69 double evaluate() const override ;
70
71private:
72
73 // Real-valued function representing a Barlow-Beeston minimized profile likelihood of external (likelihood) function
75};
76
77 }
78}
79
80#endif
#define ClassDefOverride(name, id)
Definition: Rtypes.h:339
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
RooAbsCollection is an abstract container object that can hold multiple RooAbsArg objects.
RooAbsData is the common abstract base class for binned and unbinned datasets.
Definition: RooAbsData.h:61
RooAbsReal is the common abstract base class for objects that represent a real value and implements f...
Definition: RooAbsReal.h:64
RooArgSet is a container object that can hold multiple RooAbsArg objects.
Definition: RooArgSet.h:57
RooRealVar represents a variable that can be changed from the outside.
Definition: RooRealVar.h:40
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
bool redirectServersHook(const RooAbsCollection &, bool, bool, bool) override
Function that is called at the end of redirectServers().
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:37
@ HistFactory
Definition: RooGlobalFunc.h:65
Namespace for the RooStats classes.
Definition: Asimov.h:19