1#include "GaudiKernel/IDataProviderSvc.h"
2#include "GaudiKernel/MsgStream.h"
3#include "GaudiKernel/SmartDataPtr.h"
23 declareProperty(
"DedxChiCut", m_dedx_chi_cut = 4);
24 declareProperty(
"TofChiCut", m_tof_chi_cut = 4);
25 declareProperty(
"IsTofCorr", m_tof_corr =
true);
26 declareProperty(
"IsDedxCorr", m_dedx_corr =
true);
27 declareProperty(
"EidRatio", m_eid_ratio = 0.80);
34 MsgStream log(messageService(), name());
35 log << MSG::INFO <<
"in SimplePIDSvc initialize()" << endreq;
37 StatusCode sc = Service::initialize();
39 sc = serviceLocator()->service(
"EventDataSvc", eventSvc_,
true);
49 MsgStream log(messageService(), name());
50 log << MSG::INFO <<
"in SimplePIDSvc finalize()" << endreq;
52 StatusCode sc = Service::finalize();
54 for (
unsigned int i = 0; i < 2; i++)
56 for (
unsigned int j = 0; j < 4; j++)
58 f_dedx[i][j]->Close();
59 f_tof_q[i][j]->Close();
60 f_tof_bgcost[i][j]->Close();
61 f_tof_wgt[i][j]->Close();
62 f_tof_final[i][j]->Close();
63 f_tofec_q[i][j]->Close();
64 f_tofec_bg[i][j]->Close();
65 f_tofec_cost[i][j]->Close();
68 for (
unsigned int i = 0; i < 3; i++)
70 for (
unsigned int j = 0; j < 4; j++)
98 SmartDataPtr<Event::EventHeader> eventHeaderpid(eventSvc_,
"/Event/EventHeader");
99 m_run = eventHeaderpid->runNumber();
118 for(
unsigned int pid = 0; pid < 5; pid++)
121 m_p[pid] = mdckalTrk->
p();
122 m_betagamma[pid] = m_p[pid] /
mass[pid];
123 m_charge[pid] = mdckalTrk->
charge();
124 m_cost[pid] =
cos(mdckalTrk->
theta());
129 for(
unsigned int i = 0; i < 5; i++)
132 m_betagamma[i] = -99;
144 dedxSecondCorrection();
150 if (m_tof_barrel == 1)
152 tofBarrelCorrection();
153 tofBarrelSecondCorrection();
155 else if (m_tof_barrel == 0)
157 tofEndcapCorrection();
158 tofEndcapSecondCorrection();
167void SimplePIDSvc::calprob()
169 bool usededx =
false;
172 for (
unsigned int i = 0; i < 5 ;i++)
174 if (!usededx && fabs(m_dedx_chi[i]) < m_dedx_chi_cut)
176 if (!usetof && fabs(m_tof_chi[i]) < m_tof_chi_cut)
179 m_dedx_only[i] =
false;
183 for(
unsigned int i = 0; i < 5; i++)
188 for(
unsigned int i = 0; i < 5; i++)
192 for (
unsigned int i = 0; i < 5; i++)
198 if (usededx && usetof)
200 chi2 = pow(m_dedx_chi[i], 2) + pow(m_tof_chi[i], 2);
203 else if (usededx && !usetof)
205 chi2 = pow(m_dedx_chi[i], 2);
207 m_dedx_only[i] =
true;
209 else if (!usededx && usetof)
211 chi2 = pow(m_tof_chi[i],2);
214 if (ndf > 0 && chi2 > 0)
215 m_prob[i] = TMath::Prob(chi2, ndf);
219int SimplePIDSvc::getRunIdx(
int run_no)
226 const int RUN_BEGIN_DATA_10 = 11414;
227 const int RUN_END_DATA_10 = 14604;
228 const int RUN_BEGIN_MC_10 = -14604;
229 const int RUN_END_MC_10 = -11414;
230 const int RUN_BEGIN_DATA_11 = 20448;
231 const int RUN_END_DATA_11 = 23454;
232 const int RUN_BEGIN_MC_11 = -23454;
233 const int RUN_END_MC_11 = -20448;
235 const int RUN_BEGIN_DATA_22 = 70521;
236 const int RUN_END_DATA_22 = 73930;
237 const int RUN_BEGIN_MC_22 = -73930;
238 const int RUN_END_MC_22 = -70521;
240 const int RUN_BEGIN_DATA_23 = 74031;
241 const int RUN_END_DATA_23 = 78536;
242 const int RUN_BEGIN_MC_23 = -78536;
243 const int RUN_END_MC_23 = -74031;
245 const int RUN_BEGIN_DATA_24 = 78615;
246 const int RUN_END_DATA_24 = 81094;
247 const int RUN_BEGIN_MC_24 = -81094;
248 const int RUN_END_MC_24 = -78615;
250 if (run_no >= RUN_BEGIN_DATA_10 && run_no <= RUN_END_DATA_10)
252 else if (run_no >= RUN_BEGIN_DATA_11 && run_no <= RUN_END_DATA_11)
254 else if (run_no >= RUN_BEGIN_MC_10 && run_no <= RUN_END_MC_10)
256 else if (run_no >= RUN_BEGIN_MC_11 && run_no <= RUN_END_MC_11)
259 else if (run_no >= RUN_BEGIN_DATA_22 && run_no <= RUN_END_DATA_22)
261 else if (run_no >= RUN_BEGIN_MC_22 && run_no <= RUN_END_MC_22)
263 else if (run_no >= RUN_BEGIN_DATA_23 && run_no <= RUN_END_DATA_23)
265 else if (run_no >= RUN_BEGIN_MC_23 && run_no <= RUN_END_MC_23)
267 else if (run_no >= RUN_BEGIN_DATA_24 && run_no <= RUN_END_DATA_24)
269 else if (run_no >= RUN_BEGIN_MC_24 && run_no <= RUN_END_MC_24)
279 for (
unsigned int i = 0; i < 8; i++)
281 for (
unsigned int j = 0; j < 5; j++)
282 m_tof_dt[i][j] = -99.;
285 for (
unsigned int i = 0; i < 2; i++)
287 m_tof_zr[i] = -9999.;
288 m_tof_counter[i] = -1;
290 for (
unsigned int i = 0; i < 5; i++)
298 SmartRefVector<RecTofTrack> tofTrk = track->
tofTrack();
299 SmartRefVector<RecTofTrack>::iterator it;
307 for (it = tofTrk.begin(); it != tofTrk.end(); it++)
309 unsigned int st = (*it)->status();
311 if (hitst->
is_raw())
continue;
316 int layer = hitst->
layer();
317 double tof = (*it)->tof();
318 double ph = (*it)->ph();
319 m_tof_counter[layer-1] = (*it)->tofID();
330 m_tof_zr[0] = zrhit[0];
331 m_tof_zr[1] = zrhit[1];
337 idx = ((st & 0xC0) >> 5) + (((st ^ 0x20) & 0x20) >> 5) - 2;
349 if (idx == -1)
continue;
351 for (
unsigned int i = 0; i < 5; i++)
353 double offset = (*it)->toffset(i);
354 double texp = (*it)->texp(i);
355 if (texp < 0.0)
continue;
356 double dt = tof - offset - texp;
357 m_tof_dt[idx][i] =
dt;
363void SimplePIDSvc::tofBarrelCorrection()
365 const double EPS = 1e-4;
366 const double BG_LOW = 0.20;
367 const double BG_UP = 7.40;
368 const double COST_LOW = -0.81;
369 const double COST_UP = 0.81;
370 const double Q_LOW = 0.;
371 const double Q_UP = 9000.;
372 const double P_LOW = 0.2;
373 const double P_UP = 1.3;
374 const int BIN_BG = 15;
375 const int BIN_COST = 15;
376 const int BIN_P = 15;
377 double BG[BIN_BG + 1] = {0.20, 0.87, 1.11, 1.35, 1.55, 1.72, 1.91, 2.17, 2.63, 3.05, 3.47, 3.93, 4.50, 5.27, 6.00, 7.40};
378 double COST[BIN_COST + 1] = {-0.81, -0.64, -0.53, -0.43, -0.33, -0.23, -0.13, -0.04, 0.05, 0.14, 0.24, 0.34, 0.44, 0.54, 0.65, 0.81};
379 double P[BIN_P + 1] = {0.20, 0.47, 0.56, 0.65, 0.72, 0.79, 0.86, 0.92, 0.98, 1.03, 1.08, 1.13, 1.17, 1.22, 1.26, 1.30};
380 int idx = getRunIdx(m_run);
384 for (
unsigned int i = 0; i < 4; i++)
387 int bin_bg, bin_cost, bin_wgt;
392 bin_bg = findBin(
P, BIN_P,
bg);
395 else if (i == 2 || i == 3)
398 bin_bg = findBin(BG, BIN_BG,
bg);
405 double cost = m_cost[i];
408 double offset,
sigma;
409 double offset_q, offset_bgcost;
410 int flag[4] = {0, 0, 0, 0, };
412 bin_cost = findBin(COST, BIN_COST, cost);
413 if (bin_bg == -1 || bin_cost == -1)
continue;
416 for (
unsigned int j = 0; j < 4; j++)
418 t[j] = m_tof_dt[j][i];
419 if (fabs(
t[j] + 99.) <
EPS)
427 offset_q = h_tof_p_q_offset[pid][idx][j]->Interpolate(
q );
428 offset_bgcost = h_tof_p_bgcost_offset[pid][idx][j]->Interpolate(
bg, cost );
429 t[j] =
t[j] - offset_q - offset_bgcost;
433 offset_q = h_tof_m_q_offset[pid][idx][j]->Interpolate(
q );
434 offset_bgcost = h_tof_m_bgcost_offset[pid][idx][j]->Interpolate(
bg, cost );
435 t[j] =
t[j] - offset_q - offset_bgcost;
439 if (bin_wgt == -1)
continue;
441 for (
unsigned int j = 0; j < 4; j++)
444 t[4] +=
t[j] * h_tof_p_wgt[pid][idx][bin_wgt][j]->GetBinContent( bin_bg+1, bin_cost+1 );
446 t[4] +=
t[j] * h_tof_m_wgt[pid][idx][bin_wgt][j]->GetBinContent( bin_bg+1, bin_cost+1 );
450 t[4] /= h_tof_p_wgt[pid][idx][bin_wgt][4]->GetBinContent( bin_bg+1, bin_cost+1 );
451 offset = h_tof_p_final_offset[pid][idx][bin_wgt]->Interpolate(
bg, cost );
452 sigma = h_tof_p_final_sigma[pid][idx][bin_wgt]-> Interpolate(
bg, cost );
453 m_tof_chi[i] = (
t[4] - offset) /
sigma;
457 t[4] /= h_tof_m_wgt[pid][idx][bin_wgt][4]->GetBinContent( bin_bg+1, bin_cost+1 );
458 offset = h_tof_m_final_offset[pid][idx][bin_wgt]->Interpolate(
bg, cost );
459 sigma = h_tof_m_final_sigma[pid][idx][bin_wgt]-> Interpolate(
bg, cost );
460 m_tof_chi[i] = (
t[4] - offset) /
sigma;
466void SimplePIDSvc::tofEndcapCorrection()
468 const double EPS = 1e-4;
469 const double BG_LOW = 0.30;
470 const double BG_UP = 7.40;
471 const double Q_LOW = 0.;
472 const double Q_UP = 6000.;
473 const double COST_EAST_LOW = 0.720;
474 const double COST_EAST_UP = 0.930;
475 const double COST_WEST_LOW = -0.930;
476 const double COST_WEST_UP = -0.720;
477 const double P_LOW = 0.2;
478 const double P_UP = 1.3;
480 int idx = getRunIdx(m_run);
484 for (
unsigned int i = 0; i < 4; i++)
493 else if (i == 2 || i == 3)
504 double cost = m_cost[i];
506 double t = m_tof_dt[7][i];
507 double q = m_tof_ph[7];
508 double off_q, off_bg, off_cost;
509 double sg_q, sg_bg, sg_cost;
513 cost =
max(COST_EAST_LOW+
EPS,
min(COST_EAST_UP-
EPS, cost));
518 cost =
max(COST_WEST_LOW+
EPS,
min(COST_WEST_UP-
EPS, cost));
525 off_q = h_tofec_p_q_offset[pid][idx][
flag] ->Interpolate(
q );
526 sg_q = h_tofec_p_q_sigma[pid][idx][
flag] ->Interpolate(
q );
527 off_bg = h_tofec_p_bg_offset[pid][idx][
flag] ->Interpolate(
bg );
528 sg_bg = h_tofec_p_bg_sigma[pid][idx][
flag] ->Interpolate(
bg );
529 off_cost = h_tofec_p_cost_offset[pid][idx][
flag]->Interpolate( cost );
530 sg_cost = h_tofec_p_cost_sigma[pid][idx][
flag] ->Interpolate( cost );
531 m_tof_chi[i] = (((
t - off_q) / sg_q - off_bg) / sg_bg - off_cost) / sg_cost;
535 off_q = h_tofec_m_q_offset[pid][idx][
flag] ->Interpolate(
q );
536 sg_q = h_tofec_m_q_sigma[pid][idx][
flag] ->Interpolate(
q );
537 off_bg = h_tofec_m_bg_offset[pid][idx][
flag] ->Interpolate(
bg );
538 sg_bg = h_tofec_m_bg_sigma[pid][idx][
flag] ->Interpolate(
bg );
539 off_cost = h_tofec_m_cost_offset[pid][idx][
flag]->Interpolate( cost );
540 sg_cost = h_tofec_m_cost_sigma[pid][idx][
flag] ->Interpolate( cost );
541 m_tof_chi[i] = (((
t - off_q) / sg_q - off_bg) / sg_bg - off_cost) / sg_cost;
552 for (
unsigned int i = 0; i < 5; i++)
553 m_dedx_chi[i] = dedx_trk->
chi(i);
557 for (
unsigned int i = 0; i < 5; i++)
562void SimplePIDSvc::dedxCorrection()
564 int idx = getRunIdx(m_run);
565 const double EPS = 1e-4;
566 const double BG_LOW = 0.20;
567 const double BG_UP = 7.40;
568 const double COST_LOW = -0.93;
569 const double COST_UP = 0.93;
570 const double P_LOW = 0.2;
571 const double P_UP = 1.3;
574 double offset,
sigma;
575 for (
unsigned int i = 0; i < 4; i++)
584 else if (i == 2 || i == 3)
593 double cost = m_cost[i];
594 double charge = m_charge[i];
598 offset = h_dedx_p_offset[pid][idx]->Interpolate(
bg, cost );
599 sigma = h_dedx_p_sigma[pid][idx] ->Interpolate(
bg, cost );
600 m_dedx_chi[i] = (m_dedx_chi[i] - offset) /
sigma;
604 offset = h_dedx_m_offset[pid][idx]->Interpolate(
bg, cost );
605 sigma = h_dedx_m_sigma[pid][idx] ->Interpolate(
bg, cost );
606 m_dedx_chi[i] = (m_dedx_chi[i] - offset) /
sigma;
612void SimplePIDSvc::tofBarrelSecondCorrection()
615 int idx = getRunIdx(m_run);
616 const double EPS = 1e-4;
617 const double P_LOW = 0.0;
618 const double P_UP = 1.3;
619 const int BIN_P = 10;
621 const int RUN_BEGIN_DATA_10 = 11414;
622 const int RUN_END_DATA_10 = 14604;
623 const int RUN_BEGIN_MC_10 = -14604;
624 const int RUN_END_MC_10 = -11414;
625 const int RUN_BEGIN_DATA_11 = 20448;
626 const int RUN_END_DATA_11 = 23454;
627 const int RUN_BEGIN_MC_11 = -23454;
628 const int RUN_END_MC_11 = -20448;
630 const int RUN_BEGIN_DATA_22 = 70521;
631 const int RUN_END_DATA_22 = 73930;
632 const int RUN_BEGIN_MC_22 = -73930;
633 const int RUN_END_MC_22 = -70521;
635 const int RUN_BEGIN_DATA_23 = 74031;
636 const int RUN_END_DATA_23 = 78536;
637 const int RUN_BEGIN_MC_23 = -78536;
638 const int RUN_END_MC_23 = -74031;
640 const int RUN_BEGIN_DATA_24 = 78615;
641 const int RUN_END_DATA_24 = 81094;
642 const int RUN_BEGIN_MC_24 = -81094;
643 const int RUN_END_MC_24 = -78615;
645 double P[BIN_P + 1] = {0.0, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1.3};
649 for (
unsigned int i = 2; i < 4; i++){
656 bin_p = findBin(
P, BIN_P, ptk);
660 if((m_run>=RUN_BEGIN_DATA_10 && m_run<=RUN_END_DATA_10 && idx == 0)||(m_run>=RUN_BEGIN_DATA_11 && m_run<=RUN_END_DATA_11 && idx == 1))
663 if((m_run>=RUN_BEGIN_MC_10 && m_run<=RUN_END_MC_10 && idx == 2)||(m_run>=RUN_BEGIN_MC_11 && m_run<=RUN_END_MC_11 && idx == 3))
666 if(m_run>=RUN_BEGIN_DATA_22 && m_run<=RUN_END_DATA_22 && idx == 1)
669 if(m_run>=RUN_BEGIN_MC_22 && m_run<=RUN_END_MC_22 && idx == 3)
672 if(m_run>=RUN_BEGIN_DATA_23 && m_run<=RUN_END_DATA_23 && idx == 1)
675 if(m_run>=RUN_BEGIN_MC_23 && m_run<=RUN_END_MC_23 && idx == 3)
678 if(m_run>=RUN_BEGIN_DATA_24 && m_run<=RUN_END_DATA_24 && idx == 1)
681 if(m_run>=RUN_BEGIN_MC_24 && m_run<=RUN_END_MC_24 && idx == 3)
688 if((m_run>=RUN_BEGIN_DATA_10 && m_run<=RUN_END_DATA_10 && idx == 0)||(m_run>=RUN_BEGIN_DATA_11 && m_run<=RUN_END_DATA_11 && idx == 1))
691 if((m_run>=RUN_BEGIN_MC_10 && m_run<=RUN_END_MC_10 && idx == 2)||(m_run>=RUN_BEGIN_MC_11 && m_run<=RUN_END_MC_11 && idx == 3))
694 if(m_run>=RUN_BEGIN_DATA_22 && m_run<=RUN_END_DATA_22 && idx == 1)
697 if(m_run>=RUN_BEGIN_MC_22 && m_run<=RUN_END_MC_22 && idx == 3)
700 if(m_run>=RUN_BEGIN_DATA_23 && m_run<=RUN_END_DATA_23 && idx == 1)
703 if(m_run>=RUN_BEGIN_MC_23 && m_run<=RUN_END_MC_23 && idx == 3)
706 if(m_run>=RUN_BEGIN_DATA_24 && m_run<=RUN_END_DATA_24 && idx == 1)
709 if(m_run>=RUN_BEGIN_MC_24 && m_run<=RUN_END_MC_24 && idx == 3)
714 if(m_tof_chi[i]!=-99 && m_run>0){
718 if(!((m_run>=RUN_BEGIN_DATA_23 && m_run<=RUN_END_DATA_23)||(m_run>=RUN_BEGIN_DATA_24 && m_run<=RUN_END_DATA_24))){
720 m_tof_chi[i] = (m_tof_chi[i] - m_gaussion_mean[aa][bb][bin_p]) / (m_gaussion_sigmab[aa][bb][bin_p] / m_gaussion_sigmab[aa][bb+1][bin_p]);
723 m_tof_chi[i] = (m_tof_chi[i] - m_gaussion_mean[aa][bb][bin_p]);
729 m_tof_chi[i] = (m_tof_chi[i] - m_gaussion_mean[aa][bb][bin_p]) / (m_gaussion_sigmab[aa][bb][bin_p] / m_gaussion_sigmab[aa][bb+1][bin_p]);
732 m_tof_chi[i] = (m_tof_chi[i] - m_gaussion_mean[aa][bb][bin_p]);
737 if(m_tof_chi[i]!=-99 && m_run<0){
738 m_tof_chi[i] = (m_tof_chi[i] - m_gaussion_mean[aa][bb][bin_p]) / (m_gaussion_sigmab[aa][bb][bin_p] / m_gaussion_sigmab[aa][bb][bin_p]);
747void SimplePIDSvc::tofEndcapSecondCorrection()
750 int idx = getRunIdx(m_run);
751 const double EPS = 1e-4;
752 const double P_LOW = 0.0;
753 const double P_UP = 1.3;
754 const int BIN_P = 10;
756 const int RUN_BEGIN_DATA_10 = 11414;
757 const int RUN_END_DATA_10 = 14604;
758 const int RUN_BEGIN_MC_10 = -14604;
759 const int RUN_END_MC_10 = -11414;
760 const int RUN_BEGIN_DATA_11 = 20448;
761 const int RUN_END_DATA_11 = 23454;
762 const int RUN_BEGIN_MC_11 = -23454;
763 const int RUN_END_MC_11 = -20448;
765 const int RUN_BEGIN_DATA_22 = 70521;
766 const int RUN_END_DATA_22 = 73930;
767 const int RUN_BEGIN_MC_22 = -73930;
768 const int RUN_END_MC_22 = -70521;
770 const int RUN_BEGIN_DATA_23 = 74031;
771 const int RUN_END_DATA_23 = 78536;
772 const int RUN_BEGIN_MC_23 = -78536;
773 const int RUN_END_MC_23 = -74031;
775 const int RUN_BEGIN_DATA_24 = 78615;
776 const int RUN_END_DATA_24 = 81094;
777 const int RUN_BEGIN_MC_24 = -81094;
778 const int RUN_END_MC_24 = -78615;
780 double P[BIN_P + 1] = {0.0, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1.3};
784 for (
unsigned int i = 2; i < 4; i++){
791 bin_p = findBin(
P, BIN_P, ptk);
795 if((m_run>=RUN_BEGIN_DATA_10 && m_run<=RUN_END_DATA_10 && idx == 0)||(m_run>=RUN_BEGIN_DATA_11 && m_run<=RUN_END_DATA_11 && idx == 1))
798 if((m_run>=RUN_BEGIN_MC_10 && m_run<=RUN_END_MC_10 && idx == 2)||(m_run>=RUN_BEGIN_MC_11 && m_run<=RUN_END_MC_11 && idx == 3))
801 if(m_run>=RUN_BEGIN_DATA_22 && m_run<=RUN_END_DATA_22 && idx == 1)
804 if(m_run>=RUN_BEGIN_MC_22 && m_run<=RUN_END_MC_22 && idx == 3)
807 if(m_run>=RUN_BEGIN_DATA_23 && m_run<=RUN_END_DATA_23 && idx == 1)
810 if(m_run>=RUN_BEGIN_MC_23 && m_run<=RUN_END_MC_23 && idx == 3)
813 if(m_run>=RUN_BEGIN_DATA_24 && m_run<=RUN_END_DATA_24 && idx == 1)
816 if(m_run>=RUN_BEGIN_MC_24 && m_run<=RUN_END_MC_24 && idx == 3)
823 if((m_run>=RUN_BEGIN_DATA_10 && m_run<=RUN_END_DATA_10 && idx == 0)||(m_run>=RUN_BEGIN_DATA_11 && m_run<=RUN_END_DATA_11 && idx == 1))
826 if((m_run>=RUN_BEGIN_MC_10 && m_run<=RUN_END_MC_10 && idx == 2)||(m_run>=RUN_BEGIN_MC_11 && m_run<=RUN_END_MC_11 && idx == 3))
829 if(m_run>=RUN_BEGIN_DATA_22 && m_run<=RUN_END_DATA_22 && idx == 1)
832 if(m_run>=RUN_BEGIN_MC_22 && m_run<=RUN_END_MC_22 && idx == 3)
835 if(m_run>=RUN_BEGIN_DATA_23 && m_run<=RUN_END_DATA_23 && idx == 1)
838 if(m_run>=RUN_BEGIN_MC_23 && m_run<=RUN_END_MC_23 && idx == 3)
841 if(m_run>=RUN_BEGIN_DATA_24 && m_run<=RUN_END_DATA_24 && idx == 1)
844 if(m_run>=RUN_BEGIN_MC_24 && m_run<=RUN_END_MC_24 && idx == 3)
849 if(m_tof_chi[i]!=-99 && ( aa==5 || aa==8 || aa==11)){
851 m_tof_chi[i] = (m_tof_chi[i] - m_gaussion_mean[aa][bb][bin_p]) / (60./110.);
855 if(m_tof_chi[i]!=-99 && aa==4){
857 m_tof_chi[i] = (m_tof_chi[i] - m_gaussion_mean[aa][bb][bin_p]);
869void SimplePIDSvc::dedxSecondCorrection()
873 int idx = getRunIdx(m_run);
874 const double EPS = 1e-4;
875 const double P_LOW = 0.0;
876 const double P_UP = 1.3;
877 const int BIN_P = 10;
879 const int RUN_BEGIN_DATA_10 = 11414;
880 const int RUN_END_DATA_10 = 14604;
881 const int RUN_BEGIN_MC_10 = -14604;
882 const int RUN_END_MC_10 = -11414;
883 const int RUN_BEGIN_DATA_11 = 20448;
884 const int RUN_END_DATA_11 = 23454;
885 const int RUN_BEGIN_MC_11 = -23454;
886 const int RUN_END_MC_11 = -20448;
888 const int RUN_BEGIN_DATA_22 = 70521;
889 const int RUN_END_DATA_22 = 73930;
890 const int RUN_BEGIN_MC_22 = -73930;
891 const int RUN_END_MC_22 = -70521;
893 const int RUN_BEGIN_DATA_23 = 74031;
894 const int RUN_END_DATA_23 = 78536;
895 const int RUN_BEGIN_MC_23 = -78536;
896 const int RUN_END_MC_23 = -74031;
898 const int RUN_BEGIN_DATA_24 = 78615;
899 const int RUN_END_DATA_24 = 81094;
900 const int RUN_BEGIN_MC_24 = -81094;
901 const int RUN_END_MC_24 = -78615;
903 double P[BIN_P + 1] = {0.0, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1.3};
907 for (
unsigned int i = 2; i < 4; i++){
914 bin_p = findBin(
P, BIN_P, ptk);
918 if((m_run>=RUN_BEGIN_DATA_10 && m_run<=RUN_END_DATA_10 && idx == 0)||(m_run>=RUN_BEGIN_DATA_11 && m_run<=RUN_END_DATA_11 && idx == 1))
921 if((m_run>=RUN_BEGIN_MC_10 && m_run<=RUN_END_MC_10 && idx == 2)||(m_run>=RUN_BEGIN_MC_11 && m_run<=RUN_END_MC_11 && idx == 3))
924 if(m_run>=RUN_BEGIN_DATA_22 && m_run<=RUN_END_DATA_22 && idx == 1)
927 if(m_run>=RUN_BEGIN_MC_22 && m_run<=RUN_END_MC_22 && idx == 3)
930 if(m_run>=RUN_BEGIN_DATA_23 && m_run<=RUN_END_DATA_23 && idx == 1)
933 if(m_run>=RUN_BEGIN_MC_23 && m_run<=RUN_END_MC_23 && idx == 3)
936 if(m_run>=RUN_BEGIN_DATA_24 && m_run<=RUN_END_DATA_24 && idx == 1)
939 if(m_run>=RUN_BEGIN_MC_24 && m_run<=RUN_END_MC_24 && idx == 3)
946 if((m_run>=RUN_BEGIN_DATA_10 && m_run<=RUN_END_DATA_10 && idx == 0)||(m_run>=RUN_BEGIN_DATA_11 && m_run<=RUN_END_DATA_11 && idx == 1))
949 if((m_run>=RUN_BEGIN_MC_10 && m_run<=RUN_END_MC_10 && idx == 2)||(m_run>=RUN_BEGIN_MC_11 && m_run<=RUN_END_MC_11 && idx == 3))
952 if(m_run>=RUN_BEGIN_DATA_22 && m_run<=RUN_END_DATA_22 && idx == 1)
955 if(m_run>=RUN_BEGIN_MC_22 && m_run<=RUN_END_MC_22 && idx == 3)
958 if(m_run>=RUN_BEGIN_DATA_23 && m_run<=RUN_END_DATA_23 && idx == 1)
961 if(m_run>=RUN_BEGIN_MC_23 && m_run<=RUN_END_MC_23 && idx == 3)
964 if(m_run>=RUN_BEGIN_DATA_24 && m_run<=RUN_END_DATA_24 && idx == 1)
967 if(m_run>=RUN_BEGIN_MC_24 && m_run<=RUN_END_MC_24 && idx == 3)
972 if(m_dedx_chi[i]!=-99 && m_run>0){
973 m_dedx_chi[i] = (m_dedx_chi[i] - m_gaussion_mean[aa][bb][bin_p]) / (m_gaussion_sigmab[aa][bb][bin_p] / m_gaussion_sigmab[aa][bb+1][bin_p]);
975 if(m_dedx_chi[i]!=-99 && m_run<0){
976 m_dedx_chi[i] = (m_dedx_chi[i] - m_gaussion_mean[aa][bb][bin_p]) / (m_gaussion_sigmab[aa][bb][bin_p] / m_gaussion_sigmab[aa][bb][bin_p]);
985void SimplePIDSvc::loadSecondPar()
987 string path = getenv(
"SIMPLEPIDSVCROOT");
989 for(
int i=0; i<12; i++){
993 if(i == 0) dir =
"round0304_dedx";
994 else if(i == 1) dir =
"round15_dedx";
995 else if(i == 2) dir =
"round0304_tof";
996 else if(i == 3) dir =
"round15_tof";
997 else if(i == 4) dir =
"round0304_tof_endcap";
998 else if(i == 5) dir =
"round15_tof_endcap";
1000 else if(i == 6) dir =
"round16_dedx";
1001 else if(i == 7) dir =
"round16_tof";
1002 else if(i == 8) dir =
"round16_tof_endcap";
1004 else if(i == 9) dir =
"round17_dedx";
1005 else if(i == 10) dir =
"round17_tof";
1006 else if(i == 11) dir =
"round17_tof_endcap";
1009 cout <<
"Boundary Error! " << endl;
1013 for(
int j=0; j<4; j++){
1017 if(j == 0) name =
"data_K";
1018 else if(j == 1) name =
"inc_K";
1019 else if(j == 2) name =
"data_pi";
1020 else if(j == 3) name =
"inc_pi";
1022 cout <<
"Boundary Error! " << endl;
1026 ifstream second_cor( path + Form(
"/share/second_correct/%s/%s_%s.dat",dir,dir,name));
1028 for(
int m=0; m<10; m++){
1030 second_cor>>m_gaussion_mean[i][j][m]>>m_gaussion_sigma[i][j][m]>>m_gaussion_sigmab[i][j][m];
1042void SimplePIDSvc::loadHistogram()
1044 string path = getenv(
"SIMPLEPIDSVCROOT");
1045 vector<string> filename;
1046 for (
unsigned int idx = 0; idx < 2; idx++)
1055 cout <<
"Boundary Error! " << endl;
1061 filename.push_back( path + Form(
"/share/%s/dedx/dedx_d10.root", dir) );
1062 filename.push_back( path + Form(
"/share/%s/dedx/dedx_d11.root", dir) );
1063 filename.push_back( path + Form(
"/share/%s/dedx/dedx_m10.root", dir) );
1064 filename.push_back( path + Form(
"/share/%s/dedx/dedx_m11.root", dir) );
1065 for (
unsigned int i = 0; i < filename.size(); i++)
1067 f_dedx[idx][i] =
new TFile(filename[i].
c_str(),
"READ");
1079 cout <<
"Boundary Error! " << endl;
1082 h_dedx_p_offset[idx][i] = (TH2D*)f_dedx[idx][i]->Get( Form(
"h_dedx_p_offset_%s", name) );
1083 h_dedx_p_sigma[idx][i] = (TH2D*)f_dedx[idx][i]->Get( Form(
"h_dedx_p_sigma_%s" , name) );
1084 h_dedx_m_offset[idx][i] = (TH2D*)f_dedx[idx][i]->Get( Form(
"h_dedx_m_offset_%s", name) );
1085 h_dedx_m_sigma[idx][i] = (TH2D*)f_dedx[idx][i]->Get( Form(
"h_dedx_m_sigma_%s" , name) );
1089 filename.push_back( path + Form(
"/share/%s/tof_barrel/tof_q_d10.root", dir) );
1090 filename.push_back( path + Form(
"/share/%s/tof_barrel/tof_q_d11.root", dir) );
1091 filename.push_back( path + Form(
"/share/%s/tof_barrel/tof_q_m10.root", dir) );
1092 filename.push_back( path + Form(
"/share/%s/tof_barrel/tof_q_m11.root", dir) );
1093 for (
unsigned int i = 0; i < filename.size(); i++)
1095 f_tof_q[idx][i] =
new TFile(filename[i].
c_str(),
"READ");
1107 cout <<
"Boundary Error! " << endl;
1110 for (
unsigned int j = 0; j < 4; j++)
1112 h_tof_p_q_offset[idx][i][j] = (TH1D*)f_tof_q[idx][i]->Get( Form(
"h_tof_p_q_offset_%s_%d", name, j) );
1113 h_tof_m_q_offset[idx][i][j] = (TH1D*)f_tof_q[idx][i]->Get( Form(
"h_tof_m_q_offset_%s_%d", name, j) );
1114 h_tof_p_q_sigma[idx][i][j] = (TH1D*)f_tof_q[idx][i]->Get( Form(
"h_tof_p_q_sigma_%s_%d" , name, j) );
1115 h_tof_m_q_sigma[idx][i][j] = (TH1D*)f_tof_q[idx][i]->Get( Form(
"h_tof_m_q_sigma_%s_%d" , name, j) );
1120 filename.push_back( path + Form(
"/share/%s/tof_barrel/tof_bg_cost_d10.root", dir) );
1121 filename.push_back( path + Form(
"/share/%s/tof_barrel/tof_bg_cost_d11.root", dir) );
1122 filename.push_back( path + Form(
"/share/%s/tof_barrel/tof_bg_cost_m10.root", dir) );
1123 filename.push_back( path + Form(
"/share/%s/tof_barrel/tof_bg_cost_m11.root", dir) );
1124 for (
unsigned int i = 0; i < filename.size(); i++)
1126 f_tof_bgcost[idx][i] =
new TFile(filename[i].
c_str(),
"READ");
1138 cout <<
"Boundary Error! " << endl;
1141 for (
unsigned int j = 0; j < 4; j++)
1143 h_tof_p_bgcost_offset[idx][i][j] = (TH2D*)f_tof_bgcost[idx][i]->Get( Form(
"h_tof_p_bgcost_offset_%s_%d", name, j) );
1144 h_tof_m_bgcost_offset[idx][i][j] = (TH2D*)f_tof_bgcost[idx][i]->Get( Form(
"h_tof_m_bgcost_offset_%s_%d", name, j) );
1145 h_tof_p_bgcost_sigma[idx][i][j] = (TH2D*)f_tof_bgcost[idx][i]->Get( Form(
"h_tof_p_bgcost_sigma_%s_%d" , name, j) );
1146 h_tof_m_bgcost_sigma[idx][i][j] = (TH2D*)f_tof_bgcost[idx][i]->Get( Form(
"h_tof_m_bgcost_sigma_%s_%d" , name, j) );
1151 filename.push_back( path + Form(
"/share/%s/tof_barrel/tof_wgt_d10.root", dir) );
1152 filename.push_back( path + Form(
"/share/%s/tof_barrel/tof_wgt_d11.root", dir) );
1153 filename.push_back( path + Form(
"/share/%s/tof_barrel/tof_wgt_m10.root", dir) );
1154 filename.push_back( path + Form(
"/share/%s/tof_barrel/tof_wgt_m11.root", dir) );
1155 for (
unsigned int i = 0; i < filename.size(); i++)
1157 f_tof_wgt[idx][i] =
new TFile(filename[i].
c_str(),
"READ");
1169 cout <<
"Boundary Error! " << endl;
1172 for (
unsigned int j = 0; j < 15; j++)
1174 for (
unsigned int k = 0; k < 5; k++)
1176 h_tof_p_wgt[idx][i][j][k] = (TH2D*)f_tof_wgt[idx][i]->Get( Form(
"h_tof_p_wgt_%s_%d_%d", name, j, k) );
1177 h_tof_m_wgt[idx][i][j][k] = (TH2D*)f_tof_wgt[idx][i]->Get( Form(
"h_tof_m_wgt_%s_%d_%d", name, j, k) );
1183 filename.push_back( path + Form(
"/share/%s/tof_barrel/tof_final_d10.root", dir) );
1184 filename.push_back( path + Form(
"/share/%s/tof_barrel/tof_final_d11.root", dir) );
1185 filename.push_back( path + Form(
"/share/%s/tof_barrel/tof_final_m10.root", dir) );
1186 filename.push_back( path + Form(
"/share/%s/tof_barrel/tof_final_m11.root", dir) );
1187 for (
unsigned int i = 0; i < filename.size(); i++)
1189 f_tof_final[idx][i] =
new TFile(filename[i].
c_str(),
"READ");
1201 cout <<
"Boundary Error! " << endl;
1204 for (
unsigned int j = 0; j < 15; j++)
1206 h_tof_p_final_offset[idx][i][j] = (TH2D*)f_tof_final[idx][i]->Get( Form(
"h_tof_p_final_offset_%s_%d", name, j) );
1207 h_tof_m_final_offset[idx][i][j] = (TH2D*)f_tof_final[idx][i]->Get( Form(
"h_tof_m_final_offset_%s_%d", name, j) );
1208 h_tof_p_final_sigma[idx][i][j] = (TH2D*)f_tof_final[idx][i]->Get( Form(
"h_tof_p_final_sigma_%s_%d" , name, j) );
1209 h_tof_m_final_sigma[idx][i][j] = (TH2D*)f_tof_final[idx][i]->Get( Form(
"h_tof_m_final_sigma_%s_%d" , name, j) );
1214 filename.push_back( path + Form(
"/share/%s/tof_endcap/tofec_q_d10.root", dir) );
1215 filename.push_back( path + Form(
"/share/%s/tof_endcap/tofec_q_d11.root", dir) );
1216 filename.push_back( path + Form(
"/share/%s/tof_endcap/tofec_q_m10.root", dir) );
1217 filename.push_back( path + Form(
"/share/%s/tof_endcap/tofec_q_m11.root", dir) );
1218 for (
unsigned int i = 0; i < filename.size(); i++)
1220 f_tofec_q[idx][i] =
new TFile(filename[i].
c_str(),
"READ");
1232 cout <<
"Boundary Error! " << endl;
1235 for (
unsigned int j = 0; j < 2; j++)
1237 h_tofec_p_q_offset[idx][i][j] = (TH1D*)f_tofec_q[idx][i]->Get( Form(
"h_tofec_p_q_offset_%s_%d", name, j) );
1238 h_tofec_m_q_offset[idx][i][j] = (TH1D*)f_tofec_q[idx][i]->Get( Form(
"h_tofec_m_q_offset_%s_%d", name, j) );
1239 h_tofec_p_q_sigma[idx][i][j] = (TH1D*)f_tofec_q[idx][i]->Get( Form(
"h_tofec_p_q_sigma_%s_%d" , name, j) );
1240 h_tofec_m_q_sigma[idx][i][j] = (TH1D*)f_tofec_q[idx][i]->Get( Form(
"h_tofec_m_q_sigma_%s_%d" , name, j) );
1245 filename.push_back( path + Form(
"/share/%s/tof_endcap/tofec_bg_d10.root", dir) );
1246 filename.push_back( path + Form(
"/share/%s/tof_endcap/tofec_bg_d11.root", dir) );
1247 filename.push_back( path + Form(
"/share/%s/tof_endcap/tofec_bg_m10.root", dir) );
1248 filename.push_back( path + Form(
"/share/%s/tof_endcap/tofec_bg_m11.root", dir) );
1249 for (
unsigned int i = 0; i < filename.size(); i++)
1251 f_tofec_bg[idx][i] =
new TFile(filename[i].
c_str(),
"READ");
1263 cout <<
"Boundary Error! " << endl;
1266 for (
unsigned int j = 0; j < 2; j++)
1268 h_tofec_p_bg_offset[idx][i][j] = (TH1D*)f_tofec_bg[idx][i]->Get( Form(
"h_tofec_p_bg_offset_%s_%d", name, j) );
1269 h_tofec_m_bg_offset[idx][i][j] = (TH1D*)f_tofec_bg[idx][i]->Get( Form(
"h_tofec_m_bg_offset_%s_%d", name, j) );
1270 h_tofec_p_bg_sigma[idx][i][j] = (TH1D*)f_tofec_bg[idx][i]->Get( Form(
"h_tofec_p_bg_sigma_%s_%d" , name, j) );
1271 h_tofec_m_bg_sigma[idx][i][j] = (TH1D*)f_tofec_bg[idx][i]->Get( Form(
"h_tofec_m_bg_sigma_%s_%d" , name, j) );
1276 filename.push_back( path + Form(
"/share/%s/tof_endcap/tofec_cost_d10.root", dir) );
1277 filename.push_back( path + Form(
"/share/%s/tof_endcap/tofec_cost_d11.root", dir) );
1278 filename.push_back( path + Form(
"/share/%s/tof_endcap/tofec_cost_m10.root", dir) );
1279 filename.push_back( path + Form(
"/share/%s/tof_endcap/tofec_cost_m11.root", dir) );
1280 for (
unsigned int i = 0; i < filename.size(); i++)
1282 f_tofec_cost[idx][i] =
new TFile(filename[i].
c_str(),
"READ");
1294 cout <<
"Boundary Error! " << endl;
1297 for (
unsigned int j = 0; j < 2; j++)
1299 h_tofec_p_cost_offset[idx][i][j] = (TH1D*)f_tofec_cost[idx][i]->Get( Form(
"h_tofec_p_cost_offset_%s_%d", name, j) );
1300 h_tofec_m_cost_offset[idx][i][j] = (TH1D*)f_tofec_cost[idx][i]->Get( Form(
"h_tofec_m_cost_offset_%s_%d", name, j) );
1301 h_tofec_p_cost_sigma[idx][i][j] = (TH1D*)f_tofec_cost[idx][i]->Get( Form(
"h_tofec_p_cost_sigma_%s_%d" , name, j) );
1302 h_tofec_m_cost_sigma[idx][i][j] = (TH1D*)f_tofec_cost[idx][i]->Get( Form(
"h_tofec_m_cost_sigma_%s_%d" , name, j) );
1306 for (
unsigned int idx = 0; idx < 3; idx++)
1310 dir =
"electron/emc";
1312 dir =
"kpi/emc_pion";
1314 dir =
"kpi/emc_kaon";
1317 cout <<
"Boundary Error! " << endl;
1322 filename.push_back( path + Form(
"/share/%s/emc_d10.root", dir) );
1323 filename.push_back( path + Form(
"/share/%s/emc_d11.root", dir) );
1324 filename.push_back( path + Form(
"/share/%s/emc_m10.root", dir) );
1325 filename.push_back( path + Form(
"/share/%s/emc_m11.root", dir) );
1326 for (
unsigned int i = 0; i < filename.size(); i++)
1328 f_emc[idx][i] =
new TFile(filename[i].
c_str(),
"READ");
1340 cout <<
"Boundary Error! " << endl;
1343 for (
unsigned int j = 0; j < 15; j++)
1345 for (
unsigned int k = 0; k < 25; k++)
1347 h_emc_ep[idx][i][j][k] = (TH1D*)f_emc[idx][i]->Get( Form(
"h_ep_%s_%d_%d", name, j, k) );
1348 h_emc_e35[idx][i][j][k] = (TH1D*)f_emc[idx][i]->Get( Form(
"h_e35_%s_%d_%d", name, j, k) );
1353 cout <<
"Successfully Return from Loading Initializations by package SimplePIDSvc ... " << endl;
1356int SimplePIDSvc::findBin(
double *a,
int length,
double value)
1358 for (
int i = 0; i < length; i++)
1360 if (value > a[i] && value <= a[i+1])
1377 return pow(m_dedx_chi[i], 2) + pow(m_tof_chi[i], 2);
1383 for (
unsigned int i = 0; i < 5; i++)
1385 m_emc_eop[i] = -99.;
1386 m_emc_likelihood[i] = -99.;
1393 m_lh_electron = -99.;
1398 m_emc_e = emc_trk->
energy();
1399 for (
unsigned int i = 0; i < 5; i++)
1401 m_emc_eop[i] = m_emc_e / fabs(m_p[i]);
1403 double eseed = emc_trk->
eSeed();
1404 double e3 = emc_trk->
e3x3();
1405 double e5 = emc_trk->
e5x5();
1410 m_emc_e13 = eseed / e3;
1414 m_emc_e35 = e3 / e5;
1418bool SimplePIDSvc::calEMCLikelihood()
1420 if (m_emc_eop[0] < 0)
1423 int idx = getRunIdx(m_run);
1424 const Int_t BIN_P = 15;
1425 const Int_t BIN_COST = 25;
1426 const Int_t BIN_PID = 3;
1427 const double EPS = 1e-4;
1429 double P[BIN_PID][BIN_P + 1] = {
1430 {0.20, 0.47, 0.56, 0.65, 0.72, 0.79, 0.86, 0.92, 0.98, 1.03, 1.08, 1.13, 1.17, 1.22, 1.26, 1.30},
1431 {0.20, 0.26, 0.31, 0.35, 0.39, 0.42, 0.46, 0.49, 0.53, 0.57, 0.62, 0.67, 0.73, 0.80, 0.88, 1.05},
1432 {0.20, 0.33, 0.39, 0.43, 0.48, 0.52, 0.56, 0.61, 0.67, 0.73, 0.76, 0.81, 0.85, 0.90, 0.96, 1.05}, };
1433 double COST[BIN_PID][BIN_COST + 1] = {
1434 {-0.930, -0.910, -0.905, -0.897, -0.890, -0.881, -0.871, -0.858, -0.775, -0.732, -0.669, -0.561, -0.330, 0.199, 0.515, 0.645, 0.718, 0.766, 0.804, 0.870, 0.882, 0.891, 0.898, 0.906, 0.913, 0.930},
1435 {-0.930, -0.810, -0.728, -0.648, -0.574, -0.501, -0.431, -0.364, -0.295, -0.228, -0.161, -0.096, -0.031, 0.035, 0.100, 0.167, 0.234, 0.301, 0.370, 0.439, 0.510, 0.580, 0.655, 0.733, 0.813, 0.930},
1436 {-0.930, -0.804, -0.721, -0.643, -0.568, -0.497, -0.429, -0.362, -0.293, -0.228, -0.161, -0.096, -0.029, 0.035, 0.100, 0.166, 0.233, 0.298, 0.365, 0.432, 0.500, 0.571, 0.644, 0.722, 0.805, 0.930}, };
1440 int bin_p, bin_cost;
1441 for (
unsigned int i = 0; i < 4; i++)
1454 vcost =
max(COST[pid][0]+
EPS,
min(COST[pid][BIN_COST]-
EPS, m_cost[i]));
1455 bin_p = findBin(
P[pid], BIN_P, vp);
1456 bin_cost = findBin(COST[pid], BIN_COST, vcost);
1458 m_emc_likelihood[i] = h_emc_ep[pid][idx][bin_p][bin_cost]->Interpolate(m_emc_eop[i]) * h_emc_e35[pid][idx][bin_p][bin_cost]->Interpolate(m_emc_e35);
1460 double a = m_prob[0] > 0 ? m_prob[0] : 0;
1461 double b = m_prob[2] > 0 ? m_prob[2] : 0;
1462 double c = m_prob[3] > 0 ? m_prob[3] : 0;
1463 double sum = a * m_emc_likelihood[0] +
b * m_emc_likelihood[2] + c * m_emc_likelihood[3];
1465 if (sum > 0 && m_prob[0] > 0)
1467 m_lh_electron = m_prob[0] * m_emc_likelihood[0] / sum;
1478 if (m_prob[2] > 0.00 && m_prob[2] > m_prob[3])
1486 if (m_prob[3] > 0.00 && m_prob[3] > m_prob[2])
1515 if (m_prob[0] > 0 && m_prob[0] > m_prob[2] && m_prob[0] > m_prob[3])
1522 if (calEMCLikelihood())
1524 if (m_lh_electron > m_eid_ratio)
1531 if (m_prob[0] > 0 && m_prob[0] > m_prob[2] && m_prob[0] > m_prob[3])
double cos(const BesAngle a)
double P(RecMdcKalTrack *trk)
****INTEGER imax DOUBLE PRECISION m_pi *DOUBLE PRECISION m_amfin DOUBLE PRECISION m_Chfin DOUBLE PRECISION m_Xenph DOUBLE PRECISION m_sinw2 DOUBLE PRECISION m_GFermi DOUBLE PRECISION m_MfinMin DOUBLE PRECISION m_ta2 INTEGER m_out INTEGER m_KeyFSR INTEGER m_KeyQCD *COMMON c_Semalib $ !copy of input $ !CMS energy $ !beam mass $ !final mass $ !beam charge $ !final charge $ !smallest final mass $ !Z mass $ !Z width $ !EW mixing angle $ !Gmu Fermi $ alphaQED at q
double secondMoment() const
const Hep3Vector tof1Position() const
const Hep3Vector tof2Position() const
const double theta() const
static void setPidType(PidType pidType)
bool isMdcKalTrackValid()
SmartRefVector< RecTofTrack > tofTrack()
RecEmcShower * emcShower()
RecMdcKalTrack * mdcKalTrack()
void preparePID(EvtRecTrack *track)
virtual StatusCode initialize()
bool iselectron(bool emc=true)
virtual StatusCode finalize()
unsigned int layer() const
void setStatus(unsigned int status)