1 #include <boost/lexical_cast.hpp>
4 #include <utl/Vector.h>
5 #include <utl/ErrorLogger.h>
6 #include <utl/AugerUnits.h>
7 #include <utl/Reader.h>
8 #include <utl/TimeStamp.h>
9 #include <utl/TimeInterval.h>
10 #include <utl/UTCDateTime.h>
11 #include <utl/TabulatedFunction.h>
12 #include <utl/MathConstants.h>
14 #include <utl/AugerException.h>
15 #include <utl/AugerUnits.h>
16 #include <utl/Md5Sum.h>
17 #include <utl/UTMPoint.h>
18 #include <utl/ReferenceEllipsoid.h>
20 #include <det/VManager.h>
21 #include <det/Detector.h>
23 #include <fevt/Pixel.h>
25 #include <fdet/FDetector.h>
26 #include <fdet/Channel.h>
27 #include <fdet/Pixel.h>
29 #include <fdet/Diaphragm.h>
30 #include <fdet/Mirror.h>
31 #include <fdet/Filter.h>
32 #include <fdet/Corrector.h>
33 #include <fdet/Camera.h>
34 #include <fdet/Telescope.h>
36 #include <fwk/CoordinateSystemRegistry.h>
37 #include <fwk/LocalCoordinateSystem.h>
49 Telescope::Telescope(
const unsigned int eyeId,
const unsigned int telescopeId) :
60 for (InternalChannelCollection::const_iterator cIt =
fChannel.begin();
64 for (InternalPixelCollection::const_iterator pIt =
fPixel.begin();
65 pIt !=
fPixel.end(); ++pIt)
113 ostringstream configSS;
115 configSS <<
"Module : " << module <<
"\n";
116 const double refWl = Detector::GetInstance().GetFDetector().GetReferenceLambda();
117 configSS <<
"RefWavelength: " << refWl/
nanometer <<
"nm\n";
119 configSS <<
"Filter : T=";
122 for (
unsigned int iF = 0; iF < filtTrans.
GetNPoints(); ++iF)
123 if (filtTrans[iF].Y() != 0) {
124 configSS << (!first ?
", " :
"") << filtTrans[iF].X()/
nanometer <<
"nm:" << filtTrans[iF].
Y();
130 configSS <<
"Corrector : " << (hasCorrector ?
"yes" :
"no");
139 for (
unsigned int iR = 0; iR<lensRI.
GetNPoints(); ++iR) {
140 if (lensRI[iR].Y() != 0) {
141 configSS << (!first ?
", " :
"") << lensRI[iR].X()/
nanometer <<
"nm:" << lensRI[iR].
Y();
145 configSS <<
",\n T=";
148 for (
unsigned int iT = 0; iT<lensT.
GetNPoints(); ++iT) {
149 if (lensT[iT].Y() != 0) {
150 configSS << (!first ?
", " :
"") << lensT[iT].X()/
nanometer <<
"nm:" << lensT[iT].
Y();
161 for (
unsigned int iM = 0; iM<mirRef.
GetNPoints(); ++iM)
162 if (mirRef[iM].Y() != 0) {
163 configSS << (!first ?
", " :
"") << mirRef[iM].X()/
nanometer <<
"nm:" << mirRef[iM].
Y();
180 configSS <<
" Qeff=";
182 for (
unsigned int iF = 0; iF < qEff.
GetNPoints(); ++iF) {
183 if (qEff[iF].Y() != 0) {
184 configSS << (!first ?
", " :
"") << qEff[iF].X()/
nanometer <<
"nm:" << qEff[iF].
Y();
197 InternalChannelCollection::const_iterator cIt =
fChannel.find(channelId);
206 err <<
"Channel Id=" << channelId <<
" is out of range; "
234 return GetChannel(GetPixel(p.
GetId()).GetChannelId());
239 Telescope::GetPosition()
243 const fdet::FDetector& theFDet = Detector::GetInstance().GetFDetector();
247 GetTelescopeData(bay_angle,
"bay_angle",
"telescope",
"telescope bay angle");
249 GetTelescopeData(bay_distance,
"bay_distance",
"telescope",
"telescope bay distance");
250 fPosition =
new Point(bay_distance*cos(bay_angle), bay_distance*sin(bay_angle), 0, realEyeCoordinateSystem);
257 Telescope::GetTelescopeCoordinateSystem()
260 if (!fCoordinateSystem) {
263 const double axisphi = GetAxis().GetPhi(telCS);
266 CoordinateSystem::RotationZ(axisphi, telCS);
268 const double theta = GetAxis().GetTheta(auxCS);
271 fCoordinateSystem = CoordinateSystem::RotationY(theta, auxCS);
273 return fCoordinateSystem;
278 Telescope::HasCorrectorRing()
281 return GetDiaphragm().HasCorrectorRing();
286 Telescope::GetDiaphragmRadius()
289 return GetDiaphragm().GetRadius();
294 Telescope::GetDiaphragmArea()
297 return GetDiaphragm().GetArea();
302 Telescope::GetCommissionTime()
305 if (!fCommissionTime) {
307 GetTelescopeData(timeString,
"commission",
"telescope",
"telescope commission time");
308 fCommissionTime =
new TimeStamp(boost::lexical_cast<UTCDateTime>(timeString).GetTimeStamp());
311 return *fCommissionTime;
316 Telescope::GetDecommissionTime()
319 if (!fDecommissionTime) {
321 GetTelescopeData(timeString,
"decommission",
"telescope",
"telescope decommission time");
322 fDecommissionTime =
new TimeStamp(boost::lexical_cast<UTCDateTime>(timeString).GetTimeStamp());
325 return *fDecommissionTime;
330 Telescope::GetPixel(
const unsigned int pixelId)
333 if (pixelId < GetFirstPixelId() || pixelId > GetLastPixelId()) {
335 err <<
"Pixel Id=" << pixelId <<
" is out of range; "
336 <<
"min=" << GetFirstPixelId() <<
" max=" << GetLastPixelId();
341 const InternalPixelCollection::const_iterator pIt = fPixel.find(pixelId);
343 if (pIt != fPixel.end())
347 GetParentPhysicalEyeIdString(),
348 GetParentPhysicalIdString());
349 fPixel[pixelId] = pix;
356 Telescope::GetPixel(
const unsigned int row,
const unsigned int col)
359 const unsigned int pixelId = GetLastRow()*(col-1) + row;
360 return GetPixel(pixelId);
365 Telescope::GetDiaphragm()
370 GetParentPhysicalEyeIdString(),
371 GetParentPhysicalIdString());
377 Telescope::GetMirror()
382 GetParentPhysicalEyeIdString(),
383 GetParentPhysicalIdString());
389 Telescope::GetFilter()
394 GetParentPhysicalEyeIdString(),
395 GetParentPhysicalIdString());
401 Telescope::GetCorrector()
406 GetParentPhysicalEyeIdString(),
407 GetParentPhysicalIdString());
413 Telescope::GetCamera()
418 GetParentPhysicalEyeIdString(),
419 GetParentPhysicalIdString());
425 Telescope::CacheTelescopePointing()
429 GetTelescopeData(fTelPointingId,
"pointing",
"telescope",
"telescope optical axis default pointing id");
431 if (!fTelPointingPhiMap) {
432 GetTelescopeData(fTelPointingPhiMap,
"opticalAxisPhi",
"telescope",
"telescope optical axis phi");
434 if (!fTelPointingElevationMap)
435 GetTelescopeData(fTelPointingElevationMap,
"opticalAxisElevation",
"telescope",
"telescope optical axis elevation");
441 const fdet::FDetector& theFDet = Detector::GetInstance().GetFDetector();
447 for (PointingAngleSet::iterator phiIt = fTelPointingPhiMap->begin(),
448 end = fTelPointingPhiMap->end(); phiIt != end; ++phiIt) {
449 const PointingAngleSet::iterator elevationIt = fTelPointingElevationMap->find(phiIt->first);
450 if (elevationIt == fTelPointingElevationMap->end())
451 cout <<
"This should never happen! Found azimuth without corresponding elevation" << endl;
453 const double azimuth = phiIt->second;
454 const double elevation = elevationIt->second;
457 realEyeCoordinateSystem, Vector::kSpherical);
458 const double newAzimuth = axis.
GetPhi(eyeCoordinateSystem);
459 const double newElevation =
kPi/2 - axis.
GetTheta(eyeCoordinateSystem);
461 phiIt->second = newAzimuth;
462 elevationIt->second = newElevation;
470 Telescope::GetTelescopePointingId()
474 CacheTelescopePointing();
475 return *fTelPointingId;
480 Telescope::GetTelescopePointingPhi()
483 if (!fTelPointingPhiMap)
484 CacheTelescopePointing();
485 return *fTelPointingPhiMap;
490 Telescope::GetTelescopePointingElevation()
493 if (!fTelPointingElevationMap)
494 CacheTelescopePointing();
495 return *fTelPointingElevationMap;
503 if (!fTelPointingId) {
505 CacheTelescopePointing();
507 if (fTelPointingElevationMap->find(*fTelPointingId) == fTelPointingElevationMap->end() ||
508 fTelPointingPhiMap->find(*fTelPointingId) == fTelPointingPhiMap->end()) {
511 err <<
"Failure reading Fd telescope pointing (eye: " << fEyeId <<
", tel: " <<
fTelescopeId <<
") from telescope list XML: "
512 "the pointing that corresponds to the Id: \'" << *fTelPointingId <<
"\' does not exist. The config knows about: \n";
513 for (PointingAngleSet::const_iterator iPointing = fTelPointingElevationMap->begin();
514 iPointing != fTelPointingElevationMap->end(); ++iPointing)
515 err <<
" pointing id: \'" << iPointing->first <<
"\' at elevation: " << iPointing->second <<
"\n";
522 const double azimuth = fTelPointingPhiMap->find(*fTelPointingId)->second;
523 const double elevation = fTelPointingElevationMap->find(*fTelPointingId)->second;
525 const fdet::Eye& eye = Detector::GetInstance().GetFDetector().GetEye(fEyeId);
527 fAxis =
new Vector(1,
kPi/2 - elevation, azimuth,
528 eyeCoordinateSystem, Vector::kSpherical);
536 Telescope::GenerateOutOfBorderPixels()
540 const int rowInc = GetLastRow() - GetFirstRow() + 2;
541 for (
unsigned int row = GetFirstRow() - 1; row <= GetLastRow() + 1; row += rowInc) {
543 for (
unsigned int col = GetFirstColumn()-1; col <= GetLastColumn()+1; ++col) {
544 const utl::Vector dir = GetCameraPixelDirection(row, col);
545 fOutBorderPixelsDir.push_back(dir);
550 const int colInc = GetLastColumn() - GetFirstColumn() + 2;
551 for (
unsigned int col = GetFirstColumn() - 1; col <= GetLastColumn() + 1;
553 for (
unsigned int row = GetFirstRow(); row <= GetLastRow(); ++row) {
554 const utl::Vector dir = GetCameraPixelDirection(row, col);
555 fOutBorderPixelsDir.push_back(dir);
562 Telescope::OutOfBorderPixelsBegin()
565 if (!fOutBorderPixelsDir.size())
566 GenerateOutOfBorderPixels();
567 return fOutBorderPixelsDir.begin();
572 Telescope::OutOfBorderPixelsEnd()
575 if (!fOutBorderPixelsDir.size())
576 GenerateOutOfBorderPixels();
577 return fOutBorderPixelsDir.end();
585 Telescope::GetModelWavelengthDependence(const
double wavelength)
592 const double mercEff = GetCamera().GetMercedesEfficiency();
593 const double meanRefl = GetCamera().GetMercedesReflections();
594 const double meanMercEff =
pow(mercEff, meanRefl);
598 double eff = mirrorRefl.
Y(wavelength) * filterTrans.
Y(wavelength) *
602 if (HasCorrectorRing()) {
605 const double meanLensThickness = GetCorrector().GetMeanLensThickness();
609 if (lensTrans.
Y(wavelength) == 0)
612 const double internal_absorption
613 = exp(meanLensThickness/(10.*
mm)*log(lensTrans.
Y(wavelength)));
617 const double n = lensRI.
Y(wavelength);
618 const double T_air_glass = 1 -
Sqr((n-1)/(n+1));
622 const double fracArea = 1 -
Sqr(0.85/1.1);
625 const double lensTransmission = 1 + fracArea * (internal_absorption *
Sqr(T_air_glass) - 1);
629 eff *= lensTransmission;
636 Telescope::GetModelRelativeEfficiency(
const double wavelength)
639 const double refWl = Detector::GetInstance().GetFDetector().GetReferenceLambda();
640 return GetModelWavelengthDependence(wavelength) / GetModelWavelengthDependence(refWl);
645 Telescope::GetModelMeanEfficiency(
const string& configSignature,
const double wavelength)
649 double meanPixelEff = 0;
651 for (
unsigned int i = GetFirstPixelId(); i <= GetLastPixelId(); ++i) {
653 const Pixel& pixel = GetPixel(i);
657 meanPixelEff *= GetModelRelativeEfficiency(wavelength);
659 meanPixelEff /= nPix;
665 Telescope::GetMeasuredRelativeEfficiency(
const double wavelength)
669 return eff.
Y(wavelength);
674 Telescope::GetMeasuredRelativeEfficiency()
677 if (!fMeasuredRelativeEfficiency) {
679 GetTelescopeData(measuredEff,
"relativeResponse",
"telescope",
"telescope relative response");
680 const double refWl = Detector::GetInstance().GetFDetector().GetReferenceLambda();
682 for (
unsigned int i = 0; i < measuredEff.
GetNPoints(); ++i) {
683 fMeasuredRelativeEfficiency->
PushBack(measuredEff.
GetX(i), measuredEff.
GetY(i)/measuredEff.
Y(refWl));
686 return *fMeasuredRelativeEfficiency;
692 Telescope::GetFirstRow()
695 return GetCamera().GetFirstRow();
700 Telescope::GetFirstColumn()
703 return GetCamera().GetFirstColumn();
708 Telescope::GetLastRow()
711 return GetCamera().GetLastRow();
716 Telescope::GetLastColumn()
719 return GetCamera().GetLastColumn();
724 Telescope::GetLastPixelId()
727 const Camera& cam = GetCamera();
733 Telescope::GetUpTimeFraction()
737 return fUpTimeFraction;
742 Telescope::IsInAquisition()
746 return fUpTimeFraction > 0;
751 Telescope::GetDAQStatus()
760 Telescope::UpdateFdUpTime()
763 if (fUpTimeValidityStamp.IsValid())
767 GetTelescopeData(startTime,
"uptime_gpsStart",
"telescope",
"start validity telescope up time");
769 GetTelescopeData(endTime,
"uptime_gpsStop",
"telescope",
"end validity telescope up time");
770 GetTelescopeData(fUpTimeFraction,
"uptime_fraction",
"telescope",
"telescope up time fraction");
771 GetTelescopeData(fStatus,
"status",
"telescope",
"telescope DAQ status");
772 fUpTimeValidityStamp.SetValidityInterval(startTime, endTime);
781 if (fIdOfParentPhysicalEye < 0) {
782 fIdOfParentPhysicalEye = 0;
783 fIdOfParentPhysicalTelescope = 0;
784 GetTelescopeData(fIdOfParentPhysicalEye,
"fromEye",
"virtualTelescope",
785 "parent eye id of virtual telescope");
786 GetTelescopeData(fIdOfParentPhysicalTelescope,
"fromTelescope",
"virtualTelescope",
787 "parent telescope id of virtual telescope");
789 fIdOfParentPhysicalEyeString
790 = boost::lexical_cast<
string>(fIdOfParentPhysicalEye);
791 fIdOfParentPhysicalTelescopeString
792 = boost::lexical_cast<
string>(fIdOfParentPhysicalTelescope);
795 delete fTelPointingId;
801 delete fConfigSignature;
802 fConfigSignature = 0;
803 delete fConfigSignatureStr;
804 fConfigSignatureStr = 0;
806 fCoordinateSystem.reset();
807 fOutBorderPixelsDir.clear();
810 fDiaphragm->Update();
816 fCorrector->Update();
820 for (InternalChannelCollection::const_iterator cIt = fChannel.begin();
821 cIt != fChannel.end(); ++cIt)
822 cIt->second->Update();
824 for (InternalPixelCollection::const_iterator pIt = fPixel.begin();
825 pIt != fPixel.end(); ++pIt)
826 pIt->second->Update();
831 Telescope::CachePixelCalibrations()
834 if (fCalibValidityStamp.IsValid())
837 vector<int> pixelStatus;
838 GetTelescopeData(pixelStatus,
"status",
"fd_calib",
"pixel status");
839 const unsigned int statusSize = pixelStatus.size();
844 for (
unsigned int i = GetFirstPixelId(); i <= GetLastPixelId(); ++i) {
845 const Pixel& pixel = GetPixel(i);
850 switch (pixelStatus[i]) {
866 GetTelescopeData(fCalibMap,
"pixel_calibs",
"fd_calib",
"pixel calibration");
869 for (
unsigned int iPixelId = GetFirstPixelId();
870 iPixelId <= GetLastPixelId(); ++iPixelId) {
872 if (fCalibMap.find(iPixelId) != fCalibMap.end()) {
881 tIt != cachedTabFunc.
End(); ++tIt) {
882 pixCal.
PushBack(tIt->X(), tIt->Y());
889 const string err =
"Failure reading FD calibration from database";
897 GetTelescopeData(startTime,
"start_time",
"fd_calib",
"pixel calibration start validity");
899 GetTelescopeData(endTime,
"end_time",
"fd_calib",
"pixel calibration end validity");
900 fCalibValidityStamp.SetValidityInterval(startTime, endTime);
904 Telescope::CachePixelOpticalEfficiencyCorrections()
907 if (fOpticalEfficiencyValidityStamp.IsValid())
910 vector<int> pixelStatus;
911 GetTelescopeData(pixelStatus,
"status",
"fd_optical_efficiency",
"pixel status");
912 const unsigned int statusSize = pixelStatus.size();
917 for (
unsigned int i = GetFirstPixelId(); i <= GetLastPixelId(); ++i) {
918 const Pixel& pixel = GetPixel(i);
923 switch (pixelStatus[i]) {
939 GetTelescopeData(fOpticalEfficiencyMap,
"pixel_optical_efficiency_corrections",
"fd_optical_efficiency",
"pixel optical efficiency correction");
942 for (
unsigned int iPixelId = GetFirstPixelId();
943 iPixelId <= GetLastPixelId(); ++iPixelId) {
945 if (fOpticalEfficiencyMap.find(iPixelId) != fOpticalEfficiencyMap.end()) {
947 TabulatedFunction& pixOpticalEfficiency = GetPixel(iPixelId).fWavelengthOpticalEfficiencyCorrection;
954 tIt != cachedTabFunc.
End(); ++tIt) {
955 pixOpticalEfficiency.
PushBack(tIt->X(), tIt->Y());
962 const string err =
"Failure reading FD optical efficiency correction from database";
970 GetTelescopeData(startTime,
"start_time",
"fd_optical_efficiency",
"pixel optical efficiency start validity");
972 GetTelescopeData(endTime,
"end_time",
"fd_optical_efficiency",
"pixel optical efficiency end validity");
973 fOpticalEfficiencyValidityStamp.SetValidityInterval(startTime, endTime);
977 Telescope::CachePixelCloudData()
985 const VManager& manager = Detector::GetInstance().
986 GetAManagerRegister().GetManager(
"ACloudSQLManager");
988 vector<vector<int> > pixel_coverage_start_end;
991 {
"eyeId", GetParentPhysicalEyeIdString() },
992 {
"telescopeId", GetParentPhysicalIdString() }
996 manager.
GetData(pixel_coverage_start_end,
"cloud_pixel",
"pixel_id, cloud_coverage, start_time, end_time", indexMap);
999 if (status == VManager::eNotFound || pixel_coverage_start_end.empty())
1003 set<int> pixelsInCloudDB;
1004 for (
unsigned int i = 0; i < pixel_coverage_start_end.size(); ++i)
1005 pixelsInCloudDB.insert(pixel_coverage_start_end[i][0]);
1007 if ( pixelsInCloudDB.size() != GetLastPixelId()-GetFirstPixelId()+1 ) {
1009 warn <<
"no full telescope in cloud DB --> skip"
1010 <<
"(nPix=" << fPixel.size() <<
" nCloud="
1011 << pixelsInCloudDB.size() <<
")";
1012 for (
unsigned int i = 0; i < pixel_coverage_start_end.size(); ++i) {
1013 cout <<
" pixel Id: " << pixel_coverage_start_end[i][0]
1014 <<
" gpsStart: " << pixel_coverage_start_end[i][2]
1015 <<
" gpsStop: " << pixel_coverage_start_end[i][3]
1023 for (
unsigned int i = 0; i < pixel_coverage_start_end.size(); ++i) {
1024 const int pixelId = pixel_coverage_start_end[i][0];
1025 const int cloudIndex = pixel_coverage_start_end[i][1];
1026 const int gpsStart = pixel_coverage_start_end[i][2];
1027 const int gpsEnd = pixel_coverage_start_end[i][3];
1029 const Pixel& pixel = GetPixel(pixelId);
1047 Telescope::GetCameraPixelDirection(
const unsigned int pixelId)
1050 if (pixelId < GetFirstPixelId() ||
1051 pixelId > GetLastPixelId()) {
1053 err <<
"Pixel number " << pixelId <<
" "
1054 "is not in the Camera";
1068 Telescope::GetCameraPixelDirection(
const unsigned int row,
const unsigned int col)
1075 const double eta0 = GetCamera().GetEta();
1076 const double centerRow = GetCamera().GetCenterRow();
1077 const double centerColumn = GetCamera().GetCenterColumn();
1078 const double dOmega = eta0;
1079 const double dPhi =
kSqrt3 * eta0/2;
1084 const double oo = (col - centerColumn + (row%2)/2.) * dOmega;
1085 const double ph = (centerRow - row) * dPhi;
1087 const double mcosOO = -cos(oo);
1088 const double z = mcosOO * cos(ph);
1089 const double x = mcosOO * sin(ph);
1090 const double y = sin(oo);
1092 return Vector(-x, -y, -z, GetTelescopeCoordinateSystem());
1097 Telescope::GetModelMinWavelength()
1100 double minWavelength = GetMirror().GetReflectivity().XFront();
1101 minWavelength =
max(minWavelength, GetFilter().GetTransmittance().XFront());
1102 minWavelength =
max(minWavelength, GetCorrector().GetTransmittance().XFront());
1103 minWavelength =
max(minWavelength, GetPixel(1).GetQEfficiency().XFront());
1104 GetMeasuredRelativeEfficiency();
1105 minWavelength =
max(minWavelength, fMeasuredRelativeEfficiency->XFront());
1106 return minWavelength;
1111 Telescope::GetModelMaxWavelength()
1114 double maxWavelength = GetMirror().GetReflectivity().XBack();
1115 maxWavelength = min(maxWavelength, GetFilter().GetTransmittance().XBack());
1116 maxWavelength = min(maxWavelength, GetCorrector().GetTransmittance().XBack());
1117 maxWavelength = min(maxWavelength, GetPixel(1).GetQEfficiency().XBack());
1118 GetMeasuredRelativeEfficiency();
1119 maxWavelength = min(maxWavelength, fMeasuredRelativeEfficiency->XBack());
1120 return maxWavelength;
1126 template<
typename T>
1129 Telescope::GetTelescopeData(T*& requestedData,
1130 const string& property,
1131 const string& component,
1132 const string& errorMsg)
1135 if (!requestedData) {
1136 requestedData =
new T;
1137 GetTelescopeData(*requestedData, property, component, errorMsg);
1139 return *requestedData;
1143 template<
typename T>
1146 Telescope::GetTelescopeData(T& requestedData,
1147 const string& property,
1148 const string& component,
1149 const string& errorMsg)
1152 const VManager& manager = Detector::GetInstance().GetFManagerRegister();
1157 if (IsVirtual() && component !=
"virtualTelescope") {
1158 indexMap[
"eyeId"] = fIdOfParentPhysicalEyeString;
1159 indexMap[
"telescopeId"] = fIdOfParentPhysicalTelescopeString;
1161 indexMap[
"eyeId"] = fEyeIdString;
1162 indexMap[
"telescopeId"] = fTelescopeIdString;
1166 manager.
GetData(requestedData, property, component, indexMap);
1168 if (status == VManager::eNotFound) {
1170 err <<
"Did not find requested component for " << errorMsg <<
"; "
1171 << VManager::QueryInfoMessage(property, component, indexMap);
PointingAngleSet * fTelPointingPhiMap
Hold the azimuth of the various possible telescope pointing directions.
const utl::Vector & GetDirection() const
pointing direction of this pixel
unsigned int GetFirstColumn() const
Class to compute MD5 checksum Based on the RSA C code, wrapped in an OO fashion.
unsigned int GetNPoints() const
constexpr T Sqr(const T &x)
Description of the electronic channel for the 480 channels of the crate.
double GetPhi(const CoordinateSystemPtr &coordinateSystem) const
azimuth (phi) angle in spherical and cylindrical coordinates
double GetInnerRadius() const
Inner radius of the ring.
unsigned int GetLastColumn() const
std::string fTelescopeIdString
utl::TimeStamp * fCommissionTime
std::string * fConfigSignatureStr
std::string * fConfigSignature
unsigned int GetColumn(const unsigned int pixelid) const
const std::string & GetParentPhysicalEyeIdString() const
double GetTheta(const CoordinateSystemPtr &coordinateSystem) const
zenith (theta) angle in spherical coordinates
Class to hold collection (x,y) points and provide interpolation between them.
utl::TabulatedFunction fWavelengthOpticalEfficiencyCorrection
const Corrector & GetCorrector() const
Get the Corrector (corrector ring) object that belongs to the telescope.
double GetEta() const
Camera angular pixel spacing.
double GetCosTheta(const CoordinateSystemPtr &coordinateSystem) const
cos of zenith (theta) angle
const utl::TabulatedFunction & GetTransmittance() const
Average transmittance of the filter as a function of the wavelength.
const std::string & GetConfigSignature(const std::string &module) const
double GetSimulatedEndToEndCalibration(const std::string &configSignature) const
for the simulated end-to-end calibration constant
Status fPixelOpticalEfficiencyStatus
const Channel & GetChannel(const unsigned int channelId) const
Get Channel by id, throw utl::NonExistentComponentException if n.a.
void Update(std::vector< double > &init, const std::vector< double > &res)
const utl::TabulatedFunction & GetTransmittance() const
Transmittance as a function of the wavelength.
utl::TabulatedFunction fWavelengthCalib
double GetMercedesHeight() const
Height of the Mercedes.
det::ValidityStamp fCloudValidityStamp
Base class for exceptions trying to access non-existing components.
const Eye & GetEye(const unsigned int eyeId) const
Find eye by numerical Id.
Detector description interface for Eye-related data.
Interface for detector managers.
void PushBack(const double x, const double y)
const std::string & GetConfigSignatureStr(const std::string &module) const
Diaphragm * fDiaphragm
Hold the diaphragm properties like radius and area.
double pow(const double x, const unsigned int i)
Camera * fCamera
Hold the camera properties like the radius of curvature, Mercedes geometry and efficiency as function...
Corrector * fCorrector
Hold the corrector ring properties like the transmitance as function of the wavelength.
double GetElectronicsGain() const
const Camera & GetCamera() const
Get the Camera object that belongs to the telescope.
std::string fConfigSignatureModule
Detector description interface for FDetector-related data.
A TimeStamp holds GPS second and nanosecond for some event.
bool HasCorrectorRing() const
flag for corrector ring presence
double GetMercedesEfficiency() const
Average efficiency of the Mercedes.
constexpr double nanometer
const Pixel & GetPixel(const unsigned int pixelId) const
Get Pixel by id, throw utl::NonExistentComponentException if n.a.
Mirror * fMirror
Hold the mirror properties like the reflectivity as function of the wavelength.
unsigned int GetLastChannelId() const
virtual Status GetData(double &returnData, const std::string &componentProperty, const std::string &componentName, const IndexMap &componentIndex) const =0
boost::shared_ptr< const CoordinateTransformer > CoordinateSystemPtr
Shared pointer for coordinate systems.
double GetOuterRadius() const
Outer radius of the ring.
unsigned int GetId() const
void SetValidityInterval(const utl::TimeStamp &start, const utl::TimeStamp &stop)
Set the start and end validity times.
PointingAngleSet * fTelPointingElevationMap
Hold the elevation of the various possible telescope pointing directions.
Fluorescence Detector Pixel event.
unsigned int GetChannelId() const
const utl::TabulatedFunction & GetQEfficiency() const
Average quantum efficiency as a function of the wavelength.
utl::CoordinateSystemPtr GetEyeCoordinateSystem() const
Returns the Eye Coordinate system.
InternalPixelCollection fPixel
utl::TimeStamp * fDecommissionTime
std::vector< utl::Vector >::const_iterator OutOfBorderPixelsIterator
Description of a corrector ring.
#define WARNING(message)
Macro for logging warning messages.
const utl::TabulatedFunction & GetReflectivity() const
Average reflectivity of the segments as a function of the wavelength.
unsigned int GetLastRow() const
const double & GetY(const unsigned int idx) const
fTelescopeId(t.GetTelescopeId())
InternalChannelCollection fChannel
std::map< std::string, double > PointingAngleSet
unsigned int GetFirstChannelId() const
double GetRadiusOfCurvature() const
Average radius of curvature for the segments.
double GetMercedesBase() const
Base of the Mercedes.
const utl::TabulatedFunction & GetRefractiveIndex() const
Index of refraction as a funcction of the wavelength.
Detector description interface for Telescope-related data.
void SetBoundaryTolerance(const double tolerance)
const Filter & GetFilter() const
Get the filter that belongs to the telescope.
std::map< std::string, std::string > IndexMap
#define OFFLINE_DEFINE_CONST_ITERATOR_RANGE(_ConstIterator_, _Class_, _NamePrefix_)
const double & GetX(const unsigned int idx) const
Filter * fFilter
Hold the filter properties like the trasmitance as function of the wavelength.
const Mirror & GetMirror() const
Get the Mirror object that belongs to the telescope.
const std::string & GetParentPhysicalIdString() const
Description of the diaphragm.
unsigned int fTelescopeId
double Y(const double x) const
Get or interpolate the Y value that corresponds to parameter x.
unsigned int GetRow(const unsigned int pixelid) const
double GetMeanLensThickness() const
Mean thickness of the lens.
double GetRadiusFocal() const
Radius of focal surface of the camera.
unsigned int GetFirstRow() const
#define ERROR(message)
Macro for logging error messages.
std::string * fTelPointingId
The id of the default telescope pointing.
Status
Specifies success or (eventually) various possible failure modes.
utl::TabulatedFunction * fMeasuredRelativeEfficiency