6 #if (defined (STANDALONE) or defined (__CINT__) ) 11 #include "TGraphAsymmErrors.h" 17 #if (defined (STANDALONE) or defined (__CINT__) ) 34 m_b_line_graph =
new TGraph(n_points, x_vals, b_vals);
35 m_b_line_graph->SetLineWidth(2);
36 m_b_line_graph->SetLineStyle(2);
37 m_b_line_graph->SetFillColor(kWhite);
41 m_b_band_graph_1sigma =
new TGraphErrors(n_points, x_vals, b_vals ,
nullptr, b_rms);
42 m_b_band_graph_1sigma->SetFillColor(kGreen);
43 m_b_band_graph_1sigma->SetLineColor(kGreen);
44 m_b_band_graph_1sigma->SetMarkerColor(kGreen);
47 double* b_2rms =
new double[n_points];
48 for (
int i=0;
i<n_points;++
i)
52 m_b_band_graph_2sigma =
new TGraphErrors(n_points, x_vals, b_vals ,
nullptr, b_2rms);
53 m_b_band_graph_2sigma->SetFillColor(kYellow);
54 m_b_band_graph_2sigma->SetFillColor(kYellow);
55 m_b_band_graph_2sigma->SetLineColor(kYellow);
56 m_b_band_graph_2sigma->SetMarkerColor(kYellow);
57 m_b_band_graph_2sigma->GetYaxis()->SetTitle(
"-2lnQ");
60 m_sb_line_graph =
new TGraph(n_points, x_vals, sb_vals);
61 m_sb_line_graph->SetLineWidth(2);
62 m_sb_line_graph->SetLineStyle(4);
63 m_sb_line_graph->SetLineColor(kRed);
64 m_sb_line_graph->SetFillColor(kWhite);
67 if (exp_vals!=
nullptr){
68 m_data_line_graph =
new TGraph(n_points, x_vals, exp_vals);
69 m_data_line_graph->SetLineWidth(2);
70 m_data_line_graph->SetFillColor(kWhite);
73 m_data_line_graph =
nullptr;
77 m_zero_line =
new TLine(m_b_line_graph->GetXaxis()->GetXmin(),0,
78 m_b_line_graph->GetXaxis()->GetXmax(),0);
82 m_legend =
new TLegend(0.75,0.78,0.98,0.98);
83 m_legend->SetName(
"Confidence Levels");
84 m_legend->AddEntry(m_b_band_graph_1sigma,
"-2lnQ #pm 1#sigma");
85 m_legend->AddEntry(m_b_band_graph_2sigma,
"-2lnQ #pm 2#sigma");
86 m_legend->AddEntry(m_b_line_graph,
"-2lnQ_{B}");
87 m_legend->AddEntry(m_sb_line_graph,
"-2lnQ_{SB}");
88 if (m_data_line_graph!=
nullptr)
89 m_legend->AddEntry(m_data_line_graph,
"-2lnQ_{Obs}");
91 m_legend->SetFillColor(0);
105 double* b_down_bars1,
107 double* b_down_bars2,
153 if (exp_vals!=
nullptr){
167 m_legend =
new TLegend(0.75,0.78,0.98,0.98);
168 m_legend->SetName(
"Confidence Levels");
176 m_legend->SetFillColor(0);
222 setCanvas(
new TCanvas(GetName(),GetTitle()));
228 TString opt(options);
230 if (opt.Contains(
"4")==0){
240 if (opt.Contains(
"4")==0){
263 TFile
ofile(RootFileName,options);
286 std::cout <<
"\nLEPBandPlot object " << GetName() <<
":\n";
void setCanvas(TCanvas *new_canvas)
Set the canvas.
TGraph * m_b_band_graph_1sigma
The b band 1 sigma.
void draw(const char *options="") override
Draw on canvas.
TGraph * m_sb_line_graph
The sb line.
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.
TLegend * m_legend
The legend.
TGraph * m_b_band_graph_2sigma
The b band 2 sigma.
~LEPBandPlot() override
Destructor.
TGraph * m_data_line_graph
The data line.
void setTitle(const char *title)
Set the title of the plot.
StatisticalPlot: the base class for the statistical plots.
TLine * m_zero_line
The line at 0.
void print(const char *options="") override
Print the relevant information.
void setXaxisTitle(const char *title)
Set the title of the x axis.
ClassImp(LEPBandPlot) LEPBandPlot
Constructor.
TGraph * m_b_line_graph
The b line.
TCanvas * getCanvas()
Get the canvas.
LEPBandPlot: The plot for the CL bands "a la LEP".
void dumpToFile(const char *RootFileName, const char *options) override
All the objects are written to rootfile.