68 double ptrk = mdcTrk->
p();
75 SmartRefVector<RecTofTrack> tofTrk = recTrk->
tofTrack();
76 SmartRefVector<RecTofTrack>::iterator it;
78 const std::vector<TTofTrack* >& tofTrk = recTrk->
tofTrack();
79 std::vector<TTofTrack* >::const_iterator it;
83 std::vector<int> tof2count;
85 for(it = tofTrk.begin(); it!=tofTrk.end(); it++,goodtof2trk++) {
86 unsigned int st = (*it)->status();
91 if( hitst->
layer()==2 ) tof2count.push_back(goodtof2trk);
95 if(tof2count.size()!=1)
return irc;
96 it = tofTrk.begin()+tof2count[0];
97 double tof = (*it)->tof();
100 if(tof <=0 )
return irc;
103 int cntr = (*it)->tofID();
104 double path = ((*it)->path())*10.0;
112 m_zhit2 = ((*it)->zrhit())*10;
115 m_mass2 = ptrk * ptrk * (1/beta2 -1);
116 if ((m_mass2>20)||(m_mass2<-1))
return irc;
118 double chitemp = 99.;
120 double sig_tmp = (*it)->sigma(0);
121 for(
int i = 0; i < 5; i++) {
122 m_offset[i] = tof - (*it)->texp(i)-(*it)->toffset(i);
124 m_sigma[i] = 1.2*sig_tmp;
125 if(i<2) m_sigma[i]=sig_tmp;
128 m_chi[i] = m_offset[i]/m_sigma[i];
129 if(fabs(m_chi[i]) < chitemp) chitemp = fabs(m_chi[i]);
131 if(fabs(ppp) > pdftemp) pdftemp = fabs(ppp);
137 if(fabs(m_chimin) >
chiMinCut())
return irc;
141 for(
int i = 0; i < 5; i++) {
220 double cosz =
cos(ztof/1000.0);
225 sigma = 0.115816 -0.0933215*cosz+ 0.0788252*cosz*cosz;
230 sigma = 0.121536 -0.0935898*cosz+0.0748771*cosz*cosz;
235 sigma = 0.106882-0.0147375*cosz+0.027491*cosz*cosz;
239 sigma =0.106882 -0.0147375*cosz +0.027491 *cosz*cosz;
244 sigma = 0.168489 -0.131762*cosz+ 0.105708*cosz*cosz;
EvtRecTrack * PidTrk() const
double probCalculate(double chi2, int n)
double pdfCalculate(double offset, double sigma)
double pdfMinSigmaCut() const