MaCh3  2.6.1
Reference Guide
PlottingUtils.h
Go to the documentation of this file.
1 #pragma once
2 
3 // MaCh3 includes
4 #include "Manager/MaCh3Logger.h"
6 
7 // C++
8 #include <algorithm>
9 #include <iomanip>
10 #include <iostream>
11 #include <map>
12 
14 // ROOT
15 #include "TCanvas.h"
16 #include "TGraph2D.h"
17 #include "TColor.h"
18 #include "TDirectory.h"
19 #include "TFile.h"
20 #include "TGraph.h"
21 #include "TH1.h"
22 #include "TH1D.h"
23 #include "TH2.h"
24 #include "TH2Poly.h"
25 #include "THStack.h"
26 #include "TKey.h"
27 #include "TLatex.h"
28 #include "TLegend.h"
29 #include "TLine.h"
30 #include "TROOT.h"
31 #include "TStyle.h"
32 #include "TMultiGraph.h"
34 
35 
36 namespace M3 {
37 namespace Plotting {
44 TH1D TGraphToTH1D(const TGraph& graph, const std::string& newName = "", const std::string& newTitle = "");
45 
46 
50 std::vector<std::vector<double>> TGraphToVector(const TGraph& graph);
51 
53 void SetSymmetricRatioRange(const std::vector<std::unique_ptr<TH1D>>& RatioPlot);
54 
58 std::vector<std::vector<double>> TGraphToVector(const TGraph2D& graph);
59 } // namespace Plotting
60 } // namespace M3
#define _MaCh3_Safe_Include_Start_
KS: Avoiding warning checking for headers.
Definition: Core.h:126
#define _MaCh3_Safe_Include_End_
Defines the custom exception class used throughout MaCh3.
MaCh3 Logging utilities built on top of SPDLOG.
std::vector< std::vector< double > > TGraphToVector(const TGraph &graph)
This handy little function lets you interpret a TGraph as a vector containing the same data.
void SetSymmetricRatioRange(const std::vector< std::unique_ptr< TH1D >> &RatioPlot)
Set a symmetric Y-axis range around 1 for ratio plots.
TH1D TGraphToTH1D(const TGraph &graph, const std::string &newName, const std::string &newTitle)
This handy little function lets you interpret a TGraph as a TH1D.
Main namespace for MaCh3 software.