CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
FitHist.h
Go to the documentation of this file.
1 #ifndef FitHist_h
2 #define FitHist_h
3 
6 
7 
8 class FitHist : public CompHist{
9 
10  public:
11 
13 
14  public:
15 
17  FitHist(bool verbose):CompHist(verbose){};
18  //~FitHist(){ file_->Close(); };
19  virtual ~FitHist(){};
20 
21  //extra members
22  void fitAndDrawPs();
23  void fitAndDrawEps();
24  void fillTargetHistograms();
25  void writeFitOutput();
26 
27  protected:
28 
29  //io helpers
31 
32  //extra members
33  bool checkTargetHistList();
34  bool isInFitTargetList(std::string&);
35  TH1F& findFitHistogram(const TObjArray&, TString&, TString&, int&);
36  TH1F& findTargetHistogram(const TObjArray&, TString&, TString&, TString&);
37  double normalize(TString&, double);
38  void fillTargetHistogram(std::string&);
39  void fillTargetHistogramBin(TH1F&, TH1F&, int);
40  void fillTargetHistogramBin(TH1F&, TH1F&, int, TString&, Quantile&);
41  void fillTargetHistogramBin(TH1F&, TH1F&, int, TString&, MaximalValue&);
42  void fillTargetHistogramBin(TH1F&, TH1F&, int, TString&, HistogramMean&);
43  void fillTargetHistogramBin(TH1F&, TH1F&, int, TString&, StabilizedGauss&);
44  void setFitHistogramAxes(TH1F&, int);
45  void addBinLabelToFitHist(const TObjArray&, int&, TString&, TString&);
46  void addParLabelToFitHist(const TH1F&);
47 
48  protected:
49 
50  //---------------------------------------------
51  // Interface
52  //---------------------------------------------
53 
54  //define additional input
55  std::vector<std::string> targetHistList_; // list of target histograms to be filled
56 
57  //define additional histogram design
58  std::vector<int> axesIndex_; // index list of axis titels of fit histograms
59  std::vector<std::string> xAxesFit_; // x axis title(s) of fit histograms
60  std::vector<std::string> yAxesFit_; // y axis title(s) of fit histograms
61 
62  //define fit/eval procedure
63 
64  int evalType_; // evaluation type
65  int fitFuncType_; // fit function type
66  std::string fitFuncName_; // fit functino name
67  std::string fitFuncTitle_; // fit function title (to be shown in legend)
68  double fitFuncLowerBound_; // lower bound of fit function
69  double fitFuncUpperBound_; // upper bound of fit function
70 };
71 
72 #endif
std::string fitFuncName_
Definition: FitHist.h:66
int evalType_
Definition: FitHist.h:64
double fitFuncUpperBound_
Definition: FitHist.h:69
void fitAndDrawPs()
Definition: FitHist.cc:314
Definition: FitHist.h:8
void addBinLabelToFitHist(const TObjArray &, int &, TString &, TString &)
Definition: FitHist.cc:266
void configBlockFit(ConfigFile &)
Definition: FitHist.cc:9
void fitAndDrawEps()
Definition: FitHist.cc:414
TH1F & findFitHistogram(const TObjArray &, TString &, TString &, int &)
Definition: FitHist.cc:77
void writeFitOutput()
Definition: FitHist.cc:562
bool isInFitTargetList(std::string &)
Definition: FitHist.cc:59
std::vector< std::string > yAxesFit_
Definition: FitHist.h:60
std::vector< std::string > targetHistList_
Definition: FitHist.h:55
void addParLabelToFitHist(const TH1F &)
Definition: FitHist.cc:291
std::vector< std::string > xAxesFit_
Definition: FitHist.h:59
EvalType
Definition: FitHist.h:12
FitHist(bool verbose)
Definition: FitHist.h:17
virtual ~FitHist()
Definition: FitHist.h:19
double fitFuncLowerBound_
Definition: FitHist.h:68
std::vector< int > axesIndex_
Definition: FitHist.h:58
void fillTargetHistograms()
Definition: FitHist.cc:512
double normalize(TString &, double)
Definition: FitHist.cc:145
int fitFuncType_
Definition: FitHist.h:65
std::string fitFuncTitle_
Definition: FitHist.h:67
void fillTargetHistogram(std::string &)
Definition: FitHist.cc:523
bool checkTargetHistList()
Definition: FitHist.cc:44
void setFitHistogramAxes(TH1F &, int)
Definition: FitHist.cc:242
TH1F & findTargetHistogram(const TObjArray &, TString &, TString &, TString &)
Definition: FitHist.cc:111
void fillTargetHistogramBin(TH1F &, TH1F &, int)
Definition: FitHist.cc:199
FitHist()
Definition: FitHist.h:16