365 |
} |
} |
366 |
return (last_plane-first_plane+1); |
return (last_plane-first_plane+1); |
367 |
} |
} |
368 |
|
/** |
369 |
|
* Returns the reduced chi-square of track x-projection |
370 |
|
*/ |
371 |
|
Float_t TrkTrack::GetChi2X(){ |
372 |
|
float chiq=0; |
373 |
|
for(int ip=0; ip<6; ip++)if(XGood(ip))chiq+= pow((xv[ip]-xm[ip])/resx[ip],2.); |
374 |
|
if(GetNX()>3)chiq=chiq/(GetNX()-3); |
375 |
|
else chiq=0; |
376 |
|
if(chiq==0)cout << " Float_t TrkTrack::GetChi2X() -- WARNING -- value not defined "<<chiq<<endl; |
377 |
|
return chiq; |
378 |
|
} |
379 |
|
/** |
380 |
|
* Returns the reduced chi-square of track y-projection |
381 |
|
*/ |
382 |
|
Float_t TrkTrack::GetChi2Y(){ |
383 |
|
float chiq=0; |
384 |
|
for(int ip=0; ip<6; ip++)if(YGood(ip))chiq+= pow((yv[ip]-ym[ip])/resy[ip],2.); |
385 |
|
if(GetNY()>2)chiq=chiq/(GetNY()-2); |
386 |
|
else chiq=0; |
387 |
|
if(chiq==0)cout << " Float_t TrkTrack::GetChi2Y() -- WARNING -- value not defined "<<chiq<<endl; |
388 |
|
return chiq; |
389 |
|
} |
390 |
|
/** |
391 |
|
* Returns the logarythm of the likeliwood-function of track x-projection |
392 |
|
*/ |
393 |
|
Float_t TrkTrack::GetLnLX(){ |
394 |
|
float lnl=0; |
395 |
|
for(int ip=0; ip<6; ip++) |
396 |
|
if( XGood(ip) && tailx[ip]!=0 ) |
397 |
|
lnl += (tailx[ip]+1.) * log( (tailx[ip]*pow(resx[ip],2.) + pow(xv[ip]-xm[ip],2.)) / (tailx[ip]*pow(resx[ip],2)) ); |
398 |
|
if(GetNX()>3)lnl=lnl/(GetNX()-3); |
399 |
|
else lnl=0; |
400 |
|
if(lnl==0)cout << " Float_t TrkTrack::GetLnLX() -- WARNING -- value not defined "<<lnl<<endl; |
401 |
|
return lnl; |
402 |
|
|
403 |
|
} |
404 |
|
/** |
405 |
|
* Returns the logarythm of the likeliwood-function of track y-projection |
406 |
|
*/ |
407 |
|
Float_t TrkTrack::GetLnLY(){ |
408 |
|
float lnl=0; |
409 |
|
for(int ip=0; ip<6; ip++) |
410 |
|
if( YGood(ip) && taily[ip]!=0 ) |
411 |
|
lnl += (taily[ip]+1.) * log( (taily[ip]*pow(resy[ip],2.) + pow(yv[ip]-ym[ip],2.)) / (taily[ip]*pow(resy[ip],2)) ); |
412 |
|
if(GetNY()>2)lnl=lnl/(GetNY()-2); |
413 |
|
else lnl=0; |
414 |
|
if(lnl==0)cout << " Float_t TrkTrack::GetLnLY() -- WARNING -- value not defined "<<lnl<<endl; |
415 |
|
return lnl; |
416 |
|
|
417 |
|
} |
418 |
//-------------------------------------- |
//-------------------------------------- |
419 |
// |
// |
420 |
// |
// |