11#ifndef SIMPLE_PID_SVC_H
12#define SIMPLE_PID_SVC_H
14#include "GaudiKernel/Service.h"
21class IDataProviderSvc;
29 SimplePIDSvc(
const std::string& name, ISvcLocator* svcLoc);
34 virtual StatusCode
queryInterface(
const InterfaceID& riid,
void** ppvIF);
69 int getRunIdx(
int run_no);
70 int findBin(
double *a,
int length,
double value);
75 void dedxCorrection();
76 void tofBarrelCorrection();
77 void tofEndcapCorrection();
79 bool calEMCLikelihood();
84 double m_dedx_chi_cut;
88 IDataProviderSvc* eventSvc_;
95 double m_betagamma[5];
98 double m_tof_dt[8][5];
101 int m_tof_counter[2];
102 volatile int m_tof_barrel;
112 double m_dedx_chi[5];
114 double m_emc_likelihood[5];
116 double m_lh_electron;
122 TH2D *h_dedx_p_offset[2][4];
123 TH2D *h_dedx_p_sigma[2][4];
124 TH2D *h_dedx_m_offset[2][4];
125 TH2D *h_dedx_m_sigma[2][4];
132 TH1D *h_tof_p_q_offset[2][4][4];
133 TH1D *h_tof_p_q_sigma[2][4][4];
134 TH1D *h_tof_m_q_offset[2][4][4];
135 TH1D *h_tof_m_q_sigma[2][4][4];
136 TH2D *h_tof_p_bgcost_offset[2][4][4];
137 TH2D *h_tof_p_bgcost_sigma[2][4][4];
138 TH2D *h_tof_m_bgcost_offset[2][4][4];
139 TH2D *h_tof_m_bgcost_sigma[2][4][4];
141 TH2D *h_tof_p_wgt[2][4][15][5];
142 TH2D *h_tof_m_wgt[2][4][15][5];
143 TH2D *h_tof_p_final_offset[2][4][15];
144 TH2D *h_tof_p_final_sigma[2][4][15];
145 TH2D *h_tof_m_final_offset[2][4][15];
146 TH2D *h_tof_m_final_sigma[2][4][15];
153 TH1D *h_tofec_p_q_offset[2][4][2];
154 TH1D *h_tofec_p_q_sigma[2][4][2];
155 TH1D *h_tofec_m_q_offset[2][4][2];
156 TH1D *h_tofec_m_q_sigma[2][4][2];
157 TH1D *h_tofec_p_bg_offset[2][4][2];
158 TH1D *h_tofec_p_bg_sigma[2][4][2];
159 TH1D *h_tofec_m_bg_offset[2][4][2];
160 TH1D *h_tofec_m_bg_sigma[2][4][2];
161 TH1D *h_tofec_p_cost_offset[2][4][2];
162 TH1D *h_tofec_p_cost_sigma[2][4][2];
163 TH1D *h_tofec_m_cost_offset[2][4][2];
164 TH1D *h_tofec_m_cost_sigma[2][4][2];
172 TH1D *h_emc_ep[3][4][15][25];
173 TH1D *h_emc_e35[3][4][15][25];
177 TFile *f_tof_q[2][4];
178 TFile *f_tof_bgcost[2][4];
179 TFile *f_tof_wgt[2][4];
180 TFile *f_tof_final[2][4];
181 TFile *f_tofec_q[2][4];
182 TFile *f_tofec_bg[2][4];
183 TFile *f_tofec_cost[2][4];
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()
virtual StatusCode queryInterface(const InterfaceID &riid, void **ppvIF)