/[PAMELA software]/DarthVader/TrackerLevel2/src/TrkLevel2.cpp
ViewVC logotype

Diff of /DarthVader/TrackerLevel2/src/TrkLevel2.cpp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.36 by pam-fi, Thu May 24 16:45:48 2007 UTC revision 1.37 by pam-fi, Wed Jun 6 09:36:07 2007 UTC
# Line 365  Int_t TrkTrack::GetLeverArmY(){ Line 365  Int_t TrkTrack::GetLeverArmY(){
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  //  //

Legend:
Removed from v.1.36  
changed lines
  Added in v.1.37

  ViewVC Help
Powered by ViewVC 1.1.23