1 | #ifndef LightPtSrcLevSInBand_H
|
---|
2 | #define LightPtSrcLevSInBand_H
|
---|
3 |
|
---|
4 | #include <iostream>
|
---|
5 | #include <map>
|
---|
6 | #include <ostream>
|
---|
7 | //#include "levsptsrc.h"
|
---|
8 |
|
---|
9 |
|
---|
10 | enum LevSPanckBand
|
---|
11 | { Giga30,
|
---|
12 | Giga44,
|
---|
13 | Giga70,
|
---|
14 | Giga100,
|
---|
15 | Giga143,
|
---|
16 | Giga217,
|
---|
17 | Giga352,
|
---|
18 | Giga545,
|
---|
19 | Giga857
|
---|
20 | };
|
---|
21 |
|
---|
22 | struct LevSPtSrcData
|
---|
23 | { float flux30G;
|
---|
24 | float flux44G;
|
---|
25 | float flux70G;
|
---|
26 | float flux100G;
|
---|
27 | float flux143G;
|
---|
28 | float flux217G;
|
---|
29 | float flux352G;
|
---|
30 | float flux545G;
|
---|
31 | float flux857G;
|
---|
32 |
|
---|
33 | float getPower(LevSPanckBand band) const
|
---|
34 | { // Unit depend of context be carefull!
|
---|
35 | switch (band)
|
---|
36 | { case Giga30: return flux30G;
|
---|
37 | case Giga44: return flux44G;
|
---|
38 | case Giga70: return flux70G;
|
---|
39 | case Giga100: return flux100G;
|
---|
40 | case Giga143: return flux143G;
|
---|
41 | case Giga217: return flux217G;
|
---|
42 | case Giga352: return flux352G;
|
---|
43 | case Giga545: return flux545G;
|
---|
44 | case Giga857: return flux857G;
|
---|
45 | default:
|
---|
46 | { cerr<<"Erreur lecture de puissance dans LevSPtSrc::getPower. Exit(-1)"<<endl;
|
---|
47 | exit(-1);
|
---|
48 | return 0;
|
---|
49 | }
|
---|
50 | }
|
---|
51 | }
|
---|
52 |
|
---|
53 | };
|
---|
54 |
|
---|
55 | struct LevSPtSrcCmpUnitVec
|
---|
56 | { bool operator () (const UnitVector& coord1, const UnitVector& coord2) const
|
---|
57 | { if ( coord1.Theta() < coord2.Theta() ) return true;
|
---|
58 | if ( coord1.Theta() == coord2.Theta() )
|
---|
59 | { if ( coord1.Phi() > coord2.Phi()) return true;
|
---|
60 | }
|
---|
61 | return false;
|
---|
62 | }
|
---|
63 | };
|
---|
64 |
|
---|
65 | class LightPtSrcLevSInBand
|
---|
66 | {
|
---|
67 | public:
|
---|
68 | LightPtSrcLevSInBand(char FileOfPtSrc[]);
|
---|
69 | ~LightPtSrcLevSInBand() {}
|
---|
70 | // double powSpec(double theta,double phi,LevSPanckBand Band);
|
---|
71 | // Return power in band in Watt/m2
|
---|
72 | multimap <UnitVector,LevSPtSrcData,LevSPtSrcCmpUnitVec> MapOfPtSrc;
|
---|
73 | void print(ostream& out)
|
---|
74 | { out<< Name<<endl; }
|
---|
75 | protected:
|
---|
76 | void readLevSPtSrc(char HFIfile[]);
|
---|
77 | char Name[128];
|
---|
78 |
|
---|
79 | };
|
---|
80 |
|
---|
81 | #endif
|
---|
82 |
|
---|