11#ifndef SIMPLE_PID_SVC_H
12#define SIMPLE_PID_SVC_H
14#include "GaudiKernel/Service.h"
21class IDataProviderSvc;
30 SimplePIDSvc(
const std::string& name, ISvcLocator* svcLoc);
70 int getRunIdx(
int run_no);
71 int findBin(
double *a,
int length,
double value);
76 void dedxCorrection();
77 void tofBarrelCorrection();
78 void tofEndcapCorrection();
80 bool calEMCLikelihood();
82 void dedxSecondCorrection();
83 void tofBarrelSecondCorrection();
84 void tofEndcapSecondCorrection();
90 double m_dedx_chi_cut;
94 IDataProviderSvc* eventSvc_;
101 double m_betagamma[5];
104 double m_tof_dt[8][5];
107 int m_tof_counter[2];
108 volatile int m_tof_barrel;
118 double m_dedx_chi[5];
120 double m_emc_likelihood[5];
122 double m_lh_electron;
128 TH2D *h_dedx_p_offset[2][4];
129 TH2D *h_dedx_p_sigma[2][4];
130 TH2D *h_dedx_m_offset[2][4];
131 TH2D *h_dedx_m_sigma[2][4];
138 TH1D *h_tof_p_q_offset[2][4][4];
139 TH1D *h_tof_p_q_sigma[2][4][4];
140 TH1D *h_tof_m_q_offset[2][4][4];
141 TH1D *h_tof_m_q_sigma[2][4][4];
142 TH2D *h_tof_p_bgcost_offset[2][4][4];
143 TH2D *h_tof_p_bgcost_sigma[2][4][4];
144 TH2D *h_tof_m_bgcost_offset[2][4][4];
145 TH2D *h_tof_m_bgcost_sigma[2][4][4];
147 TH2D *h_tof_p_wgt[2][4][15][5];
148 TH2D *h_tof_m_wgt[2][4][15][5];
149 TH2D *h_tof_p_final_offset[2][4][15];
150 TH2D *h_tof_p_final_sigma[2][4][15];
151 TH2D *h_tof_m_final_offset[2][4][15];
152 TH2D *h_tof_m_final_sigma[2][4][15];
159 TH1D *h_tofec_p_q_offset[2][4][2];
160 TH1D *h_tofec_p_q_sigma[2][4][2];
161 TH1D *h_tofec_m_q_offset[2][4][2];
162 TH1D *h_tofec_m_q_sigma[2][4][2];
163 TH1D *h_tofec_p_bg_offset[2][4][2];
164 TH1D *h_tofec_p_bg_sigma[2][4][2];
165 TH1D *h_tofec_m_bg_offset[2][4][2];
166 TH1D *h_tofec_m_bg_sigma[2][4][2];
167 TH1D *h_tofec_p_cost_offset[2][4][2];
168 TH1D *h_tofec_p_cost_sigma[2][4][2];
169 TH1D *h_tofec_m_cost_offset[2][4][2];
170 TH1D *h_tofec_m_cost_sigma[2][4][2];
178 TH1D *h_emc_ep[3][4][15][25];
179 TH1D *h_emc_e35[3][4][15][25];
183 TFile *f_tof_q[2][4];
184 TFile *f_tof_bgcost[2][4];
185 TFile *f_tof_wgt[2][4];
186 TFile *f_tof_final[2][4];
187 TFile *f_tofec_q[2][4];
188 TFile *f_tofec_bg[2][4];
189 TFile *f_tofec_cost[2][4];
193 double m_gaussion_mean[6][4][10];
194 double m_gaussion_sigma[6][4][10];
195 double m_gaussion_sigmab[6][4][10];
NTuple::Item< double > m_p
void settofminchi(double x)
void seteidratio(double x)
void preparePID(EvtRecTrack *track)
void setdedxminchi(double x)
double getEmcLikelihood(int i)
virtual StatusCode initialize()
double getTofDt(int m, int n)
bool iselectron(bool emc=true)
double getElectronLikelihood()
virtual StatusCode finalize()