Changeset 14589 for trunk/Cosy


Ignore:
Timestamp:
11/08/12 15:51:36 (12 years ago)
Author:
tbretz
Message:
The new algorithm didn't corrctly tak into account that it was el not zd
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Cosy/tpoint/TPointStar.cc

    r14581 r14589  
    6262Double_t TPointStar::GetResidual(Double_t *err) const
    6363{
    64     /*
    65      TVector3 v1, v2;
    66      v1.SetMagThetaPhi(1, TMath::Pi()/2-fRawEl, fRawAz);
    67      v2.SetMagThetaPhi(1, TMath::Pi()/2-fStarEl, fStarAz);
    68 
    69      return v1.Angle(v2)*TMath::RadToDeg();
    70      */
    71 
    7264    const Double_t del = fRawEl-fStarEl;
    7365    const Double_t daz = fRawAz-fStarAz;
    7466
    75     const double x = sin(fRawEl) * sin(fStarEl) * cos(fStarAz-fRawAz);
    76     const double y = cos(fRawEl) * cos(fStarEl);
     67    const double x = cos(fRawEl) * cos(fStarEl) * cos(fStarAz-fRawAz);
     68    const double y = sin(fRawEl) * sin(fStarEl);
    7769
    78     const Double_t d = acos(x + y);
     70    const Double_t d = x + y;
    7971
    8072    if (err)
Note: See TracChangeset for help on using the changeset viewer.