Changeset 8915
- Timestamp:
- 06/02/08 16:23:28 (16 years ago)
- Location:
- trunk/MagicSoft/Mars/mpointing
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mpointing/MPointing.cc
r8829 r8915 101 101 #define DEBUG(txt) 102 102 103 void ZdAz::Round() 104 { 105 fX = TMath::Nint(fX); 106 fY = TMath::Nint(fY); 107 } 108 109 void ZdAz::Abs() 110 { 111 fX = TMath::Abs(fX); 112 fY = TMath::Abs(fY); 113 } 114 103 115 void MPointing::Init(const char *name, const char *title) 104 116 { … … 357 369 } 358 370 371 ZdAz MPointing::AddOffsets(const ZdAz &zdaz) const 372 { 373 AltAz p(TMath::Pi()/2-zdaz.Zd(), zdaz.Az()); 374 375 AltAz c = AddOffsets(p); 376 377 return ZdAz(TMath::Pi()/2-c.Alt(), c.Az()); 378 } 379 380 TVector3 MPointing::AddOffsets(const TVector3 &v) const 381 { 382 AltAz p(TMath::Pi()/2-v.Theta(), v.Phi()); 383 AltAz c = AddOffsets(p); 384 385 TVector3 rc; 386 rc.SetMagThetaPhi(1, TMath::Pi()/2-c.Alt(), c.Az()); 387 return rc; 388 } 389 359 390 AltAz MPointing::SubtractOffsets(const AltAz &aa) const 360 391 { … … 367 398 368 399 return p; 400 } 401 402 ZdAz MPointing::SubtractOffsets(const ZdAz &zdaz) const 403 { 404 AltAz p(TMath::Pi()/2-zdaz.Zd(), zdaz.Az()); 405 406 AltAz c = SubtractOffsets(p); 407 408 return ZdAz(TMath::Pi()/2-c.Alt(), c.Az()); 409 } 410 411 TVector3 MPointing::SubtractOffsets(const TVector3 &v) const 412 { 413 AltAz p(TMath::Pi()/2-v.Theta(), v.Phi()); 414 AltAz c = SubtractOffsets(p); 415 416 TVector3 rc; 417 rc.SetMagThetaPhi(1, TMath::Pi()/2-c.Alt(), c.Az()); 418 return rc; 369 419 } 370 420 … … 707 757 } 708 758 759 void MPointing::GetError(TArrayD &par) const 760 { 761 par = fError; 762 for (int i=0; i<kNumPar; i++) 763 par[i] *= TMath::RadToDeg(); 764 } 765 766 TVector2 MPointing::GetDxy() const 767 { 768 return TVector2(fDx, fDy)*TMath::RadToDeg(); 769 } 770 771 Double_t MPointing::GetPx() const 772 { 773 return fPx*TMath::RadToDeg(); 774 } 775 776 Double_t MPointing::GetPy() const 777 { 778 return fPy*TMath::RadToDeg(); 779 } 780 709 781 void MPointing::SetMinuitParameters(TMinuit &m, Int_t n) const 710 782 { -
trunk/MagicSoft/Mars/mpointing/MPointing.h
r8877 r8915 91 91 // MSlewing only?!? 92 92 double Ratio() const { return fX/fY; } 93 void Round() { fX=(int)(floor(fX+.5)); fY=(int)(floor(fY+.5)); }94 void Abs() { fX=fabs(fX); fY=fabs(fY); }93 void Round(); 94 void Abs(); 95 95 96 96 ClassDef(ZdAz, 0) … … 250 250 } 251 251 252 AltAz AddOffsets(const AltAz &aa) const; 253 ZdAz AddOffsets(const ZdAz &zdaz) const 254 { 255 AltAz p(TMath::Pi()/2-zdaz.Zd(), zdaz.Az()); 256 AltAz c = AddOffsets(p); 257 return ZdAz(TMath::Pi()/2-c.Alt(), c.Az()); 258 } 259 TVector3 AddOffsets(const TVector3 &v) const 260 { 261 AltAz p(TMath::Pi()/2-v.Theta(), v.Phi()); 262 AltAz c = AddOffsets(p); 263 TVector3 rc; 264 rc.SetMagThetaPhi(1, TMath::Pi()/2-c.Alt(), c.Az()); 265 return rc; 266 } 267 268 AltAz SubtractOffsets(const AltAz &aa) const; 269 ZdAz SubtractOffsets(const ZdAz &zdaz) const 270 { 271 AltAz p(TMath::Pi()/2-zdaz.Zd(), zdaz.Az()); 272 AltAz c = SubtractOffsets(p); 273 return ZdAz(TMath::Pi()/2-c.Alt(), c.Az()); 274 } 275 TVector3 SubtractOffsets(const TVector3 &v) const 276 { 277 AltAz p(TMath::Pi()/2-v.Theta(), v.Phi()); 278 AltAz c = SubtractOffsets(p); 279 TVector3 rc; 280 rc.SetMagThetaPhi(1, TMath::Pi()/2-c.Alt(), c.Az()); 281 return rc; 282 } 252 AltAz AddOffsets(const AltAz &aa) const; 253 ZdAz AddOffsets(const ZdAz &zdaz) const; 254 TVector3 AddOffsets(const TVector3 &v) const; 255 256 AltAz SubtractOffsets(const AltAz &aa) const; 257 ZdAz SubtractOffsets(const ZdAz &zdaz) const; 258 TVector3 SubtractOffsets(const TVector3 &v) const; 283 259 284 260 void SetParameters(const Double_t *par, Int_t n=kNumPar); … … 294 270 GetParameters(par.GetArray()); 295 271 } 296 void GetError(TArrayD &par) const 297 { 298 par = fError; 299 for (int i=0; i<kNumPar; i++) 300 par[i] *= TMath::RadToDeg(); 301 } 272 void GetError(TArrayD &par) const; 302 273 303 274 Double_t &operator[](UInt_t i) { return *fCoeff[i]; } … … 327 298 */ 328 299 329 TVector2 GetDxy() const { return TVector2(fDx, fDy)*TMath::RadToDeg(); }330 331 Double_t GetPx() const { return fPx*TMath::RadToDeg(); }332 Double_t GetPy() const { return fPy*TMath::RadToDeg(); }300 TVector2 GetDxy() const;// { return TVector2(fDx, fDy)*TMath::RadToDeg(); } 301 302 Double_t GetPx() const;// { return fPx*TMath::RadToDeg(); } 303 Double_t GetPy() const;// { return fPy*TMath::RadToDeg(); } 333 304 334 305 Bool_t IsPxValid() const { return fError[kPX]>0; } -
trunk/MagicSoft/Mars/mpointing/MPointingPos.cc
r7887 r8915 57 57 const TString MPointingPos::gsDefName = "MPointingPos"; 58 58 const TString MPointingPos::gsDefTitle = "Container storing the (corrected) telescope pointing position"; 59 60 Double_t MPointingPos::GetZdRad() const 61 { 62 return fZd*TMath::DegToRad(); 63 } 64 65 Double_t MPointingPos::GetAzRad() const 66 { 67 return fAz*TMath::DegToRad(); 68 } 69 70 Double_t MPointingPos::GetRaRad() const 71 { 72 return fRa*TMath::DegToRad()*15; 73 } 74 75 Double_t MPointingPos::GetDecRad() const 76 { 77 return fDec*TMath::DegToRad(); 78 } 59 79 60 80 // -------------------------------------------------------------------------- -
trunk/MagicSoft/Mars/mpointing/MPointingPos.h
r7550 r8915 51 51 Double_t GetAz() const { return fAz; } 52 52 53 Double_t GetZdRad() const { return fZd*TMath::DegToRad(); }54 Double_t GetAzRad() const { return fAz*TMath::DegToRad(); }53 Double_t GetZdRad() const;// { return fZd*TMath::DegToRad(); } 54 Double_t GetAzRad() const;// { return fAz*TMath::DegToRad(); } 55 55 56 56 ZdAz GetZdAz() const { return ZdAz(fZd, fAz); } … … 60 60 Double_t GetDec() const { return fDec; } 61 61 62 Double_t GetRaRad() const { return fRa*TMath::DegToRad()*15; }63 Double_t GetDecRad() const { return fDec*TMath::DegToRad(); }62 Double_t GetRaRad() const;// { return fRa*TMath::DegToRad()*15; } 63 Double_t GetDecRad() const;// { return fDec*TMath::DegToRad(); } 64 64 65 65 Double_t RotationAngle(const MObservatory &o) const;
Note:
See TracChangeset
for help on using the changeset viewer.