Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-12-16 10:29:45

0001 // @(#)root/roostats:$Id$
0002 // Authors: Kevin Belasco        17/06/2009
0003 // Authors: Kyle Cranmer         17/06/2009
0004 /*************************************************************************
0005  * Project: RooStats                                                     *
0006  * Package: RooFit/RooStats                                              *
0007  *************************************************************************
0008  * Copyright (C) 1995-2008, Rene Brun and Fons Rademakers.               *
0009  * All rights reserved.                                                  *
0010  *                                                                       *
0011  * For the licensing terms see $ROOTSYS/LICENSE.                         *
0012  * For the list of contributors see $ROOTSYS/README/CREDITS.             *
0013  *************************************************************************/
0014 
0015 #ifndef ROOSTATS_MCMCIntervalPlot
0016 #define ROOSTATS_MCMCIntervalPlot
0017 
0018 #include "RooPrintable.h"
0019 #include "RooArgSet.h"
0020 #include "RooStats/MCMCInterval.h"
0021 #include "RooNDKeysPdf.h"
0022 #include "RooProduct.h"
0023 
0024 #include <TColor.h>
0025 #include <TH1.h>
0026 #include <TNamed.h>
0027 
0028 namespace RooStats {
0029 
0030    class MCMCIntervalPlot : public TNamed, public RooPrintable {
0031 
0032    public:
0033       MCMCIntervalPlot();
0034       MCMCIntervalPlot(MCMCInterval& interval);
0035 
0036       /// Destructor of SamplingDistribution
0037       ~MCMCIntervalPlot() override;
0038 
0039       void SetMCMCInterval(MCMCInterval& interval);
0040       void SetLineColor(TColorNumber color) {fLineColor = color.number();}
0041       void SetLineWidth(Int_t width) {fLineWidth = width;}
0042       void SetShadeColor(TColorNumber color) {fShadeColor = color.number();}
0043       void SetShowBurnIn(bool showBurnIn) { fShowBurnIn = showBurnIn; }
0044 
0045       void Draw(const Option_t* options = nullptr) override;
0046 
0047       void DrawChainScatter(RooRealVar& xVar, RooRealVar& yVar);
0048       void DrawParameterVsTime(RooRealVar& param);
0049       void DrawNLLVsTime();
0050       void DrawNLLHist(const Option_t* options = nullptr);
0051       void DrawWeightHist(const Option_t* options = nullptr);
0052 
0053    private:
0054       MCMCInterval *fInterval = nullptr;
0055       RooArgSet *fParameters = nullptr;
0056       TH1 *fPosteriorHist = nullptr;
0057       RooNDKeysPdf *fPosteriorKeysPdf = nullptr;
0058       RooProduct *fPosteriorKeysProduct = nullptr;
0059       TH1 *fNLLHist = nullptr;
0060       TH1 *fWeightHist = nullptr;
0061       TH1 *fPosteriorHistHistCopy = nullptr;
0062       TH1 *fPosteriorHistTFCopy = nullptr;
0063       Int_t fDimension = 0;
0064       Color_t fLineColor = kBlack;
0065       Color_t fShadeColor = kGray;
0066       Int_t fLineWidth = 1;
0067       bool fShowBurnIn = true;
0068       TGraph *fWalk = nullptr;
0069       TGraph *fBurnIn = nullptr;
0070       TGraph *fFirst = nullptr;
0071       TGraph *fParamGraph = nullptr;
0072       TGraph *fNLLGraph = nullptr;
0073 
0074    protected:
0075       void DrawPosterior(const Option_t* options = nullptr);
0076       void* DrawPosteriorHist(const Option_t* options = nullptr,
0077             const char* title = nullptr, bool scale = true);
0078       void* DrawPosteriorKeysPdf(const Option_t* options = nullptr);
0079       void* DrawPosteriorKeysProduct(const Option_t* options = nullptr);
0080 
0081       void DrawInterval(const Option_t* options = nullptr);
0082       void DrawShortestInterval(const Option_t* options = nullptr);
0083       void DrawHistInterval(const Option_t* options = nullptr);
0084       void DrawKeysPdfInterval(const Option_t* options = nullptr);
0085       void DrawTailFractionInterval(const Option_t* options = nullptr);
0086 
0087       ClassDefOverride(MCMCIntervalPlot,1)  // Class containing the results of the MCMCCalculator
0088    };
0089 }
0090 
0091 #endif