FACT++  1.0
Double_t TPointStar::GetResidual ( Double_t *  err = 0) const

Definition at line 55 of file TPointStar.cc.

References fRawAz, fRawEl, fStarAz, and fStarEl.

Referenced by TPointGui::Fit(), and GetMag().

56 {
57  const Double_t del = fRawEl-fStarEl;
58  const Double_t daz = fRawAz-fStarAz;
59 
60  const double x = cos(fRawEl) * cos(fStarEl) * cos(fStarAz-fRawAz);
61  const double y = sin(fRawEl) * sin(fStarEl);
62 
63  const Double_t d = x + y;
64 
65  if (err)
66  {
67  // Error of one pixel in the CCD
68  const Double_t e1 = 45./3600*TMath::DegToRad() /4 * 0.5;
69 
70  // Error of the SE readout
71  const Double_t e2 = 360./16384*TMath::DegToRad()/4 * 0.5;
72 
73  const Double_t e11 = sin(del)+cos(fRawEl)*sin(fStarEl)*(1-cos(daz));
74  const Double_t e12 = cos(fRawEl)*cos(fStarEl)*sin(daz);
75 
76  const Double_t e21 = -sin(del)+sin(fRawEl)*cos(fStarEl)*(1-cos(daz));
77  const Double_t e22 = -cos(fRawEl)*cos(fStarEl)*sin(daz);
78 
79  const Double_t err1 = sqrt(1-d*d);
80  const Double_t err2 = (e11*e11 + e12*e12)*e1*e1;
81  const Double_t err3 = (e21*e21 + e22*e22)*e2*e2;
82 
83  *err = sqrt(err2+err3)/err1 * TMath::RadToDeg();
84  }
85 
86  const Double_t dist = acos(d);
87  return dist * TMath::RadToDeg();
88 }
Double_t fStarAz
Definition: TPointStar.h:18
Double_t fRawAz
Definition: TPointStar.h:21
Double_t fRawEl
Definition: TPointStar.h:22
Double_t fStarEl
Definition: TPointStar.h:19

+ Here is the caller graph for this function: