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=0) ;
31 virtual TObject* clone(const char* newname) const { return new RooBarlowBeestonLL(*this,newname); }
32 virtual ~RooBarlowBeestonLL() ;
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;
53 RooAbsReal& nll() { return const_cast<RooAbsReal&>(_nll.arg()) ; }
54 virtual bool redirectServersHook(const RooAbsCollection& /*newServerList*/,
55 bool /*mustReplaceAll*/,
56 bool /*nameChange*/,
57 bool /*isRecursive*/) ;
58 void setPdf(RooAbsPdf* pdf) { _pdf = pdf; }
59 void setDataset(RooAbsData* data) { _data = data; }
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_t evaluate() const ;
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
double Double_t
Definition RtypesCore.h:59
#define ClassDef(name, id)
Definition Rtypes.h:325
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:82
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:35
RooRealVar represents a variable that can be changed from the outside.
Definition RooRealVar.h:39
Class RooBarlowBeestonLL implements the profile likelihood estimator for a given likelihood and set o...
bool getParameters(const RooArgSet *depList, RooArgSet &outputSet, bool stripDisconnected=true) const
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
Double_t evaluate() const
Optimized implementation of createProfile for profile likelihoods.
virtual TObject * clone(const char *newname) const
virtual bool redirectServersHook(const RooAbsCollection &, bool, bool, bool)
Function that is called at the end of redirectServers().
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