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

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