CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_3_10/src/DQMServices/Diagnostic/interface/HDQMfitUtilities.h

Go to the documentation of this file.
00001 #ifndef DQMServices_HDQMfitUtilities_H
00002 #define DQMServices_HDQMfitUtilities_H
00003 
00004 #include <vector>
00005 #include <cstring>
00006 #include <iostream>
00007 #include <sstream>
00008 #include <string>
00009 #include "TH1.h"
00010 #include "TF1.h"
00011 #include "TMath.h"
00012 #include "DQMServices/Core/interface/MonitorElement.h"
00013 #include "FWCore/MessageLogger/interface/MessageLogger.h"
00014 
00015 
00023 namespace HDQMUtil{
00024   double langaufun(double *x, double *par);
00025   int32_t langaupro(double *params, double &maxx, double &FWHM);
00026   double Gauss(double *x, double *par);
00027 }
00028 
00029 class HDQMfitUtilities{
00030 
00031  public: 
00032 
00033   HDQMfitUtilities();
00034   ~HDQMfitUtilities();
00035  
00036   void   init();
00037   double doLanGaussFit(MonitorElement* ME){return doLanGaussFit(ME->getTH1F());}
00038   double doLanGaussFit(TH1F*);
00039 
00040   double doGaussFit(MonitorElement* ME){return doGaussFit(ME->getTH1F());}
00041   double doGaussFit(TH1F*);
00042   
00043   double getLanGaussPar(std::string s)   ;
00044   double getLanGaussParErr(std::string s);
00045   double getLanGaussConv(std::string s)  ;
00046   
00047   double getGaussPar(std::string s)   ;
00048   double getGaussParErr(std::string s);
00049 
00050   double getFitChi()  {return chi2GausS;}
00051   int    getFitnDof() {return nDofGausS;}
00052  
00053  private:
00054   
00055   double pLanGausS[4], epLanGausS[4];
00056   double pGausS[3], epGausS[3];
00057   double pLanConv[2];
00058   double chi2GausS;
00059   int32_t nDofGausS;
00060   TF1 *langausFit; 
00061   TF1 *gausFit;  
00062 };
00063 
00064 #endif // DQM_SiStripHistoricInfoClient_HDQMfitUtilities_H
00065 
00066 
00067