CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
DrawIteration.h
Go to the documentation of this file.
1 #ifndef DrawIteration_h
2 #define DrawIteration_h
3 
4 
5 
6 #include <vector>
7 #include <map>
8 
9 #include "TString.h"
10 #include "TFile.h"
11 #include "TGraph.h"
12 
13 
14 
16  public:
17  DrawIteration(unsigned int =0, const bool =false);
19 
20  void yAxisFixed(const bool yAxis){yAxisFixed_ = yAxis;}
21 
22  void drawIteration(unsigned int =0, unsigned int =99999);
23  void drawResult();
24 
25  void addSystematics();
26  void addCmsText(const TString&);
27 
28  void addInputFile(const TString&, const TString&);
29  void outputDirectory(const TString&);
30 
31  private:
32  struct ExtremeValues{
33  ExtremeValues(const double minApe, const double maxApe, const double maxAbsCorr):
34  minimumApe(minApe), maximumApe(maxApe), maxAbsCorrection(maxAbsCorr){}
35  const double minimumApe;
36  const double maximumApe;
37  const double maxAbsCorrection;
38  };
39 
40  struct SectorValues{
42  std::map<unsigned int, std::string*> m_sectorName;
43  std::map<unsigned int, std::vector<double> > m_sectorValueX;
44  std::map<unsigned int, std::vector<double> > m_sectorValueY;
45  };
46 
48  ExtremeValues getGraphs(const std::string, unsigned int, unsigned int);
49  void drawCorrections(const std::string&, const ExtremeValues&, const std::string&);
50  void printFinalValues(unsigned int, unsigned int);
51  void clear();
52 
53  std::vector<std::vector<std::string> > arrangeHists();
54  std::vector<std::string> pixelHist();
55  std::vector<std::string> barrelHist();
56  std::vector<std::string> tibHist();
57  std::vector<std::string> tobHist();
58  std::vector<std::string> endcapHist();
59  std::vector<std::string> tidHist();
60  std::vector<std::string> tecHist();
61  TString associateLabel(const std::string&);
62  unsigned int sectorNumber(const std::string&);
63  void drawFinals(const std::string&);
64  bool createResultHist(TH1*&, const std::vector<std::string>&, const std::string&, SectorValues&, unsigned int);
65 
66  const TString* outpath_;
67  TFile* file_;
68  const bool overlayMode_;
70 
72 
73  std::vector<TGraph*> v_graphApeX_;
74  std::vector<TGraph*> v_graphCorrectionX_;
75  std::vector<TGraph*> v_graphApeY_;
76  std::vector<TGraph*> v_graphCorrectionY_;
77 
78  std::vector<std::vector<std::string> > v_resultHist_;
80  TString cmsText_;
81 
82  struct Input{
83  Input(TString name, TString legend): fileName(name), legendEntry(legend), file(0){}
84 
85  TString fileName;
86  TString legendEntry;
87  TFile* file;
88 
90  };
91 
92  std::vector<Input*> v_input_;
93 };
94 
95 
96 
97 
98 
99 #endif
100 
101 
102 
103 
void printFinalValues(unsigned int, unsigned int)
void yAxisFixed(const bool yAxis)
Definition: DrawIteration.h:20
TString cmsText_
Definition: DrawIteration.h:80
void outputDirectory(const TString &)
SectorValues getSectorValues(TFile *)
void drawCorrections(const std::string &, const ExtremeValues &, const std::string &)
SectorValues sectorValues
Definition: DrawIteration.h:89
std::vector< std::string > barrelHist()
TString associateLabel(const std::string &)
void addInputFile(const TString &, const TString &)
void drawFinals(const std::string &)
std::map< unsigned int, std::vector< double > > m_sectorValueY
Definition: DrawIteration.h:44
SectorValues sectorValues_
Definition: DrawIteration.h:71
std::vector< std::string > endcapHist()
std::vector< TGraph * > v_graphApeX_
Definition: DrawIteration.h:73
std::vector< std::string > pixelHist()
std::map< unsigned int, std::vector< double > > m_sectorValueX
Definition: DrawIteration.h:43
std::vector< std::string > tibHist()
std::vector< std::vector< std::string > > arrangeHists()
void addSystematics()
const bool overlayMode_
Definition: DrawIteration.h:68
const TString * outpath_
Definition: DrawIteration.h:66
DrawIteration(unsigned int=0, const bool=false)
ExtremeValues getGraphs(const std::string, unsigned int, unsigned int)
std::vector< std::string > tobHist()
Input(TString name, TString legend)
Definition: DrawIteration.h:83
std::vector< std::string > tidHist()
std::vector< TGraph * > v_graphApeY_
Definition: DrawIteration.h:75
std::vector< TGraph * > v_graphCorrectionY_
Definition: DrawIteration.h:76
bool createResultHist(TH1 *&, const std::vector< std::string > &, const std::string &, SectorValues &, unsigned int)
void drawResult()
std::vector< std::string > tecHist()
ExtremeValues(const double minApe, const double maxApe, const double maxAbsCorr)
Definition: DrawIteration.h:33
std::vector< std::vector< std::string > > v_resultHist_
Definition: DrawIteration.h:78
void addCmsText(const TString &)
std::map< unsigned int, std::string * > m_sectorName
Definition: DrawIteration.h:42
std::vector< TGraph * > v_graphCorrectionX_
Definition: DrawIteration.h:74
std::vector< Input * > v_input_
Definition: DrawIteration.h:92
void drawIteration(unsigned int=0, unsigned int=99999)
unsigned int sectorNumber(const std::string &)