source: trunk/MagicSoft/Mars/mtemp/MObservatory.h@ 1912

Last change on this file since 1912 was 1784, checked in by tbretz, 22 years ago
*** empty log message ***
File size: 2.1 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 fHeight; //! [m] height of observatory
26
27 void Init(const char *name, const char *title);
28
29public:
30 MObservatory(const char *name=NULL, const char *title=NULL);
31 MObservatory(LocationName_t key, const char *name=NULL, const char *title=NULL);
32
33 void SetLocation(LocationName_t name);
34
35 void Print(Option_t *) const;
36
37 const TString &GetObservatoryName() const { return fObservatoryName; }
38
39 Double_t GetLatitudeDeg() const { return fLatitude*kRad2Deg; } //[deg]
40 Double_t GetLongitudeDeg() const { return fLongitude*kRad2Deg; } //[deg]
41
42 Double_t GetLatitudeRad() const { return fLatitude; } //[rad]
43 Double_t GetLongitudeRad() const { return fLongitude; } //[rad]
44
45 Double_t GetPhi() const { return fLatitude; } //[rad]
46 Double_t GetElong() const { return fLongitude; } //[rad]
47
48 Double_t GetHeight() const { return fHeight; }
49
50 LocationName_t GetObservatoryKey() const { return fObservatoryKey; }
51
52 static Double_t Dms2Rad(Int_t deg, UInt_t min, Double_t sec)
53 {
54 /* pi/(180*3600): arcseconds to radians */
55#define DAS2R 4.8481368110953599358991410235794797595635330237270e-6
56 return DAS2R * (60.0 * (60.0 * (Double_t)deg + (Double_t)min) + sec);
57 }
58
59 static Double_t Hms2Rad(Int_t hor, UInt_t min, Double_t sec)
60 {
61 /* pi/(12*3600): seconds of time to radians */
62#define DS2R 7.2722052166430399038487115353692196393452995355905e-5
63 return DS2R * (60.0 * (60.0 * (Double_t)hor + (Double_t)min) + sec);
64 }
65
66 ClassDef(MObservatory, 0)
67
68};
69
70#endif
71
Note: See TracBrowser for help on using the repository browser.