CMS 3D CMS Logo

GenericPlotter.h
Go to the documentation of this file.
1 #ifndef SUSYCAF_GENERIC_PLOTTER_H
2 #define SUSYCAF_GENERIC_PLOTTER_H
3 
4 #include <vector>
5 #include <string>
6 #include <TLegend.h>
7 namespace edm { class ParameterSet;}
8 class Book;
9 class TH1;
10 class TCanvas;
11 
13  public:
15  const std::string printSuffix_, plotDocument_, drawOption2D_;
16  const bool normalize_,legend_;
17  const unsigned canvasWidth_,canvasHeight_;
18  const std::vector<std::string> replace_text_;
19  const double maxRatioUncertainty_;
20  const double fixRatioYAxis_;
21 
22  void plot_all(std::vector<Book*>&, int reference = -1) const;
23  void plot1D(std::string, std::vector<std::string>&, std::vector<TH1*>&, int reference = -1) const;
24  void plot2D(std::string, std::vector<std::string>&, std::vector<TH1*>&) const;
25  void plotRatio(bool, std::vector<std::string>&, std::vector<TH1*>&, int reference, TCanvas& c) const;
26 
27  TLegend* make_legend2D(const std::string, TH1*) const;
28  TLegend make_legend(const std::vector<std::string>&, const std::vector<TH1*>&) const;
29  void normalize(std::vector<TH1*>&) const;
30  void setLabels(std::vector<TH1*>&) const;
31  void setBounds(std::vector<TH1*>&, bool, bool) const;
32  double hist_maximum(TH1*) const;
33  double hist_minimum(TH1*) const;
34 
35  void plotDocumentOpen() const;
36  void plotDocumentClose() const;
37  void plotDocumentAdd(const TCanvas&) const;
38  void printFile(const std::string&, const TCanvas&) const;
39 
40  // User must clean up the created ratio histograms.
41  static void make_rebinned_ratios(std::vector<TH1*>& ratios, const std::vector<TH1*>& hist, int reference, double maxUncertainty, const std::string& refName, const std::string postfix = "_ratio");
42  static double ratioError2(double numerator, double numeratorError2, double denominator, double denominatorError2);
43 
44 };
45 
46 #endif
const std::string printSuffix_
const double maxRatioUncertainty_
const bool normalize_
const unsigned canvasWidth_
const std::vector< std::string > replace_text_
HLT enums.
Definition: Book.h:16
const double fixRatioYAxis_