1
|
#ifndef APPLY_PLOT_STYLE
|
2
|
#define APPLY_PLOT_STYLE
|
3
|
|
4
|
#include "TLegend.h"
|
5
|
#include "TF1.h"
|
6
|
#include <sstream>
|
7
|
#include <iostream>
|
8
|
#include "TFile.h"
|
9
|
#include "TTree.h"
|
10
|
#include <fstream>
|
11
|
#include <TROOT.h>
|
12
|
#include <TStyle.h>
|
13
|
#include <TH1F.h>
|
14
|
#include <TH2F.h>
|
15
|
#include <TLine.h>
|
16
|
#include <THStack.h>
|
17
|
#include <TMath.h>
|
18
|
#include <TRandom3.h>
|
19
|
#include <TPaletteAxis.h>
|
20
|
|
21
|
|
22
|
class ApplyPlotStyle{
|
23
|
|
24
|
public:
|
25
|
ApplyPlotStyle();
|
26
|
|
27
|
|
28
|
void Hist1D(TH1F* data_hist, TH1F* mc_hist, string saveAs="output.pdf", double cut_lower=TMath::Infinity(), double cut_upper=TMath::Infinity(), bool normalise=true, string legend1="Data", string legend2="Recon MC");
|
29
|
|
30
|
void Hist1D_single(TH1F* hist, string saveAs="output.pdf", double cut_lower=TMath::Infinity(), double cut_upper=TMath::Infinity(), string legend="Data", bool isData=true);
|
31
|
|
32
|
void Hist2D(TH2F* data_hist, TH2F* mc_hist, string saveAs="output.pdf", double cut_a_lower=TMath::Infinity(), double cut_a_upper=TMath::Infinity(), double cut_b_lower=TMath::Infinity(), double cut_b_upper=TMath::Infinity(), int legend_location=0,bool normalise=true, string legend1="Data", string legend2="Recon MC");
|
33
|
|
34
|
void Hist2D_single(TH2F* data_hist, string saveAs="output.pdf", double cut_a_lower=TMath::Infinity(), double cut_a_upper=TMath::Infinity(), double cut_b_lower=TMath::Infinity(), double cut_b_upper=TMath::Infinity(), int legend_location=0,bool normalise=true, string legend1="Data");
|
35
|
|
36
|
|
37
|
void Hist_TOFvTKU(TH2F* data_hist, TH2F* mc_hist, string saveAs="output.pdf", double mean_dP=20.0, double min_dP=-2.0, double max_dP=42.0, int legend_location=0,bool normalise=true, string legend1="Data", string legend2="Recon MC");
|
38
|
|
39
|
|
40
|
|
41
|
|
42
|
|
43
|
void test();
|
44
|
|
45
|
|
46
|
private:
|
47
|
|
48
|
static Double_t tofFunc(Double_t *x, Double_t *par);
|
49
|
|
50
|
|
51
|
};
|
52
|
|
53
|
#endif
|