4 #include <boost/lexical_cast.hpp>
6 #include <fdet/Corrector.h>
8 #include <utl/TabulatedFunction.h>
9 #include <utl/ErrorLogger.h>
12 #include <fdet/FDetector.h>
14 #include <fdet/Telescope.h>
15 #include <det/VManager.h>
16 #include <det/Detector.h>
26 Corrector::Corrector(
const unsigned int eyeId,
const unsigned int telId,
27 const std::string& physEyeIdString,
28 const std::string& physTelIdString) :
31 fPhysicalEyeIdString(physEyeIdString),
32 fPhysicalTelescopeIdString(physTelIdString),
137 const double b1 = 1.039612120E+00;
138 const double c1 = 6.000698670E-03;
139 const double b2 = 2.317923440E-01;
140 const double c2 = 2.001791440E-02;
141 const double b3 = 1.010469450E+00;
142 const double c3 = 1.035606530E+02;
149 iWl != transEnd; ++iWl) {
152 const double l2 =
Sqr(lambda)*1.e-6;
153 const double n =
sqrt(b1*l2/(l2-c1) + b2*l2/(l2-c2) + b3*l2/(l2-c3) + 1);
168 const string& property,
169 const string& component,
170 const string& errorMsg)
173 if (!requestedData) {
175 requestedData =
new T;
177 const VManager& manager = Detector::GetInstance().GetFManagerRegister();
184 manager.
GetData(*requestedData, property, component, indexMap);
186 if (status == VManager::eNotFound) {
189 err <<
"Did not find requested component for " << errorMsg <<
"; "
190 << VManager::QueryInfoMessage(property, component, indexMap);
196 return *requestedData;
constexpr T Sqr(const T &x)
std::string fPhysicalEyeIdString
const T & GetCorrectorData(T *&requestedData, const std::string &property, const std::string &component, const std::string &errorMsg) const
double GetInnerRadius() const
Inner radius of the ring.
Class to hold collection (x,y) points and provide interpolation between them.
const utl::TabulatedFunction & GetTransmittance() const
Transmittance as a function of the wavelength.
Base class for exceptions trying to access non-existing components.
Interface for detector managers.
void PushBack(const double x, const double y)
double GetSigmaNormal() const
Variable to model the lens surface imperfection.
constexpr double nanometer
virtual Status GetData(double &returnData, const std::string &componentProperty, const std::string &componentName, const IndexMap &componentIndex) const =0
double GetOuterRadius() const
Outer radius of the ring.
std::string fPhysicalTelescopeIdString
fTelescopeId(t.GetTelescopeId())
const utl::TabulatedFunction & GetRefractiveIndex() const
Index of refraction as a funcction of the wavelength.
utl::TabulatedFunction * fTransmittance
std::map< std::string, std::string > IndexMap
utl::TabulatedFunction * fRefractiveIndex
double GetMeanLensThickness() const
Mean thickness of the lens.
#define ERROR(message)
Macro for logging error messages.
Status
Specifies success or (eventually) various possible failure modes.