CMS 3D CMS Logo

LEPBandPlot.h
Go to the documentation of this file.
1 
26 #ifndef __LEPBandPlot__
27 #define __LEPBandPlot__
28 
29 #include <iostream>
30 
31 #if (defined(STANDALONE) or defined(__CINT__))
32 #include "StatisticalPlot.h"
33 #else
35 #endif
36 
37 #include "TGraphErrors.h"
38 #include "TLine.h"
39 #include "TLegend.h"
40 
41 class LEPBandPlot : public StatisticalPlot {
42 public:
44  LEPBandPlot(const char* name,
45  const char* title,
46  const int n_points,
47  double* x_vals,
48  double* sb_vals,
49  double* b_vals,
50  double* b_rms,
51  double* exp_vals = nullptr);
53  LEPBandPlot(const char* name,
54  const char* title,
55  const int n_points,
56  double* x_vals,
57  double* sb_vals,
58  double* b_vals,
59  double* b_up_bars1,
60  double* b_down_bars1,
61  double* b_up_bars2,
62  double* b_down_bars2,
63  double* exp_vals = nullptr);
64 
66  void setXaxisTitle(const char* title);
67 
69  void setTitle(const char* title);
70 
72  ~LEPBandPlot() override;
73 
75  void draw(const char* options = "") override;
76 
78  void print(const char* options = "") override;
79 
81  void dumpToFile(const char* RootFileName, const char* options) override;
82 
83 private:
86 
88  TGraph* m_b_line_graph;
89 
92 
95 
97  TGraph* m_sb_line_graph;
98 
100  TLine* m_zero_line;
101 
103  TLegend* m_legend;
104 
105  //For Cint
106  // #if (defined (STANDALONE) or defined (__CINT__) )
107  ClassDefOverride(LEPBandPlot, 1)
108  // #endif
109 };
110 
111 #endif
112 // Automatically converted from the standalone version Wed Apr 15 11:36:33 2009
TGraph * m_b_band_graph_1sigma
The b band 1 sigma.
Definition: LEPBandPlot.h:91
void draw(const char *options="") override
Draw on canvas.
Definition: LEPBandPlot.cc:191
TGraph * m_sb_line_graph
The sb line.
Definition: LEPBandPlot.h:97
LEPBandPlot(const char *name, const char *title, const int n_points, double *x_vals, double *sb_vals, double *b_vals, double *b_rms, double *exp_vals=nullptr)
Constructor.
Definition: LEPBandPlot.cc:22
TLegend * m_legend
The legend.
Definition: LEPBandPlot.h:103
TGraph * m_b_band_graph_2sigma
The b band 2 sigma.
Definition: LEPBandPlot.h:94
~LEPBandPlot() override
Destructor.
Definition: LEPBandPlot.cc:158
TGraph * m_data_line_graph
The data line.
Definition: LEPBandPlot.h:85
void setTitle(const char *title)
Set the title of the plot.
Definition: LEPBandPlot.cc:187
StatisticalPlot: the base class for the statistical plots.
TLine * m_zero_line
The line at 0.
Definition: LEPBandPlot.h:100
void print(const char *options="") override
Print the relevant information.
Definition: LEPBandPlot.cc:250
void setXaxisTitle(const char *title)
Set the title of the x axis.
Definition: LEPBandPlot.cc:179
TGraph * m_b_line_graph
The b line.
Definition: LEPBandPlot.h:88
LEPBandPlot: The plot for the CL bands "a la LEP".
Definition: LEPBandPlot.h:41
void dumpToFile(const char *RootFileName, const char *options) override
All the objects are written to rootfile.
Definition: LEPBandPlot.cc:228