RayleighModelOff.cc
Go to the documentation of this file.
1 
10 #include <iostream>
11 #include <string>
12 #include <sstream>
13 #include <vector>
14 
15 #include <det/Detector.h>
16 
17 #include <atm/RayleighModelOff.h>
18 #include <atm/ScatteringResult.h>
19 #include <atm/AttenuationResult.h>
20 #include <atm/ProfileResult.h>
21 #include <utl/TabulatedFunctionErrors.h>
22 
23 #include <fwk/CentralConfig.h>
24 #include <fwk/CoordinateSystemRegistry.h>
25 
26 #include <utl/Point.h>
27 #include <utl/AugerUnits.h>
28 #include <utl/Reader.h>
29 #include <utl/ErrorLogger.h>
30 #include <utl/MathConstants.h>
31 #include <utl/ReferenceEllipsoid.h>
32 
33 using namespace det;
34 using namespace atm;
35 using namespace utl;
36 using namespace std;
37 using namespace fwk;
38 
39 
41 RayleighModelOff::EvaluateRayleighScattering(const utl::Point& /*x1*/,
42  const utl::Point& /*x2*/,
43  const double angle,
44  const double /*distance*/,
45  const vector<double>& wLength)
46  const
47 {
49 
50  for (std::vector<double>::const_iterator it = wLength.begin();
51  it != wLength.end(); ++it)
52  frac.PushBack(*it, 0, 0, 0);
53 
54  return ScatteringResult(frac, angle);
55 }
56 
57 
59 RayleighModelOff::EvaluateRayleighScattering(const utl::Point& x1,
60  const utl::Point& x2,
61  const double angle,
62  const double distance,
63  const AttenuationResult& raylAtt)
64  const
65 {
66  // This method just delegates because the scattering disregards the
67  // attenuation for "Off".
68  const TabulatedFunctionErrors& attenuation = raylAtt.GetTransmissionFactor();
69  vector<double> wLength(attenuation.GetNPoints());
70  std::copy(attenuation.XBegin(), attenuation.XEnd(), wLength.begin());
71  return EvaluateRayleighScattering(x1, x2, angle, distance, wLength);
72 }
73 
74 
76 RayleighModelOff::EvaluateRayleighAttenuation(const utl::Point& /*xInit*/,
77  const utl::Point& /*xFinal*/,
78  const vector<double>& wLength)
79  const
80 {
81  utl::TabulatedFunctionErrors attenuation;
82 
83  for (std::vector<double>::const_iterator it = wLength.begin() ;
84  it != wLength.end() ; ++it)
85  attenuation.PushBack(*it, 0, 1, 0);
86 
87  return attenuation;
88 }
89 
90 
92 RayleighModelOff::GetAttenuationLength(const utl::Point& /*p*/,
93  const std::vector<double>& /*wLength*/)
94  const
95 {
97  tab.PushBack(0, 0, 0, 0);
98  return tab;
99 }
100 
101 
102 // Configure (x)emacs for this file ...
103 // Local Variables:
104 // mode: c++
105 // compile-command: "make -C .. -k"
106 // End:
unsigned int GetNPoints() const
Point object.
Definition: Point.h:32
const utl::TabulatedFunctionErrors & GetTransmissionFactor() const
Transmission factor.
ArrayIterator XEnd()
end of array of X
Class holding the output of the ScatteringResult function.
const int tab
Definition: SdInspector.cc:35
void PushBack(const double x, const double xErr, const double y, const double yErr)
ArrayIterator XBegin()
begin of array of X
Class describing the Atmospheric attenuation.

, generated on Tue Sep 26 2023.