00001 #ifndef DEDXCALIB_H
00002 #define DEDXCALIB_H
00003
00004 #include "GaudiKernel/Algorithm.h"
00005 #include "GaudiKernel/ISvcLocator.h"
00006 #include "MdcGeomSvc/MdcGeomSvc.h"
00007 #include "DedxCorrecSvc/DedxCorrecSvc.h"
00008
00009 #include "DedxCalibAlg/DedxCalibParameters.h"
00010
00011 class DedxCalib : public Algorithm
00012 {
00013 public:
00014 DedxCalib (const std::string& name, ISvcLocator* pSvcLocator);
00015 ~DedxCalib() {};
00016
00017 StatusCode initialize();
00018 StatusCode execute();
00019 StatusCode finalize();
00020
00021 virtual void genNtuple() = 0;
00022 virtual void initializing() = 0;
00023 virtual void BookHists() = 0;
00024 virtual void FillHists() = 0;
00025 virtual void AnalyseHists() = 0;
00026 virtual void WriteHists() = 0;
00027
00028 protected:
00029 IMdcGeomSvc* geosvc;
00030 IDedxCorrecSvc* exsvc;
00031
00032
00033 float truncate;
00034 double cal_dedx_bitrunc(float truncate, std::vector<double> phlist);
00035 double cal_dedx(float truncate, std::vector<double> phlist);
00036
00037
00038 void getCurvePar();
00039 vector<double> Curve_Para;
00040 vector<double> Sigma_Para;
00041 int vFlag[3];
00042 void set_dEdx( int landau, float dEdx, int trkalg, int runflag, int dedxhit_use, float ptrk, float theta, float pl_rp, int vflag[3] , double t0);
00043 double m_dedx_exp[5];
00044 double m_ex_sigma[5];
00045 double m_pid_prob[5];
00046 double m_chi_ex[5];
00047
00048 vector<string> m_recFileVector;
00049 void ReadRecFileList();
00050 int ParticleFlag;
00051 int m_calibflag;
00052 int m_phShapeFlag;
00053 std::string m_eventType;
00054 std::string m_recFileList;
00055 std::string m_rootfile;
00056 std::string m_curvefile;
00057 };
00058 #endif