CMS 3D CMS Logo

/data/doxygen/doxygen-1.7.3/gen/CMSSW_4_2_8/src/Validation/RecoJets/interface/FitHist.h

Go to the documentation of this file.
00001 #ifndef FitHist_h
00002 #define FitHist_h
00003 
00004 #include "Validation/RecoJets/interface/CompHist.h"
00005 #include "Validation/RecoJets/interface/CompMethods.h"
00006 
00007 
00008 class FitHist : public CompHist{
00009 
00010  public:
00011 
00012   enum EvalType{kStabilizedGauss, kHistogramMean, kMaximalValue, kQuantile};
00013 
00014  public:
00015 
00016   FitHist():CompHist(false){};
00017   FitHist(bool verbose):CompHist(verbose){};
00018   //~FitHist(){ file_->Close(); };
00019   virtual ~FitHist(){};
00020 
00021   //extra members
00022   void fitAndDrawPs();
00023   void fitAndDrawEps();
00024   void fillTargetHistograms();
00025   void writeFitOutput();
00026 
00027  protected:
00028 
00029   //io helpers
00030   void configBlockFit(ConfigFile&);
00031 
00032   //extra members
00033   bool checkTargetHistList();
00034   bool isInFitTargetList(std::string&);
00035   TH1F& findFitHistogram(const TObjArray&, TString&, TString&, int&); 
00036   TH1F& findTargetHistogram(const TObjArray&, TString&, TString&, TString&);
00037   double normalize(TString&, double); 
00038   void fillTargetHistogram(std::string&);
00039   void fillTargetHistogramBin(TH1F&, TH1F&, int);
00040   void fillTargetHistogramBin(TH1F&, TH1F&, int, TString&, Quantile&);
00041   void fillTargetHistogramBin(TH1F&, TH1F&, int, TString&, MaximalValue&);
00042   void fillTargetHistogramBin(TH1F&, TH1F&, int, TString&, HistogramMean&);
00043   void fillTargetHistogramBin(TH1F&, TH1F&, int, TString&, StabilizedGauss&);
00044   void setFitHistogramAxes(TH1F&, int);
00045   void addBinLabelToFitHist(const TObjArray&, int&, TString&, TString&);
00046   void addParLabelToFitHist(const TH1F&);
00047 
00048  protected:
00049 
00050   //---------------------------------------------
00051   // Interface
00052   //---------------------------------------------
00053 
00054   //define additional input
00055   std::vector<std::string> targetHistList_;  // list of target histograms to be filled
00056 
00057   //define additional histogram design
00058   std::vector<int> axesIndex_;               // index list of axis titels of fit histograms
00059   std::vector<std::string> xAxesFit_;        // x axis title(s) of fit histograms 
00060   std::vector<std::string> yAxesFit_;        // y axis title(s) of fit histograms
00061 
00062   //define fit/eval procedure
00063 
00064   int evalType_;                             // evaluation type
00065   int fitFuncType_;                          // fit function type
00066   std::string fitFuncName_;                  // fit functino name
00067   std::string fitFuncTitle_;                 // fit function title (to be shown in legend)
00068   double fitFuncLowerBound_;                 // lower bound of fit function
00069   double fitFuncUpperBound_;                 // upper bound of fit function
00070 };
00071 
00072 #endif