icemc
screen.hh
Go to the documentation of this file.
1 #ifndef SCREEN_H_
2 #define SCREEN_H_
3 
4 #include <iostream>
5 #include <iomanip>
6 #include <fstream>
7 #include <string>
8 #include <stdexcept>
9 #include <stdio.h>
10 #include <stddef.h>
11 #include <math.h>
12 #include <vector>
13 
14 #include "vector.hh"
15 #include "position.hh"
16 
17 
18 class Vector;
19 class Position;
20 
21 
22 class Screen {
23 private:
24  double fedgeLength;
27 
31 
32  int fNsamples;
34 
35  std::vector<double> fVmmhz_freq;
36  std::vector<double> fVmmhz0;
37  std::vector<double> fViewangle;
38  std::vector<double> fDelays;
39  std::vector<Vector> fVec2blns;
40  std::vector<Vector> fPols;
41  std::vector<Position> fImpactPt;
42  std::vector<double> fWeight;
43  std::vector<double> fIncAngles;
44  std::vector<double> fTransAngles;
45  double fWeightNorm;
46  std::vector<double> fFacetLength;
47  std::vector<double> fTcoeff_parl_polparl;
48  std::vector<double> fTcoeff_perp_polparl;
49  std::vector<double> fTcoeff_parl_polperp;
50  std::vector<double> fTcoeff_perp_polperp;
51 
52 public:
54 
57  Screen(int a);
58 
60 
63  void SetNsamples(int i);
64 
66 
69  int GetNsamples();
70 
72 
75  void SetEdgeLength(double a);
76 
78 
81  void SetCentralPoint(Position a);
82 
84 
87  void SetCosineProjectionFactor(double a);
88 
90 
94 
96 
99  void SetNormal(Vector a);
100 
102 
105  void SetUnitX(Vector a);
106 
108 
111  void SetUnitY(Vector a);
112 
114 
117  double GetEdgeLength();
118 
120 
124 
126 
129  Vector GetNormal();
130 
132 
135  Vector GetUnitX();
136 
138 
141  Vector GetUnitY();
142 
144 
148  double CalcXindex(int i);
149 
151 
155  double CalcYindex(int i);
156 
158 
162  Position GetPosition(int i, int j);
163 
165 
168  void AddVmmhz_freq(double A);
169 
171 
175  double GetVmmhz_freq(int i);
176 
178 
181  void AddVmmhz0(double A);
182 
184 
188  double GetVmmhz0(int i);
189 
191 
194  void AddViewangle(double A);
195 
197 
201  double GetViewangle(int i);
202 
204 
207  void AddDelay(double A);
208 
210 
214  double GetDelay(int i);
215 
217 
220  void SetNvalidPoints(int i);
221 
223 
226  double GetNvalidPoints();
227 
229 
232  void AddVec2bln(Vector v);
233 
235 
239  Vector GetVec2bln(int i);
240 
242 
245  void AddPol(Vector v);
246 
248 
252  Vector GetPol(int i);
253 
255 
258  void AddImpactPt(Position p);
259 
261 
265  Position GetImpactPt(int i);
266 
268 
271  void AddWeight(double a);
272 
274 
278  double GetWeight(int i);
279 
281 
284  void SetWeightNorm(double a);
285 
287 
290  double GetWeightNorm();
291 
293 
296  void AddIncidenceAngle(double A);
297 
299 
303  double GetIncidenceAngle(int i);
304 
306 
309  void AddTransmissionAngle(double A);
310 
312 
316  double GetTransmissionAngle(int i);
317 
319 
322  void AddFacetLength(double A);
323 
325 
329  double GetFacetLength(int i);
330 
332 
335  void AddTparallel_polParallel(double A);
336 
338 
342  double GetTparallel_polParallel(int i);
343 
345 
348  void AddTperpendicular_polParallel(double A);
349 
351 
355  double GetTperpendicular_polParallel(int i);
356 
358 
361  void AddTparallel_polPerpendicular(double A);
362 
364 
368  double GetTparallel_polPerpendicular(int i);
369 
371 
374  void AddTperpendicular_polPerpendicular(double A);
375 
377 
382 
384  void ResetParameters();
385 
386 };
387 #endif
double GetTparallel_polPerpendicular(int i)
Get the parallel transmission coefficient value stored at the specified index.
Definition: screen.cc:253
double CalcXindex(int i)
Calculates the X index of the screen corresponding to the specified counter value.
Definition: screen.cc:88
void SetNvalidPoints(int i)
Sets the total number of points on the screen.
Definition: screen.cc:153
std::vector< double > fVmmhz0
container for vmmhz[0]
Definition: screen.hh:36
std::vector< double > fTransAngles
container for transmission angle
Definition: screen.hh:44
double GetTperpendicular_polParallel(int i)
Get the perpendicular transmission coefficient value stored at the specified index.
Definition: screen.cc:245
void AddVmmhz_freq(double A)
Appends a Vmmhz value to the fVmmhz_freq array.
Definition: screen.cc:115
Position GetCentralPoint()
Gets the position of the screen&#39;s central point.
Definition: screen.cc:68
double GetDelay(int i)
Get the delay value stores at the specified index.
Definition: screen.cc:148
double GetWeight(int i)
Gets the weight value at the specified index.
Definition: screen.cc:197
double GetCosineProjectionFactor()
Gets the projection factor.
Definition: screen.cc:47
Vector GetPol(int i)
Gets the polarization vector at the specified index.
Definition: screen.cc:178
void AddTperpendicular_polParallel(double A)
Appends a perpendicular transmission coefficient value to the fTcoeff_perp array. ...
Definition: screen.cc:241
double GetIncidenceAngle(int i)
Get the incidence angle value stored at the specified index.
Definition: screen.cc:213
Vector funit_y
Y unit vector in screen (~ perp. to ground surface, perp. to screen normal)
Definition: screen.hh:30
void AddIncidenceAngle(double A)
Appends an incidence angle value to the fIncAngles array.
Definition: screen.cc:209
Vector fnormal
screen orientation, &#39;+&#39; = pointing back to balloon
Definition: screen.hh:28
std::vector< double > fTcoeff_parl_polperp
transmission coefficients of parallel components for perpendicular polarization
Definition: screen.hh:49
Definition: screen.hh:22
This class represents a three-vector. Operators are overloaded to provide for the familiar operations...
Definition: vector.hh:27
Position GetImpactPt(int i)
Gets the position at the specified index.
Definition: screen.cc:188
std::vector< double > fDelays
container for the relative propagation phase delays for each frequency and screen point; final size w...
Definition: screen.hh:38
Vector funit_x
X unit vector in screen (parallel to ground surface, perp. to screen normal)
Definition: screen.hh:29
void AddTransmissionAngle(double A)
Appends a transmission angle value to the fTransAngles array.
Definition: screen.cc:217
void SetUnitX(Vector a)
Sets an orientation vector of the screen.
Definition: screen.cc:55
std::vector< double > fTcoeff_perp_polparl
transmission coefficients of perpendicular components for parallel polarization
Definition: screen.hh:48
void SetNormal(Vector a)
Sets the screen normal.
Definition: screen.cc:51
double GetWeightNorm()
Gets the weight normalization factor.
Definition: screen.cc:205
double GetVmmhz_freq(int i)
Get the Vmmhz value stored at the specified index.
Definition: screen.cc:121
Vector GetVec2bln(int i)
Gets the to-balloon vector at the specified index.
Definition: screen.cc:168
void AddTparallel_polParallel(double A)
Appends a parallel transmission coefficient value to the fTcoeff_parl array.
Definition: screen.cc:233
Vector GetUnitX()
Gets an orientation vector.
Definition: screen.cc:78
std::vector< double > fIncAngles
container for incidence angles
Definition: screen.hh:43
Vector GetUnitY()
Gets another orientation vector.
Definition: screen.cc:83
void AddImpactPt(Position p)
Appends a vector to the fImpactPt array.
Definition: screen.cc:183
void AddViewangle(double A)
Appends a viewangle value to the fViewangle array.
Definition: screen.cc:134
void AddTparallel_polPerpendicular(double A)
Appends a parallel transmission coefficient value to the fTcoeff_parl array.
Definition: screen.cc:249
double GetTparallel_polParallel(int i)
Get the parallel transmission coefficient value stored at the specified index.
Definition: screen.cc:237
int fNsamples
number of samples in X-direction (and Y-, assuming symmetry)
Definition: screen.hh:32
This class is a 3-vector that represents a position on the Earth&#39;s surface.
Definition: position.hh:26
double GetVmmhz0(int i)
Gets the Vmmhz0 value stored at the specified index.
Definition: screen.cc:130
double GetTransmissionAngle(int i)
Get the transmission angle value stored at the specified index.
Definition: screen.cc:221
double fcosineProjectionFactor
cosine projection factor of the screen onto the ground, corrects for the long extension so sampling i...
Definition: screen.hh:26
std::vector< double > fFacetLength
edge length [m] of individual contributing facet
Definition: screen.hh:46
double GetNvalidPoints()
Gets the total number of points.
Definition: screen.cc:158
std::vector< double > fVmmhz_freq
container for the valid screen points giving the frequency dependence magnitude for each point; every...
Definition: screen.hh:35
int fNvalidpoints
total number of points on the screen
Definition: screen.hh:33
Screen(int a)
Creates an instance of a screen.
Definition: screen.cc:8
void SetNsamples(int i)
Sets number of grid divisions for the base screen.
Definition: screen.cc:23
Position GetPosition(int i, int j)
Calculates the physical position of the screen corresponding to the specified counter value...
Definition: screen.cc:98
void AddWeight(double a)
Appends a weight value to the fWeight array.
Definition: screen.cc:193
std::vector< double > fTcoeff_perp_polperp
transmission coefficients of perpendicular components for perpendicular polarization ...
Definition: screen.hh:50
double GetFacetLength(int i)
Get the facet edge length value stored at the specified index.
Definition: screen.cc:229
std::vector< Position > fImpactPt
container of ground impact points
Definition: screen.hh:41
double GetViewangle(int i)
Get the viewangle value stored at the specified index.
Definition: screen.cc:138
void SetEdgeLength(double a)
Sets the physical length of a side of the screen.
Definition: screen.cc:33
std::vector< Vector > fPols
container of transmitted polarizations
Definition: screen.hh:40
std::vector< Vector > fVec2blns
container of &#39;vector to balloon&#39;
Definition: screen.hh:39
void AddPol(Vector v)
Appends a vector to the fPols array.
Definition: screen.cc:173
void SetCentralPoint(Position a)
Sets the position of the central point of the screen.
Definition: screen.cc:38
void AddFacetLength(double A)
Appends a facet edge length value to the fFacetLength array.
Definition: screen.cc:225
Vector GetNormal()
Gets the screen normal.
Definition: screen.cc:73
void AddVec2bln(Vector v)
Appends a vector to the fVec2blns array.
Definition: screen.cc:163
Position fcentralPoint
coordinates of screen center
Definition: screen.hh:25
void AddDelay(double A)
Appends a delay value to the fDelays array.
Definition: screen.cc:143
double CalcYindex(int i)
Calculates the Y index of the screen corresponding to the specified counter value.
Definition: screen.cc:93
double GetEdgeLength()
Gets the screen length.
Definition: screen.cc:63
std::vector< double > fWeight
container for weight of a screen point ( == area of screen element), normalized when used ...
Definition: screen.hh:42
double GetTperpendicular_polPerpendicular(int i)
Get the perpendicular transmission coefficient value stored at the specified index.
Definition: screen.cc:261
void AddVmmhz0(double A)
Appends a Vmmhz value (for the lowest Anita frequency) to the fVmmhz0 array.
Definition: screen.cc:126
void AddTperpendicular_polPerpendicular(double A)
Appends a perpendicular transmission coefficient value to the fTcoeff_perp array. ...
Definition: screen.cc:257
std::vector< double > fViewangle
Definition: screen.hh:37
std::vector< double > fTcoeff_parl_polparl
transmission coefficients of parallel components for parallel polarization
Definition: screen.hh:47
void SetUnitY(Vector a)
Sets another orientation vector of the screen.
Definition: screen.cc:59
void SetCosineProjectionFactor(double a)
Sets the projection factor of the screen relative to the specular RF exit point.
Definition: screen.cc:42
double fWeightNorm
normalization of the weights == simple weight sum
Definition: screen.hh:45
void SetWeightNorm(double a)
Sets the normalization factor for the weights (so they sum to 1)
Definition: screen.cc:201
int GetNsamples()
Gets number of grid divisions for the base screen.
Definition: screen.cc:28
double fedgeLength
the full length of one side
Definition: screen.hh:24
void ResetParameters()
Resets the following screen parameters (fNvalidpoints,fVmmhz_freq,fVmmhz0,fViewangle,fDelays,fVec2blns,fPols,fImpactPt,fWeight,fWeightNorm)
Definition: screen.cc:265