source: JEM-EUSO/esaf_lal/tags/v1_r0/esaf/packages/common/atmosphere/include/AtmosphereData.hh @ 117

Last change on this file since 117 was 117, checked in by moretto, 11 years ago

ESAF version compilable on mac OS

File size: 3.4 KB
Line 
1// ESAF : Euso Simulation and Analysis Framework
2// $Id: AtmosphereData.hh 2749 2006-07-04 13:16:23Z moreggia $
3// Sylvain Moreggia created Dec,  1 2003
4
5#ifndef __ATMOSPHEREDATA_HH_
6#define __ATMOSPHEREDATA_HH_
7
8#include "euso.hh"
9#include "Config.hh"
10#include "EsafConfigurable.hh"
11#include "EsafMsgSource.hh"
12#include "EConst.hh"
13
14/*******************************************************************************
15 *
16 * AtmosphereData : class description
17 *
18 * Interface for atmospheric data storage
19 * Every atmosphere holds its own version of AtmosphereData
20 *
21 ******************************************************************************/
22
23
24class AtmosphereData : public EsafConfigurable, public EsafMsgSource{
25public:
26    // ctor
27    AtmosphereData();
28
29    // dtor
30    virtual ~AtmosphereData();
31
32    // Following methods return relevant tables
33    inline const Double_t* GetAltitudeTable() const {return fAltitudeTable;}
34    inline const Double_t* GetPressureTable() const {return fPressureTable;}
35    inline const Double_t* GetTemperatureTable() const {return fTemperatureTable;}
36    inline const Double_t* GetAir_DensityTable() const {return fAir_DensityTable;}
37    inline const Double_t* GetO_DensityTable() const {return fO_DensityTable;}
38    inline const Double_t* GetO2_DensityTable() const {return fO2_DensityTable;}
39    inline const Double_t* GetH2O_DensityTable() const {return fH2O_DensityTable;}
40    inline const Double_t* GetO3_DensityTable() const {return fO3_DensityTable;}
41    inline const Double_t* GetO3_DensityPPMVTable() const {return fO3_DensityPPMVTable;}
42    inline const Double_t* GetN2_DensityTable() const {return fN2_DensityTable;}
43    inline const Double_t* GetAerosol_DensityTable(string& type) const {return fAerosols[type];}
44    inline const Double_t* GetIndexTable() const {return fIndexTable;}
45
46    // within [-90,90] (positive <==> north)
47    virtual Double_t GetLatitude() const = 0;
48   
49    // within [0,360[ (toward east)
50    virtual Double_t GetLongitude() const = 0;
51   
52    // get day of year
53    virtual Int_t GetDoy() const = 0;
54   
55    // NB : day starts from 1 and can reach 365
56    // in sec UT, 1sec <==> 1st Jan 00:00:01 (year not taken into account)
57    virtual Double_t GetDate() const = 0;
58   
59
60   
61    EsafConfigClass(Atmosphere,AtmosphereData)
62
63protected:
64    // Set tables
65    virtual void SetTables() = 0;
66   
67    // fill missing data with default values
68    void GetDefault(string&, Int_t);
69   
70    // fill Lwtrn_Tape5 with atmospheric values, used by lowtran calculations
71    void WriteUserModelFile(Int_t);
72
73    // to achieve constant steps when GetDefault is called
74    Double_t LinearInterpolateLowtran(Int_t h, const vector<Double_t>&, const vector<Double_t>&);
75   
76    // Plot the implemented tables
77    //void DebugPlots(Int_t) const;
78    //Double_t Smooth(string& , Int_t, Double_t) const;
79
80    Double_t* fAltitudeTable;               // tables ->..
81    Double_t* fPressureTable;
82    Double_t* fTemperatureTable;
83    Double_t* fAir_DensityTable;
84    Double_t* fO_DensityTable;
85    Double_t* fO2_DensityTable;
86    Double_t* fO3_DensityTable;
87    Double_t* fO3_DensityPPMVTable;
88    Double_t* fN2_DensityTable;
89    Double_t* fCO2_DensityTable;
90    Double_t* fH2O_DensityTable;
91    mutable map<string,Double_t*> fAerosols;
92    Double_t* fIndexTable;                   // ..<- tables
93
94
95    ClassDef(AtmosphereData,0)
96};
97
98
99
100#endif  /* __ATMOSPHEREDATA_HH_ */
101
Note: See TracBrowser for help on using the repository browser.