Logo ROOT  
Reference Guide
MCMCInterval.h
Go to the documentation of this file.
1 // @(#)root/roostats:$Id$
2 // Authors: Kevin Belasco 17/06/2009
3 // Authors: Kyle Cranmer 17/06/2009
4 /*************************************************************************
5  * Copyright (C) 1995-2008, Rene Brun and Fons Rademakers. *
6  * All rights reserved. *
7  * *
8  * For the licensing terms see $ROOTSYS/LICENSE. *
9  * For the list of contributors see $ROOTSYS/README/CREDITS. *
10  *************************************************************************/
11 
12 #ifndef RooStats_MCMCInterval
13 #define RooStats_MCMCInterval
14 
15 #include "Rtypes.h"
16 
17 #include "RooStats/ConfInterval.h"
18 #include "RooArgSet.h"
19 #include "RooArgList.h"
20 #include "RooStats/MarkovChain.h"
21 
22 #include <vector>
23 
24 class RooNDKeysPdf;
25 class RooProduct;
26 
27 
28 namespace RooStats {
29 
30  class Heaviside;
31 
32  class MCMCInterval : public ConfInterval {
33 
34 
35  public:
36 
37  /// default constructor
38  explicit MCMCInterval(const char* name = 0);
39 
40  /// constructor from parameter of interest and Markov chain object
41  MCMCInterval(const char* name, const RooArgSet& parameters,
42  MarkovChain& chain);
43 
44  enum {DEFAULT_NUM_BINS = 50};
46 
47  virtual ~MCMCInterval();
48 
49  /// determine whether this point is in the confidence interval
50  virtual Bool_t IsInInterval(const RooArgSet& point) const;
51 
52  /// set the desired confidence level (see GetActualConfidenceLevel())
53  /// Note: calling this function triggers the algorithm that determines
54  /// the interval, so call this after initializing all other aspects
55  /// of this IntervalCalculator
56  /// Also, calling this function again with a different confidence level
57  /// re-triggers the calculation of the interval
58  virtual void SetConfidenceLevel(Double_t cl);
59 
60  /// get the desired confidence level (see GetActualConfidenceLevel())
61  virtual Double_t ConfidenceLevel() const {return fConfidenceLevel;}
62 
63  /// return a set containing the parameters of this interval
64  /// the caller owns the returned RooArgSet*
65  virtual RooArgSet* GetParameters() const;
66 
67  /// get the cutoff bin height for being considered in the
68  /// confidence interval
69  virtual Double_t GetHistCutoff();
70 
71  /// get the cutoff RooNDKeysPdf value for being considered in the
72  /// confidence interval
73  virtual Double_t GetKeysPdfCutoff();
74  ///virtual Double_t GetKeysPdfCutoff() { return fKeysCutoff; }
75 
76  /// get the actual value of the confidence level for this interval.
78 
79  /// whether the specified confidence level is a floor for the actual
80  /// confidence level (strict), or a ceiling (not strict)
81  virtual void SetHistStrict(Bool_t isHistStrict)
82  { fIsHistStrict = isHistStrict; }
83 
84  /// check if parameters are correct. (dummy implementation to start)
85  Bool_t CheckParameters(const RooArgSet& point) const;
86 
87  /// Set the parameters of interest for this interval
88  /// and change other internal data members accordingly
89  virtual void SetParameters(const RooArgSet& parameters);
90 
91  /// Set the MarkovChain that this interval is based on
92  virtual void SetChain(MarkovChain& chain) { fChain = &chain; }
93 
94  /// Set which parameters go on which axis. The first list element
95  /// goes on the x axis, second (if it exists) on y, third (if it
96  /// exists) on z, etc
97  virtual void SetAxes(RooArgList& axes);
98 
99  /// return a list of RooRealVars representing the axes
100  /// you own the returned RooArgList
101  virtual RooArgList* GetAxes()
102  {
103  RooArgList* axes = new RooArgList();
104  for (Int_t i = 0; i < fDimension; i++)
105  axes->addClone(*fAxes[i]);
106  return axes;
107  }
108 
109  /// get the lowest value of param that is within the confidence interval
110  virtual Double_t LowerLimit(RooRealVar& param);
111 
112  /// determine lower limit of the lower confidence interval
114 
115  /// get the lower limit of param in the shortest confidence interval
116  /// Note that this works better for some distributions (ones with exactly
117  /// one maximum) than others, and sometimes has little value.
118  virtual Double_t LowerLimitShortest(RooRealVar& param);
119 
120  /// determine lower limit in the shortest interval by using keys pdf
121  virtual Double_t LowerLimitByKeys(RooRealVar& param);
122 
123  /// determine lower limit using histogram
124  virtual Double_t LowerLimitByHist(RooRealVar& param);
125 
126  /// determine lower limit using histogram
128 
129  /// determine lower limit using histogram
130  virtual Double_t LowerLimitByDataHist(RooRealVar& param);
131 
132  /// get the highest value of param that is within the confidence interval
133  virtual Double_t UpperLimit(RooRealVar& param);
134 
135  /// determine upper limit of the lower confidence interval
137 
138  /// get the upper limit of param in the confidence interval
139  /// Note that this works better for some distributions (ones with exactly
140  /// one maximum) than others, and sometimes has little value.
141  virtual Double_t UpperLimitShortest(RooRealVar& param);
142 
143  /// determine upper limit in the shortest interval by using keys pdf
144  virtual Double_t UpperLimitByKeys(RooRealVar& param);
145 
146  /// determine upper limit using histogram
147  virtual Double_t UpperLimitByHist(RooRealVar& param);
148 
149  /// determine upper limit using histogram
151 
152  /// determine upper limit using histogram
153  virtual Double_t UpperLimitByDataHist(RooRealVar& param);
154 
155  /// Determine the approximate maximum value of the Keys PDF
157 
158  /// set the number of steps in the chain to discard as burn-in,
159  /// starting from the first
160  virtual void SetNumBurnInSteps(Int_t numBurnInSteps)
161  { fNumBurnInSteps = numBurnInSteps; }
162 
163  /// set whether to use kernel estimation to determine the interval
164  virtual void SetUseKeys(Bool_t useKeys) { fUseKeys = useKeys; }
165 
166  /// set whether to use a sparse histogram. you MUST also call
167  /// SetUseKeys(kFALSE) to use a histogram.
168  virtual void SetUseSparseHist(Bool_t useSparseHist)
169  { fUseSparseHist = useSparseHist; }
170 
171  /// get whether we used kernel estimation to determine the interval
172  virtual Bool_t GetUseKeys() { return fUseKeys; }
173 
174  /// get the number of steps in the chain to discard as burn-in,
175 
176  /// get the number of steps in the chain to discard as burn-in,
177  /// starting from the first
179 
180  /// set the number of bins to use (same for all axes, for now)
181  ///virtual void SetNumBins(Int_t numBins);
182 
183  /// Get a clone of the histogram of the posterior
184  virtual TH1* GetPosteriorHist();
185 
186  /// Get a clone of the keys pdf of the posterior
188 
189  /// Get a clone of the (keyspdf * heaviside) product of the posterior
191 
192  /// Get the number of parameters of interest in this interval
193  virtual Int_t GetDimension() const { return fDimension; }
194 
195  /// Get the markov chain on which this interval is based
196  /// You do not own the returned MarkovChain*
197  virtual const MarkovChain* GetChain() { return fChain; }
198 
199  /// Get a clone of the markov chain on which this interval is based
200  /// as a RooDataSet. You own the returned RooDataSet*
201  virtual RooDataSet* GetChainAsDataSet(RooArgSet* whichVars = NULL)
202  { return fChain->GetAsDataSet(whichVars); }
203 
204  /// Get the markov chain on which this interval is based
205  /// as a RooDataSet. You do not own the returned RooDataSet*
207  { return fChain->GetAsConstDataSet(); }
208 
209  /// Get a clone of the markov chain on which this interval is based
210  /// as a RooDataHist. You own the returned RooDataHist*
211  virtual RooDataHist* GetChainAsDataHist(RooArgSet* whichVars = NULL)
212  { return fChain->GetAsDataHist(whichVars); }
213 
214  /// Get a clone of the markov chain on which this interval is based
215  /// as a THnSparse. You own the returned THnSparse*
216  virtual THnSparse* GetChainAsSparseHist(RooArgSet* whichVars = NULL)
217  { return fChain->GetAsSparseHist(whichVars); }
218 
219  /// Get a clone of the NLL variable from the markov chain
220  virtual RooRealVar* GetNLLVar() const
221  { return fChain->GetNLLVar(); }
222 
223  /// Get a clone of the weight variable from the markov chain
224  virtual RooRealVar* GetWeightVar() const
225  { return fChain->GetWeightVar(); }
226 
227  /// set the acceptable level or error for Keys interval determination
229  {
230  if (epsilon < 0)
231  coutE(InputArguments) << "MCMCInterval::SetEpsilon will not allow "
232  << "negative epsilon value" << std::endl;
233  else
234  fEpsilon = epsilon;
235  }
236 
237  /// Set the type of interval to find. This will only have an effect for
238  /// 1-D intervals. If is more than 1 parameter of interest, then a
239  /// "shortest" interval will always be used, since it generalizes directly
240  /// to N dimensions
241  virtual void SetIntervalType(enum IntervalType intervalType)
242  { fIntervalType = intervalType; }
244 
245  /// Return the type of this interval
246  virtual enum IntervalType GetIntervalType() { return fIntervalType; }
247 
248  /// set the left-side tail fraction for a tail-fraction interval
251  fLeftSideTF = a;
252  }
253 
254  /// kbelasco: The inner-workings of the class really should not be exposed
255  /// like this in a comment, but it seems to be the only way to give
256  /// the user any control over this process, if they desire it
257  ///
258  /// Set the fraction delta such that
259  /// topCutoff (a) is considered == bottomCutoff (b) iff
260  /// (TMath::Abs(a - b) < TMath::Abs(fDelta * (a + b)/2))
261  /// when determining the confidence interval by Keys
262  virtual void SetDelta(Double_t delta)
263  {
264  if (delta < 0.)
265  coutE(InputArguments) << "MCMCInterval::SetDelta will not allow "
266  << "negative delta value" << std::endl;
267  else
268  fDelta = delta;
269  }
270 
271  private:
272  inline Bool_t AcceptableConfLevel(Double_t confLevel);
274 
275  protected:
276  // data members
277  RooArgSet fParameters; // parameters of interest for this interval
278  MarkovChain* fChain; // the markov chain
279  Double_t fConfidenceLevel; // Requested confidence level (eg. 0.95 for 95% CL)
280 
281  RooDataHist* fDataHist; // the binned Markov Chain data
282  THnSparse* fSparseHist; // the binned Markov Chain data
283  Double_t fHistConfLevel; // the actual conf level determined by hist
284  Double_t fHistCutoff; // cutoff bin size to be in interval
285 
286  RooNDKeysPdf* fKeysPdf; // the kernel estimation pdf
287  RooProduct* fProduct; // the (keysPdf * heaviside) product
288  Heaviside* fHeaviside; // the Heaviside function
289  RooDataHist* fKeysDataHist; // data hist representing product
290  RooRealVar* fCutoffVar; // cutoff variable to use for integrating keys pdf
291  Double_t fKeysConfLevel; // the actual conf level determined by keys
292  Double_t fKeysCutoff; // cutoff keys pdf value to be in interval
293  Double_t fFull; // Value of intergral of fProduct
294 
295  Double_t fLeftSideTF; // left side tail-fraction for interval
296  Double_t fTFConfLevel; // the actual conf level of tail-fraction interval
297  std::vector<Int_t> fVector; // vector containing the Markov chain data
298  Double_t fVecWeight; // sum of weights of all entries in fVector
299  Double_t fTFLower; // lower limit of the tail-fraction interval
300  Double_t fTFUpper; // upper limit of the tail-fraction interval
301 
302  TH1* fHist; // the binned Markov Chain data
303 
304  Bool_t fUseKeys; // whether to use kernel estimation
305  Bool_t fUseSparseHist; // whether to use sparse hist (vs. RooDataHist)
306  Bool_t fIsHistStrict; // whether the specified confidence level is a
307  // floor for the actual confidence level (strict),
308  // or a ceiling (not strict) for determination by
309  // histogram
310  Int_t fDimension; // number of variables
311  Int_t fNumBurnInSteps; // number of steps to discard as burn in, starting
312  // from the first
313  // LM (not used) Double_t fIntervalSum; // sum of heights of bins in the interval
314  RooRealVar** fAxes; // array of pointers to RooRealVars representing
315  // the axes of the histogram
316  // fAxes[0] represents x-axis, [1] y, [2] z, etc
317 
318  Double_t fEpsilon; // acceptable error for Keys interval determination
319 
320  Double_t fDelta; // topCutoff (a) considered == bottomCutoff (b) iff
321  // (TMath::Abs(a - b) < TMath::Abs(fDelta * (a + b)/2));
322  // Theoretically, the Abs is not needed here, but
323  // floating-point arithmetic does not always work
324  // perfectly, and the Abs doesn't hurt
326 
327 
328  // functions
329  virtual void DetermineInterval();
330  virtual void DetermineShortestInterval();
331  virtual void DetermineTailFractionInterval();
332  virtual void DetermineByHist();
333  virtual void DetermineBySparseHist();
334  virtual void DetermineByDataHist();
335  virtual void DetermineByKeys();
336  virtual void CreateHist();
337  virtual void CreateSparseHist();
338  virtual void CreateDataHist();
339  virtual void CreateKeysPdf();
340  virtual void CreateKeysDataHist();
341  virtual void CreateVector(RooRealVar* param);
342  inline virtual Double_t CalcConfLevel(Double_t cutoff, Double_t full);
343 
344  ClassDef(MCMCInterval,1) // Concrete implementation of a ConfInterval based on MCMC calculation
345 
346  };
347 }
348 
349 #endif
RooStats::MCMCInterval::GetHistCutoff
virtual Double_t GetHistCutoff()
get the cutoff bin height for being considered in the confidence interval
Definition: MCMCInterval.cxx:1368
RooStats::MCMCInterval::DetermineByDataHist
virtual void DetermineByDataHist()
Definition: MCMCInterval.cxx:915
RooStats::MCMCInterval::DetermineByHist
virtual void DetermineByHist()
Definition: MCMCInterval.cxx:834
RooStats::MCMCInterval::DetermineBySparseHist
virtual void DetermineBySparseHist()
Definition: MCMCInterval.cxx:844
RooStats::MCMCInterval::LowerLimitByDataHist
virtual Double_t LowerLimitByDataHist(RooRealVar &param)
determine lower limit using histogram
Definition: MCMCInterval.cxx:1144
RooStats::MCMCInterval::CreateKeysPdf
virtual void CreateKeysPdf()
Definition: MCMCInterval.cxx:334
RooStats::MCMCInterval::GetUseKeys
virtual Bool_t GetUseKeys()
get whether we used kernel estimation to determine the interval
Definition: MCMCInterval.h:172
RooStats::MCMCInterval
Definition: MCMCInterval.h:32
RooStats::MCMCInterval::GetChainAsSparseHist
virtual THnSparse * GetChainAsSparseHist(RooArgSet *whichVars=NULL)
Get a clone of the markov chain on which this interval is based as a THnSparse.
Definition: MCMCInterval.h:216
RooStats::MCMCInterval::kShortest
@ kShortest
Definition: MCMCInterval.h:45
RooStats::MCMCInterval::GetKeysPdfCutoff
virtual Double_t GetKeysPdfCutoff()
get the cutoff RooNDKeysPdf value for being considered in the confidence interval
Definition: MCMCInterval.cxx:1378
RooFit::InputArguments
@ InputArguments
Definition: RooGlobalFunc.h:68
RooStats::MCMCInterval::IsInInterval
virtual Bool_t IsInInterval(const RooArgSet &point) const
determine whether this point is in the confidence interval
Definition: MCMCInterval.cxx:229
RooArgSet.h
RooStats::MCMCInterval::fUseKeys
Bool_t fUseKeys
Definition: MCMCInterval.h:304
RooStats::MCMCInterval::fAxes
RooRealVar ** fAxes
Definition: MCMCInterval.h:314
RooStats::MCMCInterval::SetLeftSideTailFraction
virtual void SetLeftSideTailFraction(Double_t a)
set the left-side tail fraction for a tail-fraction interval
Definition: MCMCInterval.h:249
RooStats::MCMCInterval::fHist
TH1 * fHist
Definition: MCMCInterval.h:302
coutE
#define coutE(a)
Definition: RooMsgService.h:33
RooStats::MCMCInterval::fDataHist
RooDataHist * fDataHist
Definition: MCMCInterval.h:281
RooArgList
Definition: RooArgList.h:21
RooStats::MCMCInterval::fVecWeight
Double_t fVecWeight
Definition: MCMCInterval.h:298
RooStats::MarkovChain
Definition: MarkovChain.h:36
RooStats::MCMCInterval::fDelta
Double_t fDelta
Definition: MCMCInterval.h:320
RooStats::MCMCInterval::fTFUpper
Double_t fTFUpper
Definition: MCMCInterval.h:300
RooStats::MCMCInterval::DEFAULT_NUM_BINS
@ DEFAULT_NUM_BINS
Definition: MCMCInterval.h:44
RooStats::MCMCInterval::GetKeysMax
Double_t GetKeysMax()
Determine the approximate maximum value of the Keys PDF.
Definition: MCMCInterval.cxx:1336
RooStats::MCMCInterval::CreateSparseHist
virtual void CreateSparseHist()
Definition: MCMCInterval.cxx:448
RooStats::MCMCInterval::DetermineTailFractionInterval
virtual void DetermineTailFractionInterval()
Definition: MCMCInterval.cxx:615
RooStats::MCMCInterval::GetActualConfidenceLevel
virtual Double_t GetActualConfidenceLevel()
virtual Double_t GetKeysPdfCutoff() { return fKeysCutoff; }
Definition: MCMCInterval.cxx:987
RooStats::MCMCInterval::LowerLimit
virtual Double_t LowerLimit(RooRealVar &param)
get the lowest value of param that is within the confidence interval
Definition: MCMCInterval.cxx:1005
RooStats::MarkovChain::GetAsDataHist
virtual RooDataHist * GetAsDataHist(RooArgSet *whichVars=NULL) const
get this MarkovChain as a RooDataHist whose entries contain the values of whichVars.
Definition: MarkovChain.cxx:182
ConfInterval.h
RooStats::MCMCInterval::CreateDataHist
virtual void CreateDataHist()
Definition: MCMCInterval.cxx:502
RooStats::MCMCInterval::LowerLimitByKeys
virtual Double_t LowerLimitByKeys(RooRealVar &param)
determine lower limit in the shortest interval by using keys pdf
Definition: MCMCInterval.cxx:1257
RooStats::MCMCInterval::fEpsilon
Double_t fEpsilon
Definition: MCMCInterval.h:318
RooStats::MCMCInterval::GetDimension
virtual Int_t GetDimension() const
Get the number of parameters of interest in this interval.
Definition: MCMCInterval.h:193
b
#define b(i)
Definition: RSha256.hxx:118
RooStats::MCMCInterval::fTFConfLevel
Double_t fTFConfLevel
Definition: MCMCInterval.h:296
bool
RooStats::MCMCInterval::fKeysDataHist
RooDataHist * fKeysDataHist
Definition: MCMCInterval.h:289
RooStats::MarkovChain::GetAsSparseHist
virtual THnSparse * GetAsSparseHist(RooAbsCollection *whichVars=NULL) const
Get a clone of the markov chain on which this interval is based as a sparse histogram.
Definition: MarkovChain.cxx:213
RooStats::MCMCInterval::fDimension
Int_t fDimension
Definition: MCMCInterval.h:310
RooStats::MCMCInterval::GetWeightVar
virtual RooRealVar * GetWeightVar() const
Get a clone of the weight variable from the markov chain.
Definition: MCMCInterval.h:224
RooStats::MCMCInterval::GetNumBurnInSteps
virtual Int_t GetNumBurnInSteps()
get the number of steps in the chain to discard as burn-in,
Definition: MCMCInterval.h:178
THnSparse
Definition: THnSparse.h:36
RooStats::MCMCInterval::fIntervalType
enum IntervalType fIntervalType
Definition: MCMCInterval.h:325
RooStats::MCMCInterval::GetChain
virtual const MarkovChain * GetChain()
Get the markov chain on which this interval is based You do not own the returned MarkovChain*.
Definition: MCMCInterval.h:197
RooStats::MCMCInterval::CalcConfLevel
virtual Double_t CalcConfLevel(Double_t cutoff, Double_t full)
Definition: MCMCInterval.cxx:1392
RooStats::MCMCInterval::fTFLower
Double_t fTFLower
Definition: MCMCInterval.h:299
RooStats::MCMCInterval::CheckParameters
Bool_t CheckParameters(const RooArgSet &point) const
check if parameters are correct. (dummy implementation to start)
Definition: MCMCInterval.cxx:1553
RooProduct
Definition: RooProduct.h:30
RooDataHist
Definition: RooDataHist.h:39
MarkovChain.h
RooStats::MCMCInterval::fKeysPdf
RooNDKeysPdf * fKeysPdf
Definition: MCMCInterval.h:286
RooStats::MCMCInterval::GetPosteriorKeysPdf
virtual RooNDKeysPdf * GetPosteriorKeysPdf()
Get a clone of the keys pdf of the posterior.
Definition: MCMCInterval.cxx:1424
RooStats::MCMCInterval::UpperLimitByHist
virtual Double_t UpperLimitByHist(RooRealVar &param)
determine upper limit using histogram
Definition: MCMCInterval.cxx:1091
RooStats::MCMCInterval::LowerLimitTailFraction
virtual Double_t LowerLimitTailFraction(RooRealVar &param)
determine lower limit of the lower confidence interval
Definition: MCMCInterval.cxx:1037
RooStats::Heaviside
Definition: Heaviside.h:22
RooStats::MarkovChain::GetAsConstDataSet
virtual const RooDataSet * GetAsConstDataSet() const
Definition: MarkovChain.h:89
RooStats::MCMCInterval::SetShortestInterval
virtual void SetShortestInterval()
Definition: MCMCInterval.h:243
RooStats::MCMCInterval::UpperLimitShortest
virtual Double_t UpperLimitShortest(RooRealVar &param)
get the upper limit of param in the confidence interval Note that this works better for some distribu...
Definition: MCMCInterval.cxx:1067
RooStats::MCMCInterval::UpperLimit
virtual Double_t UpperLimit(RooRealVar &param)
get the highest value of param that is within the confidence interval
Definition: MCMCInterval.cxx:1021
RooStats::MCMCInterval::SetConfidenceLevel
virtual void SetConfidenceLevel(Double_t cl)
set the desired confidence level (see GetActualConfidenceLevel()) Note: calling this function trigger...
Definition: MCMCInterval.cxx:288
RooStats::MCMCInterval::SetIntervalType
virtual void SetIntervalType(enum IntervalType intervalType)
Set the type of interval to find.
Definition: MCMCInterval.h:241
epsilon
REAL epsilon
Definition: triangle.c:617
RooStats::MCMCInterval::SetNumBurnInSteps
virtual void SetNumBurnInSteps(Int_t numBurnInSteps)
set the number of steps in the chain to discard as burn-in, starting from the first
Definition: MCMCInterval.h:160
a
auto * a
Definition: textangle.C:12
RooAbsCollection::addClone
virtual RooAbsArg * addClone(const RooAbsArg &var, Bool_t silent=kFALSE)
Add a clone of the specified argument to list.
Definition: RooAbsCollection.cxx:412
RooStats::MCMCInterval::fNumBurnInSteps
Int_t fNumBurnInSteps
Definition: MCMCInterval.h:311
RooStats::MCMCInterval::fHistCutoff
Double_t fHistCutoff
Definition: MCMCInterval.h:284
RooStats::MCMCInterval::GetChainAsConstDataSet
virtual const RooDataSet * GetChainAsConstDataSet()
Get the markov chain on which this interval is based as a RooDataSet.
Definition: MCMCInterval.h:206
RooStats::MCMCInterval::CreateVector
virtual void CreateVector(RooRealVar *param)
Definition: MCMCInterval.cxx:526
RooStats::MCMCInterval::fKeysCutoff
Double_t fKeysCutoff
Definition: MCMCInterval.h:292
RooStats::MCMCInterval::LowerLimitShortest
virtual Double_t LowerLimitShortest(RooRealVar &param)
get the lower limit of param in the shortest confidence interval Note that this works better for some...
Definition: MCMCInterval.cxx:1057
RooStats::MCMCInterval::fChain
MarkovChain * fChain
Definition: MCMCInterval.h:278
RooStats::MCMCInterval::SetHistStrict
virtual void SetHistStrict(Bool_t isHistStrict)
whether the specified confidence level is a floor for the actual confidence level (strict),...
Definition: MCMCInterval.h:81
RooStats::MCMCInterval::SetUseKeys
virtual void SetUseKeys(Bool_t useKeys)
set whether to use kernel estimation to determine the interval
Definition: MCMCInterval.h:164
RooStats::MCMCInterval::MCMCInterval
MCMCInterval(const char *name=0)
default constructor
Definition: MCMCInterval.cxx:97
RooStats::MCMCInterval::fHistConfLevel
Double_t fHistConfLevel
Definition: MCMCInterval.h:283
RooStats::MCMCInterval::fIsHistStrict
Bool_t fIsHistStrict
Definition: MCMCInterval.h:306
RooStats::MCMCInterval::UpperLimitByKeys
virtual Double_t UpperLimitByKeys(RooRealVar &param)
determine upper limit in the shortest interval by using keys pdf
Definition: MCMCInterval.cxx:1297
RooStats::MCMCInterval::SetAxes
virtual void SetAxes(RooArgList &axes)
Set which parameters go on which axis.
Definition: MCMCInterval.cxx:318
RooStats::MCMCInterval::LowerLimitBySparseHist
virtual Double_t LowerLimitBySparseHist(RooRealVar &param)
determine lower limit using histogram
Definition: MCMCInterval.cxx:1103
RooStats::MCMCInterval::GetParameters
virtual RooArgSet * GetParameters() const
return a set containing the parameters of this interval the caller owns the returned RooArgSet*
Definition: MCMCInterval.cxx:1460
RooStats::MCMCInterval::GetAxes
virtual RooArgList * GetAxes()
return a list of RooRealVars representing the axes you own the returned RooArgList
Definition: MCMCInterval.h:101
RooStats::MCMCInterval::GetPosteriorKeysProduct
virtual RooProduct * GetPosteriorKeysProduct()
Get a clone of the (keyspdf * heaviside) product of the posterior.
Definition: MCMCInterval.cxx:1441
RooStats::MCMCInterval::ConfidenceLevel
virtual Double_t ConfidenceLevel() const
get the desired confidence level (see GetActualConfidenceLevel())
Definition: MCMCInterval.h:61
RooStats::MCMCInterval::GetIntervalType
virtual enum IntervalType GetIntervalType()
Return the type of this interval.
Definition: MCMCInterval.h:246
RooStats::MCMCInterval::DetermineByKeys
virtual void DetermineByKeys()
Definition: MCMCInterval.cxx:717
RooStats::MCMCInterval::CreateKeysDataHist
virtual void CreateKeysDataHist()
Definition: MCMCInterval.cxx:1482
RooStats::MCMCInterval::fVector
std::vector< Int_t > fVector
Definition: MCMCInterval.h:297
RooStats::MarkovChain::GetAsDataSet
virtual RooDataSet * GetAsDataSet(RooArgSet *whichVars=NULL) const
get this MarkovChain as a RooDataSet whose entries contain the values of whichVars.
Definition: MarkovChain.cxx:155
RooStats::MCMCInterval::UpperLimitByDataHist
virtual Double_t UpperLimitByDataHist(RooRealVar &param)
determine upper limit using histogram
Definition: MCMCInterval.cxx:1221
RooStats::MCMCInterval::fCutoffVar
RooRealVar * fCutoffVar
Definition: MCMCInterval.h:290
RooStats::MCMCInterval::DetermineShortestInterval
virtual void DetermineShortestInterval()
Definition: MCMCInterval.cxx:605
RooStats::MCMCInterval::fHeaviside
Heaviside * fHeaviside
Definition: MCMCInterval.h:288
RooStats::MCMCInterval::DetermineInterval
virtual void DetermineInterval()
Definition: MCMCInterval.cxx:587
RooStats::MCMCInterval::SetParameters
virtual void SetParameters(const RooArgSet &parameters)
Set the parameters of interest for this interval and change other internal data members accordingly.
Definition: MCMCInterval.cxx:563
Double_t
double Double_t
Definition: RtypesCore.h:59
RooStats::MCMCInterval::IntervalType
IntervalType
Definition: MCMCInterval.h:45
RooStats::MCMCInterval::fProduct
RooProduct * fProduct
Definition: MCMCInterval.h:287
RooStats::MCMCInterval::fUseSparseHist
Bool_t fUseSparseHist
Definition: MCMCInterval.h:305
RooStats::MCMCInterval::UpperLimitTailFraction
virtual Double_t UpperLimitTailFraction(RooRealVar &param)
determine upper limit of the lower confidence interval
Definition: MCMCInterval.cxx:1047
RooStats::MarkovChain::GetNLLVar
virtual RooRealVar * GetNLLVar() const
get a clone of the NLL variable
Definition: MarkovChain.h:112
RooStats
Definition: Asimov.h:19
RooStats::MCMCInterval::CreateHist
virtual void CreateHist()
Definition: MCMCInterval.cxx:378
ClassDef
#define ClassDef(name, id)
Definition: Rtypes.h:325
TH1
Definition: TH1.h:57
name
char name[80]
Definition: TGX11.cxx:110
RooStats::MCMCInterval::~MCMCInterval
virtual ~MCMCInterval()
Definition: MCMCInterval.cxx:171
RooStats::MCMCInterval::fSparseHist
THnSparse * fSparseHist
Definition: MCMCInterval.h:282
RooStats::MCMCInterval::WithinDeltaFraction
Bool_t WithinDeltaFraction(Double_t a, Double_t b)
Definition: MCMCInterval.cxx:1475
RooStats::MCMCInterval::fLeftSideTF
Double_t fLeftSideTF
Definition: MCMCInterval.h:295
RooStats::MCMCInterval::AcceptableConfLevel
Bool_t AcceptableConfLevel(Double_t confLevel)
Definition: MCMCInterval.cxx:1468
RooStats::MCMCInterval::fKeysConfLevel
Double_t fKeysConfLevel
Definition: MCMCInterval.h:291
RooStats::MCMCInterval::fConfidenceLevel
Double_t fConfidenceLevel
Definition: MCMCInterval.h:279
RooStats::ConfInterval
Definition: ConfInterval.h:41
RooDataSet
Definition: RooDataSet.h:33
RooStats::MCMCInterval::GetChainAsDataHist
virtual RooDataHist * GetChainAsDataHist(RooArgSet *whichVars=NULL)
Get a clone of the markov chain on which this interval is based as a RooDataHist.
Definition: MCMCInterval.h:211
RooStats::MCMCInterval::LowerLimitByHist
virtual Double_t LowerLimitByHist(RooRealVar &param)
determine lower limit using histogram
Definition: MCMCInterval.cxx:1079
RooNDKeysPdf
Definition: RooNDKeysPdf.h:48
RooStats::MCMCInterval::SetUseSparseHist
virtual void SetUseSparseHist(Bool_t useSparseHist)
set whether to use a sparse histogram.
Definition: MCMCInterval.h:168
RooStats::MCMCInterval::fParameters
RooArgSet fParameters
Definition: MCMCInterval.h:277
RooStats::MCMCInterval::SetChain
virtual void SetChain(MarkovChain &chain)
Set the MarkovChain that this interval is based on.
Definition: MCMCInterval.h:92
RooRealVar
Definition: RooRealVar.h:35
RooStats::MCMCInterval::SetEpsilon
virtual void SetEpsilon(Double_t epsilon)
set the acceptable level or error for Keys interval determination
Definition: MCMCInterval.h:228
RooArgList.h
RooStats::MarkovChain::GetWeightVar
virtual RooRealVar * GetWeightVar() const
get a clone of the weight variable
Definition: MarkovChain.h:116
RooStats::MCMCInterval::UpperLimitBySparseHist
virtual Double_t UpperLimitBySparseHist(RooRealVar &param)
determine upper limit using histogram
Definition: MCMCInterval.cxx:1180
Rtypes.h
RooStats::MCMCInterval::SetDelta
virtual void SetDelta(Double_t delta)
kbelasco: The inner-workings of the class really should not be exposed like this in a comment,...
Definition: MCMCInterval.h:262
RooStats::MCMCInterval::fFull
Double_t fFull
Definition: MCMCInterval.h:293
RooStats::MCMCInterval::GetPosteriorHist
virtual TH1 * GetPosteriorHist()
set the number of bins to use (same for all axes, for now) virtual void SetNumBins(Int_t numBins);
Definition: MCMCInterval.cxx:1407
RooArgSet
Definition: RooArgSet.h:28
RooStats::MCMCInterval::kTailFraction
@ kTailFraction
Definition: MCMCInterval.h:45
RooStats::MCMCInterval::GetNLLVar
virtual RooRealVar * GetNLLVar() const
Get a clone of the NLL variable from the markov chain.
Definition: MCMCInterval.h:220
int
RooStats::MCMCInterval::GetChainAsDataSet
virtual RooDataSet * GetChainAsDataSet(RooArgSet *whichVars=NULL)
Get a clone of the markov chain on which this interval is based as a RooDataSet.
Definition: MCMCInterval.h:201