6 #if (defined(STANDALONE) or defined(__CINT__)) 11 #include "TGraphAsymmErrors.h" 16 #if (defined(STANDALONE) or defined(__CINT__)) 26 double* y_down_points1,
28 double* y_down_points2)
31 double* y_down_bars2 =
new double[n_points];
32 double* y_down_bars1 =
new double[n_points];
33 double* y_up_bars1 =
new double[n_points];
34 double* y_up_bars2 =
new double[n_points];
36 for (
int i = 0;
i < n_points; ++
i) {
37 y_down_bars2[
i] = y_vals[
i] - y_down_points2[
i];
38 y_down_bars1[
i] = y_vals[
i] - y_down_points1[
i];
39 y_up_bars2[
i] = y_up_points2[
i] - y_vals[
i];
40 y_up_bars1[
i] = y_up_points1[
i] - y_vals[
i];
50 m_y_band_graph_1sigma =
new TGraphAsymmErrors(n_points, x_vals, y_vals,
nullptr,
nullptr, y_down_bars1, y_up_bars1);
56 m_y_band_graph_2sigma =
new TGraphAsymmErrors(n_points, x_vals, y_vals,
nullptr,
nullptr, y_down_bars2, y_up_bars2);
68 m_legend =
new TLegend(0.60, 0.78, 0.98, 0.98);
69 m_legend->SetName(
"SM exclusion");
74 m_legend->SetFillColor(0);
76 delete[] y_down_bars2;
77 delete[] y_down_bars1;
122 setCanvas(
new TCanvas(GetName(), GetTitle()));
128 TString
opt(options);
130 if (opt.Contains(
"4") == 0) {
139 if (opt.Contains(
"4") == 0) {
154 TFile
ofile(RootFileName, options);
ClassImp(ExclusionBandPlot)
TGraph * m_y_band_graph_1sigma
The band 1 sigma.
TGraph * m_y_band_graph_2sigma
The band 2 sigma.
TGraph * m_y_line_graph
The line.
void setCanvas(TCanvas *new_canvas)
Set the canvas.
~ExclusionBandPlot() override
Destructor.
void setTitle(const char *title)
Set the title of the plot.
ExclusionBandPlot(const char *name, const char *title, const int n_points, double *x_vals, double *y_vals, double *y_up_bars1, double *y_down_bars1, double *y_up_bars2, double *y_down_bars2)
Constructor.
void setXaxisTitle(const char *title)
Set the title of the x axis.
StatisticalPlot: the base class for the statistical plots.
TLegend * m_legend
The legend.
void setYaxisTitle(const char *title)
Set the title of the x axis.
ExclusionBandPlot: plot a la tevatron for SM eclusion in function of mass.
TLine * m_one_line
The line at 1.
TCanvas * getCanvas()
Get the canvas.
void draw(const char *options="") override
Draw on canvas.
void print(const char *options="") override
Print the relevant information.
void dumpToFile(const char *RootFileName, const char *options) override
All the objects are written to rootfile.