| 1 | #ifndef MARS_MPointingPos | 
|---|
| 2 | #define MARS_MPointingPos | 
|---|
| 3 |  | 
|---|
| 4 | #ifndef MARS_MParContainer | 
|---|
| 5 | #include "MParContainer.h" | 
|---|
| 6 | #endif | 
|---|
| 7 |  | 
|---|
| 8 | // FIXME: Should not be here... (ZdAz) | 
|---|
| 9 | #ifndef MARS_MPointing | 
|---|
| 10 | #include "MPointing.h" | 
|---|
| 11 | #endif | 
|---|
| 12 |  | 
|---|
| 13 | class MTime; | 
|---|
| 14 | class MObservatory; | 
|---|
| 15 | class MPointingDev; | 
|---|
| 16 |  | 
|---|
| 17 | class MPointingPos : public MParContainer | 
|---|
| 18 | { | 
|---|
| 19 | private: | 
|---|
| 20 | Double_t fZd;  // [deg] Zenith distance (ZA) | 
|---|
| 21 | Double_t fAz;  // [deg] Azimuth | 
|---|
| 22 |  | 
|---|
| 23 | Double_t fRa;  // [h]   Right ascension | 
|---|
| 24 | Double_t fHa;  // [h]   Hour angle | 
|---|
| 25 | Double_t fDec; // [deg] Declination | 
|---|
| 26 |  | 
|---|
| 27 | public: | 
|---|
| 28 | MPointingPos(const char *name=0, const char *title=0) : fZd(0), fAz(0), fRa(0), fHa(0), fDec(0) | 
|---|
| 29 | { | 
|---|
| 30 | fName  = name ? name   : "MPointingPos"; | 
|---|
| 31 | fTitle = title ? title : "Container storing the (corrected) telescope pointing position"; | 
|---|
| 32 | } | 
|---|
| 33 | MPointingPos(const MPointingPos &p) : MParContainer(p), | 
|---|
| 34 | fZd(p.fZd), fAz(p.fAz), fRa(p.fRa), fHa(p.fHa), fDec(p.fDec) | 
|---|
| 35 | { | 
|---|
| 36 | } | 
|---|
| 37 |  | 
|---|
| 38 | void SetLocalPosition(Double_t zd, Double_t az) { fZd=zd; fAz=az; } | 
|---|
| 39 | void SetSkyPosition(Double_t ra, Double_t dec, Double_t ha=0) { fRa=ra; fDec=dec; fHa=ha; } | 
|---|
| 40 |  | 
|---|
| 41 | Double_t GetZd() const  { return fZd; } | 
|---|
| 42 | Double_t GetAz() const  { return fAz; } | 
|---|
| 43 |  | 
|---|
| 44 | Double_t GetZdRad() const  { return fZd*TMath::DegToRad(); } | 
|---|
| 45 | Double_t GetAzRad() const  { return fAz*TMath::DegToRad(); } | 
|---|
| 46 |  | 
|---|
| 47 | ZdAz GetZdAz() const { return ZdAz(fZd, fAz); } | 
|---|
| 48 |  | 
|---|
| 49 | Double_t GetRa() const  { return fRa; } | 
|---|
| 50 | Double_t GetHa() const  { return fHa; } | 
|---|
| 51 | Double_t GetDec() const { return fDec; } | 
|---|
| 52 |  | 
|---|
| 53 | Double_t GetRaRad() const  { return fRa*TMath::DegToRad()*15; } | 
|---|
| 54 | Double_t GetDecRad() const { return fDec*TMath::DegToRad(); } | 
|---|
| 55 |  | 
|---|
| 56 | Double_t RotationAngle(const MObservatory &o) const; | 
|---|
| 57 | Double_t RotationAngle(const MObservatory &o, const MTime &t, const MPointingDev *dev=0) const; | 
|---|
| 58 | Double_t RotationAngle(const MObservatory &o, const MTime *t) const | 
|---|
| 59 | { | 
|---|
| 60 | return t ? RotationAngle(o, *t) : RotationAngle(o); | 
|---|
| 61 | } | 
|---|
| 62 |  | 
|---|
| 63 | ClassDef(MPointingPos, 1) //Container storing the (corrected) telescope pointing position | 
|---|
| 64 | }; | 
|---|
| 65 |  | 
|---|
| 66 | #endif | 
|---|