1 | #ifndef MARS_MObservatory
|
---|
2 | #define MARS_MObservatory
|
---|
3 |
|
---|
4 | #ifndef MARS_MParContainer
|
---|
5 | #include "MParContainer.h"
|
---|
6 | #endif
|
---|
7 |
|
---|
8 | class MTime;
|
---|
9 |
|
---|
10 | class MObservatory : public MParContainer
|
---|
11 | {
|
---|
12 | public:
|
---|
13 | enum LocationName_t
|
---|
14 | {
|
---|
15 | kMagic1,
|
---|
16 | kWuerzburgCity
|
---|
17 | };
|
---|
18 |
|
---|
19 | private:
|
---|
20 | LocationName_t fObservatoryKey; //!
|
---|
21 |
|
---|
22 | TString fObservatoryName; //! Name of the observatory
|
---|
23 |
|
---|
24 | Double_t fLongitude; //! [rad] Longitude of observatory (+ east)
|
---|
25 | Double_t fLatitude; //! [rad] Latitude of observatory (+ north)
|
---|
26 |
|
---|
27 | Double_t fSinLatitude; //! Sin component for faster access
|
---|
28 | Double_t fCosLatitude; //! Cos component for faster access
|
---|
29 |
|
---|
30 | Double_t fHeight; //! [m] height of observatory
|
---|
31 |
|
---|
32 | void Init(const char *name, const char *title);
|
---|
33 |
|
---|
34 | public:
|
---|
35 | MObservatory(const char *name=NULL, const char *title=NULL);
|
---|
36 | MObservatory(LocationName_t key, const char *name=NULL, const char *title=NULL);
|
---|
37 |
|
---|
38 | void SetLocation(LocationName_t name);
|
---|
39 |
|
---|
40 | void Print(Option_t *o=0) const;
|
---|
41 |
|
---|
42 | const TString &GetObservatoryName() const { return fObservatoryName; }
|
---|
43 |
|
---|
44 | Double_t GetLatitudeDeg() const { return fLatitude*kRad2Deg; } //[deg]
|
---|
45 | Double_t GetLongitudeDeg() const { return fLongitude*kRad2Deg; } //[deg]
|
---|
46 |
|
---|
47 | Double_t GetLatitudeRad() const { return fLatitude; } //[rad]
|
---|
48 | Double_t GetLongitudeRad() const { return fLongitude; } //[rad]
|
---|
49 |
|
---|
50 | Double_t GetPhi() const { return fLatitude; } //[rad]
|
---|
51 | Double_t GetElong() const { return fLongitude; } //[rad]
|
---|
52 |
|
---|
53 | Double_t GetSinPhi() const { return fSinLatitude; }
|
---|
54 | Double_t GetCosPhi() const { return fCosLatitude; }
|
---|
55 |
|
---|
56 | Double_t GetHeight() const { return fHeight; }
|
---|
57 |
|
---|
58 | void RotationAngle(Double_t theta, Double_t phi, Double_t &sin, Double_t &cos) const;
|
---|
59 | Double_t RotationAngle(Double_t theta, Double_t phi) const;
|
---|
60 |
|
---|
61 | LocationName_t GetObservatoryKey() const { return fObservatoryKey; }
|
---|
62 |
|
---|
63 | ClassDef(MObservatory, 0) // class storing observatory locations
|
---|
64 | };
|
---|
65 |
|
---|
66 | #endif
|
---|