source: trunk/MagicSoft/Mars/mastro/MObservatory.h@ 3422

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