00001 #ifndef FUN_H
00002 #define FUN_H
00003
00004 #include <string>
00005 #include <cstring>
00006 #include <vector>
00007 #include "TROOT.h"
00008 #include "TObjArray.h"
00009
00010 #include "MdcCalibConst.h"
00011
00012
00013 const int NLAYER = 43;
00014 const int NWIRE = 6796;
00015 const int NLR = 3;
00016 const int NXTBIN = 50;
00017 const int NXTPAR = 8;
00018 const int NENTRXT = 18;
00019 const int NENTRSD = 6;
00020 const int NSDBIN = 24;
00021
00022 const int gfixXtC0 = 1;
00023 const double gTbinw = 10.0;
00024
00025 extern std::vector<double> XMEAS;
00026 extern std::vector<double> TBINCEN;
00027 extern std::vector<double> ERR;
00028 extern double Tmax;
00029 extern double Dmax;
00030 extern std::vector<double> XMEASED;
00031 extern std::vector<double> TBINCENED;
00032 extern std::vector<double> ERRED;
00033
00034 extern int gNEntr[43];
00035
00036
00037 extern double gTimeShift;
00038 extern double gTesMin;
00039 extern double gTesMax;
00040 extern int gFgIniCalConst;
00041 extern bool gPreT0SetTm;
00042 extern double gInitT0;
00043 extern double gT0Shift;
00044 extern double gTminFitChindf;
00045 extern double gTmaxFitChindf;
00046 extern int gResiType;
00047 extern int gCalSigma;
00048 extern int gFixXtC0;
00049 extern int gFgCalib[NLAYER];
00050 extern double gTminFitRange[NLAYER][2];
00051 extern double gTmaxFitRange[NLAYER][2];
00052 extern double gInitTm[NLAYER];
00053 extern double gQmin[NLAYER];
00054 extern double gQmax[NLAYER];
00055
00056 double xtFun(double t, double xtpar[]);
00057 void fcnXT(Int_t &npar, Double_t *gin, Double_t &f, Double_t *par, Int_t iflag);
00058 void fcnXtEdge(Int_t &npar, Double_t *gin, Double_t &f, Double_t *par, Int_t iflag);
00059 Double_t xtFitFun(Double_t *x, Double_t par[]);
00060 Double_t xtFitEdge(Double_t *x, Double_t par[]);
00061 void writeConst(MdcCalibConst* calconst, TObjArray* newXtList, TObjArray* r2tList);
00062 std::vector<std::string> getHistList();
00063 std::vector<std::string> getHistList(std::string path);
00064
00065 #endif