1 | #ifndef COSY_TPointStar
|
---|
2 | #define COSY_TPointStar
|
---|
3 |
|
---|
4 | #ifndef ROOT_TNamed
|
---|
5 | #include <TNamed.h>
|
---|
6 | #endif
|
---|
7 |
|
---|
8 | //class istream;
|
---|
9 | //class ostream;
|
---|
10 |
|
---|
11 | class ZdAz;
|
---|
12 | class AltAz;
|
---|
13 |
|
---|
14 | class MPointing;
|
---|
15 |
|
---|
16 | class TPointStar : public TNamed
|
---|
17 | {
|
---|
18 | friend std::istream &operator>>(std::istream &fin, TPointStar &set);
|
---|
19 | friend std::ostream &operator<<(std::ostream &fout, TPointStar &set);
|
---|
20 | private:
|
---|
21 | Double_t fStarAz;
|
---|
22 | Double_t fStarEl;
|
---|
23 |
|
---|
24 | Double_t fRawAz;
|
---|
25 | Double_t fRawEl;
|
---|
26 |
|
---|
27 | Double_t fMag;
|
---|
28 |
|
---|
29 | void Init(const char *name=0, const char *title=0);
|
---|
30 | public:
|
---|
31 | TPointStar(const char *name, const char *title=0) { Init(name, title); }
|
---|
32 | TPointStar(Double_t sel=0, Double_t saz=0, Double_t rel=0, Double_t raz=0);
|
---|
33 | TPointStar(const TPointStar &set) : TNamed(set)
|
---|
34 | {
|
---|
35 | fStarAz = set.fStarAz;
|
---|
36 | fStarEl = set.fStarEl;
|
---|
37 | fRawAz = set.fRawAz;
|
---|
38 | fRawEl = set.fRawEl;
|
---|
39 | fMag = set.fMag;
|
---|
40 | }
|
---|
41 |
|
---|
42 | Double_t GetMag() const { return fMag; }
|
---|
43 | Double_t GetResidual(Double_t *err=0) const;
|
---|
44 | //Double_t GetResidual() const;
|
---|
45 |
|
---|
46 | Double_t GetDEl() const;// { return (fRawEl-fStarEl)*TMath::RadToDeg(); }
|
---|
47 | Double_t GetDZd() const;// { return -GetDEl(); }
|
---|
48 | Double_t GetDAz() const;// { return (fRawAz-fStarAz)*TMath::RadToDeg(); }
|
---|
49 | Double_t GetStarEl() const;// { return fStarEl*TMath::RadToDeg(); }
|
---|
50 | Double_t GetStarZd() const;// { return 90.-fStarEl*TMath::RadToDeg(); }
|
---|
51 | Double_t GetStarAz() const;// { return fStarAz*TMath::RadToDeg(); }
|
---|
52 | Double_t GetRawEl() const;// { return fRawEl*TMath::RadToDeg(); }
|
---|
53 | Double_t GetRawAz() const;// { return fRawAz*TMath::RadToDeg(); }
|
---|
54 | Double_t GetRawZd() const;// { return 90.-fRawEl*TMath::RadToDeg(); }
|
---|
55 |
|
---|
56 | ZdAz GetStarZdAz() const;// { return ZdAz(TMath::Pi()/2-fStarEl, fStarAz); }
|
---|
57 | AltAz GetStarAltAz() const;// { return AltAz(fStarEl, fStarAz); }
|
---|
58 |
|
---|
59 | ZdAz GetRawZdAz() const;// { return ZdAz(TMath::Pi()/2-fRawEl, fRawAz); }
|
---|
60 | AltAz GetRawAltAz() const;// { return AltAz(fRawEl, fRawAz); }
|
---|
61 |
|
---|
62 | void AdjustEl(Double_t del);// { fStarEl += del*TMath::DegToRad(); }
|
---|
63 | void AdjustAz(Double_t daz);// { fStarAz += daz*TMath::DegToRad(); }
|
---|
64 |
|
---|
65 | void Adjust(const MPointing &bend);/*
|
---|
66 | {
|
---|
67 | AltAz p = bend(GetStarAltAz());
|
---|
68 | fStarEl = p.Alt();
|
---|
69 | fStarAz = p.Az();
|
---|
70 | }*/
|
---|
71 | void AdjustBack(const MPointing &bend);/*
|
---|
72 | {
|
---|
73 | AltAz p = bend.CorrectBack(GetRawAltAz());
|
---|
74 | fRawEl = p.Alt();
|
---|
75 | fRawAz = p.Az();
|
---|
76 | }*/
|
---|
77 | ClassDef(TPointStar, 1)
|
---|
78 | };
|
---|
79 |
|
---|
80 | /*
|
---|
81 | class TPoint : public TPointStar
|
---|
82 | {
|
---|
83 | public:
|
---|
84 | TPoint(Double_t sel=0, Double_t saz=0, Double_t rel=0, Double_t raz=0)
|
---|
85 | : TPointStar(sel, saz, rel, raz)
|
---|
86 | {
|
---|
87 | }
|
---|
88 | ClassDef(TPoint, 1)
|
---|
89 | };
|
---|
90 | */
|
---|
91 |
|
---|
92 | std::istream &operator>>(std::istream &fin, TPointStar &set);
|
---|
93 | std::ostream &operator<<(std::ostream &out, TPointStar &set);
|
---|
94 |
|
---|
95 | #endif
|
---|