1 | // $Id: LowtranAerosol.hh 2676 2006-04-28 15:22:49Z moreggia $ |
---|
2 | // Author: Sylvain Moreggia 2006/04/24 |
---|
3 | |
---|
4 | /***************************************************************************** |
---|
5 | * ESAF: Euso Simulation and Analysis Framework * |
---|
6 | * * |
---|
7 | * Id: LowtranAerosol * |
---|
8 | * Package: <packagename> * |
---|
9 | * Coordinator: <coordinator> * |
---|
10 | * * |
---|
11 | *****************************************************************************/ |
---|
12 | |
---|
13 | #ifndef __LOWTRANAEROSOL_HH__ |
---|
14 | #define __LOWTRANAEROSOL_HH__ |
---|
15 | |
---|
16 | #include "euso.hh" |
---|
17 | #include "Aerosol.hh" |
---|
18 | |
---|
19 | //////////////////////////////////////////////////////////////////////////////// |
---|
20 | // // |
---|
21 | // LowtranAerosol // |
---|
22 | // // |
---|
23 | // Copies of lowtran aerosol models : // |
---|
24 | // // |
---|
25 | // - only rurals, urban and maritime models // |
---|
26 | // (desert and other models more difficult to extract fom the fortan code) // |
---|
27 | // // |
---|
28 | // - change of aerosol properties as function of local humidity along path // |
---|
29 | // not taken into account. As std models give rel. humidity ~ 50-70% // |
---|
30 | // within boudary layers, models at rel. hum. = 70% are copied // |
---|
31 | // // |
---|
32 | // - Profiles are not dependent of ground altitude. They're always // |
---|
33 | // given w.r.t. sea level // |
---|
34 | // // |
---|
35 | // - Only properties within [200nm,1536nm] are copied // |
---|
36 | // // |
---|
37 | //////////////////////////////////////////////////////////////////////////////// |
---|
38 | |
---|
39 | enum AerZone{BOUND1=1, BOUND2=2, ALL=3}; |
---|
40 | // BOUND1 Boundary layer in [0-1km] |
---|
41 | // BOUND2 Boundary layer in [1-2km] |
---|
42 | // ALL whole boundary layer in [0-2km] |
---|
43 | |
---|
44 | class LowtranAerosol : public Aerosol { |
---|
45 | public: |
---|
46 | // ctor |
---|
47 | LowtranAerosol(string); |
---|
48 | //dtor |
---|
49 | virtual ~LowtranAerosol(); |
---|
50 | |
---|
51 | // Return impact for given position and direction |
---|
52 | // Convention : - if already within aerosol, returns pos |
---|
53 | // - no impact, returns (0,0,HUGE) |
---|
54 | virtual EarthVector GetImpact(const EarthVector& pos, const EarthVector& dir,string opt = "default") const; |
---|
55 | |
---|
56 | // to know if a position is within aerosol |
---|
57 | virtual Bool_t IsInAerosol(const EarthVector&) const; |
---|
58 | |
---|
59 | // Returns the transmission at given wl, along given track |
---|
60 | // set "scat" to the scattering rate along a direction |
---|
61 | virtual Double_t Trans(const EarthVector&,const EarthVector&,Double_t, Double_t& scat) const; |
---|
62 | |
---|
63 | // get a scattering position along a given track |
---|
64 | // depends on wavelength |
---|
65 | // return kFALSE if absorption process occurs |
---|
66 | virtual Bool_t RandomScatPos(const EarthVector&,const EarthVector&,Double_t,EarthVector&) const; |
---|
67 | |
---|
68 | // set incoming direction to the outgoing direction after scattering |
---|
69 | virtual void RandomDir(EarthVector&,Double_t) const; |
---|
70 | |
---|
71 | // aerosol scattering phase function - Normalized when integrated over full solid angle |
---|
72 | // depends on wavelength |
---|
73 | virtual Double_t PhaseFunction(const EarthVector&,const EarthVector&,Double_t) const; |
---|
74 | |
---|
75 | // aerosol scattering phase function - Normalized when integrated over full solid angle |
---|
76 | // depends on wavelength |
---|
77 | Double_t PhaseFunction(Double_t,Double_t) const; |
---|
78 | |
---|
79 | // returns maximum value of currently used scattering phase function |
---|
80 | // depends on wavelength range |
---|
81 | virtual Double_t GetMaxPhaseFunction(Double_t wlmin,Double_t wlmax) const; |
---|
82 | |
---|
83 | // interpolate fKwl coeff. |
---|
84 | // if abs=kTRUE, return value for absorption, else return value for extinction |
---|
85 | virtual Double_t Kwl(Double_t,Bool_t abs = kFALSE) const; |
---|
86 | |
---|
87 | // reset the instance |
---|
88 | virtual void Reset(); |
---|
89 | |
---|
90 | EsafConfigClass(Atmosphere,LowtranAerosol) |
---|
91 | |
---|
92 | private: |
---|
93 | |
---|
94 | // read config files |
---|
95 | virtual void Configure(); |
---|
96 | |
---|
97 | // build the configured object |
---|
98 | virtual void Build(); |
---|
99 | |
---|
100 | // true if track going locally downward |
---|
101 | Bool_t GoingDownward(const EarthVector&,const EarthVector&) const; |
---|
102 | |
---|
103 | // Like IsInAerosol, but deals with aerosol layers zone |
---|
104 | Bool_t IsInAerosolZone(const EarthVector&,AerZone) const; |
---|
105 | |
---|
106 | // check if wavelength is within bounds |
---|
107 | Bool_t CheckWlRange(Double_t) const; |
---|
108 | |
---|
109 | // Like GetImpact, but deals with aerosol layers zone |
---|
110 | EarthVector GetZoneImpact(const EarthVector& pos, const EarthVector& dir,AerZone zone,string opt = "default") const; |
---|
111 | |
---|
112 | string fType; // lowtran aerosol model |
---|
113 | Double_t fSz[3]; // used for aerosol altitude dependence. Values at 0, 1 and 2km |
---|
114 | Double_t fWlrange[7]; // wavelength ranges used in lowtran |
---|
115 | Double_t fKwl_ext[7]; // used for extinction wavelength dependence |
---|
116 | Double_t fKwl_abs[7]; // used for absorption wavelength dependence |
---|
117 | Double_t fG1[7]; // Assymetry coeff1. for DHG phase function parametrization |
---|
118 | Double_t fG2[7]; // Assymetry coeff2. for DHG phase function parametrization |
---|
119 | Double_t fF[7]; // Forward component for DHG phase function parametrization |
---|
120 | |
---|
121 | |
---|
122 | |
---|
123 | ClassDef(LowtranAerosol,0) |
---|
124 | }; |
---|
125 | |
---|
126 | #endif /* __LOWTRANAEROSOL_HH__ */ |
---|
127 | |
---|