![]() |
MaCh3
2.4.2
Reference Guide
|
#include <iostream>#include <sstream>#include <iomanip>#include <algorithm>#include "PlottingUtils/PlottingUtils.h"#include "PlottingUtils/PlottingManager.h"#include "TROOT.h"#include "TGaxis.h"#include "TString.h"#include "TStyle.h"#include "TH1.h"#include "TH2.h"#include "TF1.h"#include "TLegend.h"#include "TPad.h"#include "TCanvas.h"#include "TTree.h"#include "TFile.h"#include "TVectorD.h"#include "TCandle.h"#include "TFrame.h"#include "TGraphAsymmErrors.h"Go to the source code of this file.
Functions | |
| void | copyParToBlockHist (const int localBin, const std::string ¶mName, TH1D *blockHist, const std::string &type, const int fileId, const bool setLabels=true) |
| void | InitializePads (TCanvas *canvas, TPad *&pad3, TPad *&pad4) |
| void | CopyViolinToBlock (TH2D *FullViolin, TH2D *ReducedViolin, const std::vector< std::string > &ParamNames) |
| void | PrettifyTitles (TH1D *Hist) |
| void | PrettifyTitles (TH2D *Hist) |
| bool | ReadSettings (const std::shared_ptr< TFile > &File1) |
| std::unique_ptr< TH1D > | makeRatio (TH1D *PrefitCopy, TH1D *PostfitCopy, bool setAxes) |
| void | DrawPlots (TCanvas *plotCanv, TH1D *PrefitCopy, const std::vector< std::unique_ptr< TH1D >> &PostfitVec, TPad *mainPad, TPad *ratioPad) |
| void | MakeParameterPlots () |
| void | MakeFluxPlots () |
| void | MakeNDDetPlots () |
| void | MakeRidgePlots () |
| void | GetPostfitParamPlots () |
| std::unique_ptr< TGraphAsymmErrors > | MakeTGraphAsymmErrors (const std::shared_ptr< TFile > &File, std::vector< int > Index={}) |
| void | GetViolinPlots () |
| KS: Make fancy violin plots. More... | |
| void | Get2DComparison (const std::string &FileName1, const std::string &FileName2) |
| KS: Make comparison of 2D Posteriors. More... | |
| int | main (int argc, char *argv[]) |
Variables | |
| MaCh3Plotting::PlottingManager * | PlotMan |
| TH1D * | Prefit |
| int | NDParameters |
| int | NDParametersStartingPos |
| std::vector< int > | NDSamplesBins |
| std::vector< std::string > | NDSamplesNames |
| int | nBins |
| TCanvas * | canv |
| std::string | SaveName |
| TPad * | p3 |
| TPad * | p4 |
| constexpr Color_t | PlotColor [] = {kRed, kBlack, kBlue, kGreen} |
| std::string | plotType |
This script generates post-fit parameter plots. The central postfit value is taken as the Highest Posterior Density (HPD), but can be easily changed to another method such as Gaussian. Be cautious as parameter names and the number of parameters per plot are currently hardcoded.
Usage:
Definition in file GetPostfitParamPlots.cpp.
| void copyParToBlockHist | ( | const int | localBin, |
| const std::string & | paramName, | ||
| TH1D * | blockHist, | ||
| const std::string & | type, | ||
| const int | fileId, | ||
| const bool | setLabels = true |
||
| ) |
Definition at line 71 of file GetPostfitParamPlots.cpp.
| void CopyViolinToBlock | ( | TH2D * | FullViolin, |
| TH2D * | ReducedViolin, | ||
| const std::vector< std::string > & | ParamNames | ||
| ) |
Definition at line 106 of file GetPostfitParamPlots.cpp.
| void DrawPlots | ( | TCanvas * | plotCanv, |
| TH1D * | PrefitCopy, | ||
| const std::vector< std::unique_ptr< TH1D >> & | PostfitVec, | ||
| TPad * | mainPad, | ||
| TPad * | ratioPad | ||
| ) |
Definition at line 258 of file GetPostfitParamPlots.cpp.
| void Get2DComparison | ( | const std::string & | FileName1, |
| const std::string & | FileName2 | ||
| ) |
KS: Make comparison of 2D Posteriors.
Definition at line 983 of file GetPostfitParamPlots.cpp.
| void GetPostfitParamPlots | ( | ) |
Definition at line 701 of file GetPostfitParamPlots.cpp.
| void GetViolinPlots | ( | ) |
KS: Make fancy violin plots.
Definition at line 808 of file GetPostfitParamPlots.cpp.
|
inline |
Definition at line 88 of file GetPostfitParamPlots.cpp.
| int main | ( | int | argc, |
| char * | argv[] | ||
| ) |
Definition at line 1082 of file GetPostfitParamPlots.cpp.
| void MakeFluxPlots | ( | ) |
Definition at line 388 of file GetPostfitParamPlots.cpp.
| void MakeNDDetPlots | ( | ) |
Definition at line 476 of file GetPostfitParamPlots.cpp.
| void MakeParameterPlots | ( | ) |
Definition at line 333 of file GetPostfitParamPlots.cpp.
| std::unique_ptr<TH1D> makeRatio | ( | TH1D * | PrefitCopy, |
| TH1D * | PostfitCopy, | ||
| bool | setAxes | ||
| ) |
Definition at line 190 of file GetPostfitParamPlots.cpp.
| void MakeRidgePlots | ( | ) |
Definition at line 534 of file GetPostfitParamPlots.cpp.
| std::unique_ptr<TGraphAsymmErrors> MakeTGraphAsymmErrors | ( | const std::shared_ptr< TFile > & | File, |
| std::vector< int > | Index = {} |
||
| ) |
Definition at line 773 of file GetPostfitParamPlots.cpp.
| void PrettifyTitles | ( | TH1D * | Hist | ) |
Definition at line 140 of file GetPostfitParamPlots.cpp.
| void PrettifyTitles | ( | TH2D * | Hist | ) |
Definition at line 149 of file GetPostfitParamPlots.cpp.
| bool ReadSettings | ( | const std::shared_ptr< TFile > & | File1 | ) |
Definition at line 159 of file GetPostfitParamPlots.cpp.
| TCanvas* canv |
Definition at line 60 of file GetPostfitParamPlots.cpp.
| int nBins |
Definition at line 59 of file GetPostfitParamPlots.cpp.
| int NDParameters |
Definition at line 54 of file GetPostfitParamPlots.cpp.
| int NDParametersStartingPos |
Definition at line 55 of file GetPostfitParamPlots.cpp.
| std::vector<int> NDSamplesBins |
Definition at line 57 of file GetPostfitParamPlots.cpp.
| std::vector<std::string> NDSamplesNames |
Definition at line 58 of file GetPostfitParamPlots.cpp.
| TPad* p3 |
Definition at line 64 of file GetPostfitParamPlots.cpp.
| TPad* p4 |
Definition at line 65 of file GetPostfitParamPlots.cpp.
|
constexpr |
Definition at line 68 of file GetPostfitParamPlots.cpp.
| MaCh3Plotting::PlottingManager* PlotMan |
Definition at line 51 of file GetPostfitParamPlots.cpp.
| std::string plotType |
Definition at line 69 of file GetPostfitParamPlots.cpp.
| TH1D* Prefit |
Definition at line 52 of file GetPostfitParamPlots.cpp.
| std::string SaveName |
Definition at line 62 of file GetPostfitParamPlots.cpp.