67 double ptrk = mdcTrk->
p();
74 SmartRefVector<RecTofTrack> tofTrk = recTrk->
tofTrack();
75 SmartRefVector<RecTofTrack>::iterator it;
77 const std::vector<TTofTrack*>& tofTrk = recTrk->
tofTrack();
78 std::vector<TTofTrack*>::const_iterator it;
82 std::vector<int> tof2count;
84 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;
111 m_ph2 = ( *it )->ph();
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++ )
123 m_offset[i] = tof - ( *it )->texp( i ) -
124 ( *it )->toffset( i );
127 m_sigma[i] = 1.2 * sig_tmp;
128 if ( i < 2 ) m_sigma[i] = sig_tmp;
131 m_chi[i] = m_offset[i] / m_sigma[i];
132 if ( fabs( m_chi[i] ) < chitemp ) chitemp = fabs( m_chi[i] );
134 if ( fabs( ppp ) > pdftemp ) pdftemp = fabs( ppp );
140 if ( fabs( m_chimin ) >
chiMinCut() )
return irc;
144 for (
int i = 0; i < 5; i++ ) { m_prob[i] =
probCalculate( m_chi[i] * m_chi[i], 1 ); }
172 betagamma = ptrk / 139.57;
176 betagamma = ptrk / 493.68;
181 betagamma = ptrk / 938.27;
193 double beta = betagamma / TMath::Sqrt( 1 + betagamma * betagamma );
194 double Q0 =
sampleQ0( betagamma, beta );
195 double func[15] = { 0. };
197 func[1] = 1. / sqrt( Q );
198 func[2] = z / sqrt( Q );
199 func[3] = z * z / sqrt( Q );
203 func[7] = 1. / ( 0.89 * 0.89 + z * z );
206 func[10] = z * z * z;
207 func[11] = 1. / sqrt( Q0 );
208 func[12] = z / sqrt( Q0 );
209 func[13] = z * z / sqrt( Q0 );
210 func[14] = z * z * z / sqrt( Q0 );
212 for (
int i = 0; i < 15; i++ ) {
offset += m_pars[i] * func[i]; }
221 double cosz =
cos( ztof / 1000.0 );
227 sigma = 0.115816 - 0.0933215 * cosz + 0.0788252 * cosz * cosz;
232 sigma = 0.121536 - 0.0935898 * cosz + 0.0748771 * cosz * cosz;
237 sigma = 0.106882 - 0.0147375 * cosz + 0.027491 * cosz * cosz;
241 sigma = 0.106882 - 0.0147375 * cosz + 0.027491 * cosz * cosz;
246 sigma = 0.168489 - 0.131762 * cosz + 0.105708 * cosz * cosz;
250 default:
sigma = 0.100;
break;
EvtRecTrack * PidTrk() const
double probCalculate(double chi2, int n)
double pdfCalculate(double offset, double sigma)
double pdfMinSigmaCut() const