00001 #ifndef XTINTECALIB_H
00002 #define XTINTECALIB_H
00003
00004 #include "CalibBase.h"
00005
00006 #include "TObjArray.h"
00007 #include "TFile.h"
00008 #include "TH1F.h"
00009 #include "TH2F.h"
00010 #include "TProfile.h"
00011
00012 class XtInteCalib: public CalibBase {
00013 public:
00014 XtInteCalib();
00015 ~XtInteCalib();
00016 void init(TObjArray* hlist, MdcCosGeom* pGeom);
00017 void mergeHist(TFile* fhist);
00018 void calib(MdcCalibConst* calconst, TObjArray* newXtList, TObjArray* r2tList);
00019
00020 private:
00021 void renameHist();
00022 bool saveOldXt(TObjArray* newXtList);
00023
00024 int m_nMaxGrPoint;
00025 double m_tbinWid[NLAYER][3];
00026 double m_tbinLim[NLAYER][4];
00027
00028 TFolder* m_fdPf;
00029 TH2F* m_haxis;
00030 TGraph* m_grXtOld[NLAYER][NENTRXT][2];
00031 TGraph* m_grXt[NLAYER][NENTRXT][2];
00032 TProfile* m_pfNear[NLAYER][NENTRXT][2];
00033 TProfile* m_pfMid[NLAYER][NENTRXT][2];
00034 TProfile* m_pfFar[NLAYER][NENTRXT][2];
00035
00036 bool getXt(int lay, int iEntr, int lr, TGraph* gr);
00037 bool funXt0(int lay, int iEntr, int lr, TGraph* gr);
00038 bool funXt1(int lay, int iEntr, int lr, TGraph* gr);
00039 int findXtEntr(int lay, int iEntr, int lr) const;
00040 int findXtEntrEdge(int lay, int iEntr, int lr) const;
00041
00042 vector<double> m_vt;
00043 vector<double> m_vd;
00044 vector<double> m_entries;
00045 bool m_fgFit[NLAYER][NENTRXT][2];
00046 bool m_fgEdge[NLAYER][NENTRXT][2];
00047 };
00048
00049 #endif