5#ifndef MSVTXPLOTCOMPARISON_H
6#define MSVTXPLOTCOMPARISON_H
27#include "TEfficiency.h"
28#include "TGraphAsymmErrors.h"
29#include "TMultiGraph.h"
39 MSVtxPlotComparison(
const std::vector<std::string> &datapaths,
const std::vector<std::string> &labels,
const std::string &pltdir);
46 std::unique_ptr<T>
plot{
nullptr};
61 void drawTHStack(std::unique_ptr<PlotInfo<THStack>> &hstackInfo);
73 TGraphAsymmErrors*
getRatio(
const TH1* num,
const TH1* denom);
74 TGraphAsymmErrors*
getRatio(
const TGraphAsymmErrors* num,
const TGraphAsymmErrors* denom);
75 void drawRatio(TGraphAsymmErrors* ratio, TGraphAsymmErrors* denomErrNorm,
const TString &xlabel,
const TAxis* plotXaxis,
const TAxis* plotYaxis,
double axisRescaling);
78 Bool_t
isTH1(
const TClass *objectClass);
81 Int_t
getPointIdx(
const TGraphAsymmErrors* graph,
double x);
97 std::unique_ptr<TCanvas>
m_c{
nullptr};
113 const std::array<Int_t, 10>
m_colors{
m_kP10Blue,
m_kP10Yellow,
m_kP10Red,
m_kP10Grey,
m_kP10Violet,
m_kP10Brown,
m_kP10Orange,
m_kP10Green,
m_kP10Ash,
m_kP10Cyan};
114 static constexpr std::array
m_markers{kOpenCircle, kOpenSquare, kOpenTriangleUp, kOpenDiamond, kOpenStar, kOpenTriangleDown, kOpenDoubleDiamond, kOpenCrossX};
Header file for AthHistogramAlgorithm.
TString m_plotdir_truthVtx
void drawRatio(TGraphAsymmErrors *ratio, TGraphAsymmErrors *denomErrNorm, const TString &xlabel, const TAxis *plotXaxis, const TAxis *plotYaxis, double axisRescaling)
Bool_t isTEfficiency(const TClass *objectClass)
std::vector< std::string > m_labels
const TString getTMultigraphplotpath(const TString &name)
TGraphAsymmErrors * getNormalisedGraph(const TGraphAsymmErrors *graph)
static constexpr std::array m_markers
Bool_t ignorePlot(TKey *key)
TString m_plotdir_vtxFakeRate
const TString getTHStackplotpath(const TString &name)
const std::array< Int_t, 10 > m_colors
MSVtxPlotComparison(const std::vector< std::string > &datapaths, const std::vector< std::string > &labels, const std::string &pltdir)
void drawTHStack(std::unique_ptr< PlotInfo< THStack > > &hstackInfo)
void drawTMultigraph(std::unique_ptr< PlotInfo< TMultiGraph > > &mgInfo)
std::unique_ptr< MSVtxPlotComparison::PlotInfo< THStack > > getTHStackPlotInfo(const TH1 *h)
TString m_plotdir_inputObjects
Bool_t isTH1(const TClass *objectClass)
TString m_plotdir_recoVtxHits
void drawTMultigraphRatioPlot(std::unique_ptr< PlotInfo< TMultiGraph > > &mgInfo)
void makeTH1Comparison(TKey *key)
Int_t getPointIdx(const TGraphAsymmErrors *graph, double x)
TGraphAsymmErrors * getRatio(const TH1 *num, const TH1 *denom)
void makeTEfficiencyComparison(TKey *key)
TString m_plotdir_recoVtx
void drawTHStackRatioPlot(std::unique_ptr< PlotInfo< THStack > > &hstackInfo)
std::unique_ptr< TFile > m_output_file
std::unique_ptr< TCanvas > m_c
virtual ~MSVtxPlotComparison()
void drawTMultigraphPlot(std::unique_ptr< PlotInfo< TMultiGraph > > &mgInfo)
void drawTHStackPlot(std::unique_ptr< PlotInfo< THStack > > &hstackInfo)
std::unique_ptr< MSVtxPlotComparison::PlotInfo< TMultiGraph > > getTMultigraphPlotInfo(TEfficiency *h)
TString m_plotdir_vtxEfficiency
TString m_plotdir_vtxResiduals
std::vector< std::string > m_datapaths
PlotInfo(std::unique_ptr< T > plot, TLegend *legend, double maxy, TString xlabel, const TString ylabel)