1 | // ESAF : Euso Simulation and Analysis Framework |
---|
2 | // $Id: TestGround.hh 2681 2006-05-03 10:58:33Z moreggia $ |
---|
3 | // S. Moreggia created 27 October 2003 |
---|
4 | |
---|
5 | // A test class for ground description |
---|
6 | // Albedo = (nb of outgoing photons) / (nb of incoming photons) is used to get nb of outgoing photons |
---|
7 | // then they are distributed assuming ground is lambertian, i.e. BRDF is independant of outgoing angles |
---|
8 | // i.e. outgoing phase function follows a cos(theta) law |
---|
9 | |
---|
10 | #ifndef __TESTGROUND_HH__ |
---|
11 | #define __TESTGROUND_HH__ |
---|
12 | |
---|
13 | #include "Ground.hh" |
---|
14 | class TF2; |
---|
15 | |
---|
16 | class TestGround : public Ground { |
---|
17 | public: |
---|
18 | // ctor |
---|
19 | TestGround(); |
---|
20 | //dtor |
---|
21 | virtual ~TestGround(); |
---|
22 | |
---|
23 | // Get an impact form starting position and direction in atmosphere |
---|
24 | virtual EarthVector GetImpact(const EarthVector&,const EarthVector&) const; |
---|
25 | |
---|
26 | // Phase function of the outgoing light (earth sphericity taken into account) |
---|
27 | // - pos = position on ground (MES frame) |
---|
28 | // - incomdir = incident direction (MES frame) |
---|
29 | // - outgodir = outgoing position (MES frame) |
---|
30 | virtual Double_t Outgoing_phase_function(const EarthVector& pos, const EarthVector& incomdir, const EarthVector& outgodir) const; |
---|
31 | |
---|
32 | // maximum value of outgoing phase function |
---|
33 | virtual Double_t GetMaxOutgoing_phase_function() const; |
---|
34 | |
---|
35 | // Get albedo for a given position |
---|
36 | inline virtual Double_t Albedo(const EarthVector&) const {return fAlbedo;} |
---|
37 | |
---|
38 | // Get ground specular component intensity at given position |
---|
39 | inline virtual Double_t Specular(const EarthVector&) const {return fSpec;} |
---|
40 | |
---|
41 | // Get ground altitude at the vertical of the given point |
---|
42 | inline virtual Double_t Altitude(const EarthVector&) const {return fAltitude;} |
---|
43 | |
---|
44 | // Configure data members |
---|
45 | virtual void Configure(); |
---|
46 | |
---|
47 | // change incom_dir to the outgoing direction of scattering, sampling Outgoing phase function |
---|
48 | virtual void RandomDir(const EarthVector& pos, EarthVector& incom_dir) const; |
---|
49 | |
---|
50 | // get ready for next event |
---|
51 | void Reset() {} |
---|
52 | |
---|
53 | EsafConfigClass(RadiativeTransfer,TestGround) |
---|
54 | |
---|
55 | private: |
---|
56 | |
---|
57 | string fType; // lambertian or isotropic |
---|
58 | Double_t fSpec; // gaussian specular compoent (1 means only specular) |
---|
59 | Double_t fSigma; // gaussian width for specular component |
---|
60 | Double_t fWindSpeed; // determine sigma (if fSigma = -1 is configured) |
---|
61 | Double_t fAltitude; // from sea level |
---|
62 | Double_t fAlbedo; // between 0..1 |
---|
63 | TF2* Specular_distrib; // compute specular 2D-phase function values using theta-phi values |
---|
64 | Double_t NORM[91]; // specular component normalization table (faster than compute it each time) |
---|
65 | Double_t NORMmax; // maximum value in NORM table |
---|
66 | |
---|
67 | ClassDef(TestGround,0) |
---|
68 | }; |
---|
69 | |
---|
70 | #endif /* __TESTGROUND_HH__ */ |
---|