Detector2ADST.cc
Go to the documentation of this file.
1 #include "Detector2ADST.h"
2 #include "Config.h"
3 #include "ConversionUtil.h"
4 
5 #include <det/Detector.h> // DONT USE NAMESPACE det !!!!!!
6 #include <sdet/SDetector.h>
7 #include <fdet/FDetector.h>
8 #include <fdet/Eye.h>
9 #include <fdet/Telescope.h>
10 #include <fdet/Pixel.h>
11 #include <atm/OverallQualityDB.h>
12 #include <atm/ProfileResult.h>
13 #include <atm/MolecularDB.h>
14 #include <atm/GOESDB.h>
15 #include <atm/MolecularZone.h>
16 #include <atm/Atmosphere.h>
17 #include <atm/LidarDB.h>
18 #include <atm/LidarZone.h>
19 
20 #include <fwk/CoordinateSystemRegistry.h>
21 
22 #include <evt/Event.h>
23 #include <sevt/SEvent.h>
24 #include <fevt/Eye.h>
25 #include <fevt/Telescope.h>
26 #include <fevt/Pixel.h>
27 #include <fevt/FEvent.h>
28 
29 #include <utl/CoordinateSystemPtr.h>
30 #include <utl/ErrorLogger.h>
31 #include <utl/Point.h>
32 #include <utl/PhysicalConstants.h>
33 
34 #include <adst/Detector.h>
35 #include <adst/RecEvent.h>
36 #include <adst/FdLidarData.h>
37 #include <adst/FdCloudCameraData.h>
38 #include <adst/FdAerosols.h>
39 
40 #include <cmath>
41 #include <sstream>
42 #include <iostream>
43 #include <unistd.h>
44 
45 #include <mdet/MDetector.h>
46 #include <mevt/MEvent.h>
47 
48 using namespace fwk;
49 using namespace fdet;
50 using namespace sdet;
51 using namespace fevt;
52 using namespace sevt;
53 using namespace utl;
54 using namespace atm;
55 using namespace std;
56 
57 
58 namespace otoa {
59 
60  Detector2ADST::Detector2ADST(const otoa::Config& config) :
61  fConfig(config)
62  { }
63 
64 
65  void
66  Detector2ADST::Convert(const evt::Event& event, RecEvent& recEvent)
67  {
68  FillDetector(event, recEvent.GetDetector());
69 
70  if (GetConfig().StoreLidarData())
71  FillLidarData(recEvent);
72 
73  if (GetConfig().StoreCloudCameraData() == 2)
74  FillCloudCameraData(event, recEvent.GetDetector());
75 
76  if (GetConfig().StoreGOESData() == 2)
77  FillGOESData(recEvent.GetDetector());
78  }
79 
80 
81  void
82  Detector2ADST::FillGOESData(Detector& detector)
83  {
84  try {
85  const Atmosphere& atm = det::Detector::GetInstance().GetAtmosphere();
86  const GOESDB& goesDB = atm.GetGOESDB();
87  for (unsigned int iPix = 0; iPix < goesDB.GetNumberOfPixels(); ++iPix) {
88  if (goesDB.HasData(iPix))
89  detector.SetCloudFraction(iPix, goesDB.GetCloudProbability(iPix));
90  else
91  return; // give up upon first HasNot()
92  }
93  } catch (utl::AugerException& augerException) {
94  WARNING(augerException.GetExceptionName() + ", " +
95  augerException.GetMessage());
96  detector.ClearCloudMap(); // do not store half-filled cloud data
97  }
98  }
99 
100 
101  void
102  Detector2ADST::FillDetector(const evt::Event& theEvent, Detector& theDet)
103  {
104  const det::Detector& detector = det::Detector::GetInstance();
105 
106  // -------------> SD <-----------------
107 
108  TBits stationBits(1600); // TBits enlarges automatically of needed!
109 
110  if (theEvent.HasSEvent() && fConfig.WriteSD()) {
111 
112  const sevt::SEvent& sEvent = theEvent.GetSEvent();
113 
114  const sdet::SDetector& sDet = detector.GetSDetector();
116 
117  // loop on all stations
119  sIt != sEvent.StationsEnd(); ++sIt) {
120  const int sId = sIt->GetId();
121  try {
122  if (sDet.GetStation(sId).IsDense()) {
123  const TVector3 p = ToTVector3(sDet.GetStation(sId).GetPosition(), cs, meter);
124  theDet.SetDenseStation(sId, p.X(), p.Y(), p.Z());
125  }
126  } catch (AugerException& e) {
127  ERROR(e.GetMessage());
128  continue;
129  }
130 
131  stationBits.SetBitNumber(sId, true);
132  }
133 
134  }
135 
136  //-------------> Md (AMIGA) <-----------------
137  if (theEvent.HasMEvent()) {
138 
139  const mevt::MEvent& mEvent = theEvent.GetMEvent();
140 
141  const mdet::MDetector& mDet = det::Detector::GetInstance().GetMDetector();
142  const CoordinateSystemPtr cs = det::Detector::GetInstance().GetReferenceCoordinateSystem();
143 
144  // loop on all stations
146  mIt != mEvent.CountersEnd(); ++mIt) {
147  const int cId = mIt->GetId();
148  try {
149  if (mDet.GetCounter(cId).IsDense()) {
150  const TVector3 p = ToTVector3(mDet.GetCounter(cId).GetPosition(), cs, meter);
151  theDet.SetDenseStation(cId, p.X(), p.Y(), p.Z());
152  }
153  } catch (AugerException& e) {
154  ERROR(e.GetMessage());
155  continue;
156  }
157 
158  stationBits.SetBitNumber(cId, true);
159  }
160 
161  }
162 
163  // -------------> FD <-----------------
164 
165  TBits eyeBits = TBits(10); // TBits enlarges automatically of needed!
166 
167  const bool hasFdConfig =
168  detector.GetFDetector().EyesBegin() != detector.GetFDetector().EyesEnd();
169 
170  if (fConfig.WriteFD() && theEvent.HasFEvent() && hasFdConfig) {
171  const Atmosphere& theAtm = det::Detector::GetInstance().GetAtmosphere();
172 
173  theDet.SetHasFdUpTime(detector.GetFDetector().HasFdUpTime());
174 
175  const fevt::FEvent& fevent = theEvent.GetFEvent();
176 
177  // loop on all eyes
179  iEye != fevent.EyesEnd(fevt::ComponentSelector::eInDAQ); ++iEye) {
180 
181  const unsigned int thisEyeId = iEye->GetId();
182 
183  try {
184  theDet.SetVAODAtReferenceHeight(
185  thisEyeId,
187  thisEyeId,
188  GetConfig().VAODReferenceHeight()
189  )
190  );
191  } catch (AugerException& zone_e) {
192  INFO("VAOD at reference not set!!!");
193  // and do nothing about it
194  }
195 
196  if (GetConfig().AerosolAttenuationLengthSampling() > 0)
197  FillAerosols(thisEyeId, theDet);
198 
199  eyeBits.SetBitNumber(thisEyeId, true);
200 
201  const fdet::Eye& eyeDet = detector.GetFDetector().GetEye(thisEyeId);
202  double sd_offset = eyeDet.GetSDTimeOffset().GetInterval();
203 
204  theDet.SetFDSDTimeOffset (thisEyeId, sd_offset);
205 
206  // telescopes
207 
208  TBits daqBits(10);
209  for (fevt::Eye::ConstTelescopeIterator iTel = iEye->TelescopesBegin(fevt::ComponentSelector::eInDAQ);
210  iTel != iEye->TelescopesEnd(fevt::ComponentSelector::eInDAQ); ++iTel) {
211 
212  const unsigned int thisTelId = (unsigned int)iTel->GetId();
213  daqBits.SetBitNumber(thisTelId, true);
214 
215  const fdet::Telescope& telDet = eyeDet.GetTelescope(thisTelId);
216 
217  // pixels
218  for (fevt::Telescope::ConstPixelIterator iPix = iTel->PixelsBegin(ComponentSelector::eExists);
219  iPix != iTel->PixelsEnd(ComponentSelector::eExists); ++iPix) {
220 
221  const unsigned int pixelId = iPix->GetId();
222 
223  if (telDet.GetPixel(pixelId).GetChannelId() != pixelId)
224  theDet.AddMismatchedPixel(thisEyeId, thisTelId, pixelId);
225 
226  if (iPix->GetStatus() == ComponentSelector::eDeSelected ||
227  iPix->GetStatus() == ComponentSelector::eBadCalibration)
228  theDet.AddBadPixel(thisEyeId, thisTelId, pixelId);
229  }
230  }
231 
232  daqBits.Compact();
233  theDet.SetMirrorsInDAQ(thisEyeId, daqBits);
234 
235  }
236  }
237  eyeBits.Compact();
238  stationBits.Compact();
239  theDet.SetActiveStations(stationBits);
240  theDet.SetActiveEyes(eyeBits);
241 
242  const fdet::FDetector& fdDet = det::Detector::GetInstance().GetFDetector();
243 
245  eyeiter != fdDet.EyesEnd(fdet::FDetComponentSelector::eAll); ++eyeiter) {
246  TBits corrBits(7);
247  for (fdet::Eye::TelescopeIterator teliter = eyeiter->TelescopesBegin();
248  teliter != eyeiter->TelescopesEnd(); ++teliter) {
249  if (teliter->HasCorrectorRing())
250  corrBits.SetBitNumber(teliter->GetId(), true);
251 
252  theDet.SetPointingId(eyeiter->GetId(), teliter->GetId(), teliter->GetTelescopePointingId());
253  }
254 
255  theDet.SetCorrectorRingStatus(eyeiter->GetId(),corrBits);
256  }
257 
258  // -------------> Atmosphere <-----------------
259  int lastEventGPSSecond = 0;
260  //double lastPressure = 0;
261  //double lastTemperature = 0;
262  if (GetConfig().UseWeatherStations() == 1) {
263 
264  const Atmosphere& theAtm = det::Detector::GetInstance().GetAtmosphere();
265  const int newTime = theEvent.GetHeader().GetTime().GetGPSSecond();
266  const int kTimeInterval = 30*60; //seconds
267  if (abs(lastEventGPSSecond - newTime) >= kTimeInterval) {
268  lastEventGPSSecond = theEvent.GetHeader().GetTime().GetGPSSecond();
269  theDet.SetTemperaturePressureGPSSeconds(lastEventGPSSecond);
270  const MolecularDB& molWeather = theAtm.GetMolecularDB(MolecularIds::eWeatherStation);
271  for (MolecularDB::ZoneIterator zIt = molWeather.ZonesBegin();
272  zIt != molWeather.ZonesEnd(); ++zIt) {
273  for (MolecularZone::LayerIterator lIt = zIt->LayersBegin();
274  lIt != zIt->LayersEnd(); ++lIt) {
275  if (lIt->GetTemperature()) {
276  theDet.SetPressure(lIt->GetPressure()/bar);
277  theDet.SetTemperature(lIt->GetTemperature());
278  theDet.SetHasWeatherStationData();
279  //lastPressure = lIt->GetPressure()/bar;
280  //lastTemperature = lIt->GetTemperature();
281  break;
282  }
283  }
284  if (theDet.HasWeatherStationData())
285  break;
286  }
287 
288  if (!theDet.HasWeatherStationData()) {
289  const ProfileResult& temp = theAtm.EvaluateTemperatureVsHeight();
290  const ProfileResult& pressure = theAtm.EvaluatePressureVsHeight();
291  theDet.SetTemperature(temp.Y(1412*meter));
292  theDet.SetPressure(pressure.Y(1412*meter)/bar);
293  //lastPressure = pressure.Y(1412*meter)/bar;
294  //lastTemperature = temp.Y(1412*meter);
295  }
296  }
297 
298  }
299 
300  det::Detector& det = det::Detector::GetInstance();
301  if (GetConfig().ConnectToDatabases()) {
302  try {
303  const OverallQualityDB& overallDB = det.GetAtmosphere().GetOverallQualityDB();
304  const double qDBHorizonalUniformity = overallDB.GetHorizontalUniformity();
305  const double qDBCloudCoverage = overallDB.GetCloudCoverage();
306  const double qDBMinCloudBase = overallDB.GetMinCloudBase();
307 
308  const atm::ProfileResult& depthProfile =
309  det::Detector::GetInstance().GetAtmosphere().EvaluateDepthVsHeight();
310  double maxHeight = depthProfile.MaxX();
311  double minHeight = depthProfile.MinX();
312 
313  theDet.SetHasOverallQualityDatabase();
314  theDet.SetQDBHorizontalUniformity(qDBHorizonalUniformity);
315  theDet.SetQDBCloudCoverage(qDBCloudCoverage);
316  const double h = qDBMinCloudBase*m;
317  theDet.SetQDBMinCloudBaseHeight(h);
318  if (h >= maxHeight)
319  theDet.SetQDBMinCloudBaseDepth(depthProfile.Y(maxHeight)/g*cm2);
320  else if (h <= minHeight)
321  theDet.SetQDBMinCloudBaseDepth(depthProfile.Y(minHeight)/g*cm2);
322  else
323  theDet.SetQDBMinCloudBaseDepth(depthProfile.Y(h)/g*cm2);
324  } catch (utl::AugerException& augerException) {
325  WARNING(augerException.GetExceptionName() + ", " +
326  augerException.GetMessage());
327  theDet.SetQDBMinCloudBaseHeight(-1);
328  theDet.SetQDBMinCloudBaseDepth(-1);
329  theDet.SetQDBHorizontalUniformity(-1);
330  theDet.SetQDBCloudCoverage(-1);
331  }
332  } else {
333  theDet.SetQDBMinCloudBaseHeight(-1);
334  theDet.SetQDBMinCloudBaseDepth(-1);
335  theDet.SetQDBHorizontalUniformity(-1);
336  theDet.SetQDBCloudCoverage(-1);
337  }
338  }
339 
340 
341  void
342  Detector2ADST::FillLidarData(RecEvent& theRecEvent)
343  {
344  const Atmosphere& theAtm = det::Detector::GetInstance().GetAtmosphere();
345  try {
346  const LidarDB& LidarDB = theAtm.GetLidarDB();
347  for (LidarDB::ZoneIterator zIt = LidarDB.ZonesBegin();
348  zIt != LidarDB.ZonesEnd(); ++zIt) {
349 
350  const string lidarZoneName = zIt->GetName();
351  const double lidarCloudCoverage = zIt->GetCloudCoverage();
352  double lidarCloudHeight = zIt->GetLowestCloudHeight();
353  double lidarCloudThickness = zIt->GetLowestCloudThickness();
354  double lidarCloudVAOD = zIt->GetLowestCloudVAOD();
355 //#warning update LidarRange once the information is available
356  const double lidarRange = -1;
357 
358  //------- Depth Conversion ---------------------------
359  double cosZenith = -1;
360  double lidarCloudDepth = -1;
361  double lidarCloudSlantThickness = -1;
362 
363  int hottestEye = theRecEvent.GetHottestEyeId();
364  if (hottestEye && theRecEvent.GetEye(hottestEye).GetRecLevel() > eHasAxis)
365  cosZenith = theRecEvent.GetEye(hottestEye).GetFdRecShower().GetCosZenith();
366  else
367  if (theRecEvent.GetSDEvent().HasAxis())
368  cosZenith = theRecEvent.GetSDEvent().GetSdRecShower().GetCosZenith();
369 
370  if (cosZenith > 0) {
371 
372  const atm::ProfileResult& depthProfile =
373  det::Detector::GetInstance().GetAtmosphere().EvaluateDepthVsHeight();
374  double maxHeight = depthProfile.MaxX();
375  double minHeight = depthProfile.MinX();
376 
377  if (!lidarCloudCoverage) {
378  // no clouds
379  lidarCloudHeight = maxHeight;
380  lidarCloudThickness = 0;
381  lidarCloudVAOD = 0;
382  }
383 
384  double lidarCloudMax = lidarCloudHeight+lidarCloudThickness;
385  double lidarCloudSlantMax = -1.;
386 
387  if (lidarCloudHeight >= maxHeight)
388  lidarCloudDepth = depthProfile.Y(maxHeight)/g*cm2;
389  else if (lidarCloudHeight<= minHeight)
390  lidarCloudDepth = depthProfile.Y(minHeight)/g*cm2;
391  else
392  lidarCloudDepth = depthProfile.Y(lidarCloudHeight)/g*cm2;
393 
394  if (lidarCloudMax >= maxHeight)
395  lidarCloudSlantMax = depthProfile.Y(maxHeight)/g*cm2;
396  else if (lidarCloudMax <= minHeight)
397  lidarCloudSlantMax = depthProfile.Y(minHeight)/g*cm2;
398  else
399  lidarCloudSlantMax = depthProfile.Y(lidarCloudMax)/g*cm2;
400 
401  // simple transformation from vertical to slant depth
402  double CloudDepthSlant = lidarCloudDepth/cosZenith;
403  lidarCloudSlantMax /= cosZenith;
404  if (lidarCloudSlantMax < CloudDepthSlant)
405  lidarCloudSlantThickness = CloudDepthSlant - lidarCloudSlantMax;
406  }
407 
408  int lidarZoneID = 0;
409  if (lidarZoneName == "Los Leones")
410  lidarZoneID = 1;
411  else if (lidarZoneName == "Los Morados")
412  lidarZoneID = 2;
413  else if (lidarZoneName == "Loma Amarilla")
414  lidarZoneID = 3;
415  else if (lidarZoneName == "Coihueco")
416  lidarZoneID = 4;
417 
418  FdLidarData thisLidarData(lidarCloudCoverage, lidarCloudHeight,
419  lidarCloudDepth, lidarCloudThickness,
420  lidarCloudSlantThickness, lidarCloudVAOD,
421  lidarRange);
422  theRecEvent.GetDetector().SetLidarData(lidarZoneID, thisLidarData);
423 
424  }
425 
426  } catch(AugerException& e) {
427  WARNING("Exception retrieving lidar info.");
428  }
429  }
430 
431 
432  void
434  Detector& adstDetector)
435  {
436  const FDetector& theFDet = det::Detector::GetInstance().GetFDetector();
437 
438  if (!theEvent.HasFEvent())
439  return;
440 
441  //loop over eyes
442  for (fevt::FEvent::ConstEyeIterator iEye = theEvent.GetFEvent().EyesBegin(ComponentSelector::eHasData);
443  iEye != theEvent.GetFEvent().EyesEnd(ComponentSelector::eHasData); ++iEye) {
444 
445  const unsigned int thisEyeId = iEye->GetId();
446  FdCloudCameraData thisCloudCameraData;
447 
448  //loop over telescopes
449  for (fevt::Eye::ConstTelescopeIterator iTel = iEye->TelescopesBegin(ComponentSelector::eHasData);
450  iTel != iEye->TelescopesEnd(ComponentSelector::eHasData); ++iTel) {
451 
452  const unsigned int thisTelId = iTel->GetId();
453  const fdet::Telescope& detTel = theFDet.GetEye(thisEyeId).GetTelescope(thisTelId);
454 
455  //loop over det::pixels
456  for (unsigned int pixelId = detTel.GetLastPixelId(); //inverse order due to resize in FdCloudCameraData
457  pixelId >= detTel.GetFirstPixelId(); --pixelId) {
458 
459  const fdet::Pixel& iPix = detTel.GetPixel(pixelId);
460  if (!iPix.HasCloudFraction()) //maybe thisCloudCameraData should be cleared here
461  break; //next tel if one pixel is empty
462 
463  const float cloudFraction = iPix.GetCloudFraction();
464 
465  thisCloudCameraData.SetCloudFraction(thisTelId, pixelId, cloudFraction);
466  }
467  }
468  if (!thisCloudCameraData.IsEmpty())
469  adstDetector.SetCloudCameraData(thisEyeId, thisCloudCameraData);
470  }
471  }
472 
473 
474  void
475  Detector2ADST::FillAerosols(const unsigned int thisEyeId, Detector& theDet)
476  {
477  det::Detector& offlDet = det::Detector::GetInstance();
478  const Atmosphere& theAtm = offlDet.GetAtmosphere();
479  const fdet::Eye& detEye = offlDet.GetFDetector().GetEye(thisEyeId);
480 
482  const Point& eyepos = detEye.GetPosition();
483 
484  ReferenceEllipsoid wgs84(ReferenceEllipsoid::Get(ReferenceEllipsoid::eWGS84));
485 
486  const double eyeHeight = (wgs84.PointToLatitudeLongitudeHeight(eyepos)).get<2>();
487  const double maxHeightRelEye = 20000*meter - eyeHeight;
488 
489  const double wavelength = GetConfig().LaserWavelength();
490  const double stepSize = GetConfig().AerosolAttenuationLengthSampling();
491 
492  vector<double> heights;
493  vector<double> attenuationLengths;
494  double heightRelEye = 0;
495  while (heightRelEye < maxHeightRelEye) {
496  const Point samplePoint(0, 0, heightRelEye, eyeCS);
497 
498  const double attLength =
499  theAtm.GetMieAttenuationLength(samplePoint, wavelength);
500 
501  heights.push_back(heightRelEye + eyeHeight); // save abs height
502  attenuationLengths.push_back(attLength);
503 
504  heightRelEye += stepSize;
505  }
506 
507  FdAerosols aerosolData;
508  aerosolData.SetMieAttenuationLength(attenuationLengths);
509  aerosolData.SetMieAttenuationHeight(heights);
510 
511  theDet.SetAerosolData(thisEyeId, aerosolData);
512  }
513 
514 }
bool UseWeatherStations() const
Definition: Config.h:31
boost::transform_iterator< InternalZoneFunctor, InternalZoneIterator, const LidarZone & > ZoneIterator
ZoneIterator returns a pointer to an LidarZone.
Definition: LidarDB.h:45
Top of the interface to Atmosphere information.
InternalCounterCollection::ComponentConstIterator CounterConstIterator
Definition: MEvent.h:30
StationIterator StationsEnd()
End of all stations.
Definition: SEvent.h:59
CounterConstIterator CountersBegin() const
Definition: MEvent.h:49
const Config & fConfig
Definition: Detector2ADST.h:42
Point object.
Definition: Point.h:32
boost::transform_iterator< InternalZoneFunctor, InternalZoneIterator, const MolecularZone & > ZoneIterator
ZoneIterator returns a pointer to a MolecularZone.
Definition: MolecularDB.h:52
mevt::MEvent & GetMEvent()
bool HasMEvent() const
Base class for all exceptions used in the auger offline code.
evt::Header & GetHeader()
Detector description interface for GOES cloud data.
Definition: GOESDB.h:29
boost::filter_iterator< ComponentSelector, ConstAllEyeIterator > ConstEyeIterator
Definition: FEvent.h:56
bool HasFEvent() const
unsigned int GetFirstPixelId() const
Interface class to access to the SD part of an event.
Definition: SEvent.h:39
const OverallQualityDB & GetOverallQualityDB() const
low-level interface to portion of the database summarizing overall quality
const atm::ProfileResult & EvaluatePressureVsHeight() const
Tabulated function giving Y=air pressure as a function of X=height.
bool HasCloudFraction() const
void Convert(const evt::Event &event, RecEvent &recEvent)
EyeIterator EyesEnd(const ComponentSelector::Status status)
Definition: FEvent.h:66
ZoneIterator ZonesEnd() const
End of the collection of valid Zones.
Definition: LidarDB.h:52
ZoneIterator ZonesEnd() const
End of the collection of valid Zones.
Definition: MolecularDB.h:59
const double meter
Definition: GalacticUnits.h:29
double LaserWavelength() const
Definition: Config.h:61
#define INFO(message)
Macro for logging informational messages.
Definition: ErrorLogger.h:161
Detector description interface for data in the Atm_Molecular database.
Definition: MolecularDB.h:29
utl::Point GetPosition() const
from weather station
Definition: MolecularIds.h:11
const Eye & GetEye(const unsigned int eyeId) const
Find eye by numerical Id.
Definition: FDetector.cc:68
EyeIterator EyesBegin(const FDetComponentSelector::Type type=FDetComponentSelector::ePhysical) const
iterator pointing to first eye of given type (ePhysical, eVirtual, eAll)
Definition: FDetector.h:72
Detector description interface for Eye-related data.
Definition: FDetector/Eye.h:45
void FillGOESData(Detector &det)
Detector associated to muon detector hierarchy.
Definition: MDetector.h:32
Detector description interface for FDetector-related data.
Definition: FDetector.h:44
void FillAerosols(const unsigned int thisEyeId, Detector &det)
double Y(const double x) const
Get the Y value (coordinate) for given X (ordinate)
const utl::TimeStamp & GetTime() const
Definition: Event/Header.h:33
utl::Point GetPosition() const
Tank position.
const Pixel & GetPixel(const unsigned int pixelId) const
Get Pixel by id, throw utl::NonExistentComponentException if n.a.
const atm::Atmosphere & GetAtmosphere() const
Definition: Detector.h:113
boost::shared_ptr< const CoordinateTransformer > CoordinateSystemPtr
Shared pointer for coordinate systems.
unsigned int GetLastPixelId() const
Reference ellipsoids for UTM transformations.
double GetCloudProbability(const unsigned int pixelId) const
Get cloud probability from the pixel id.
Definition: GOESDB.cc:118
boost::filter_iterator< FDetComponentSelector, AllEyeIterator > EyeIterator
Definition: FDetector.h:69
unsigned int GetChannelId() const
const GOESDB & GetGOESDB() const
low-level interface to the cloud information from the GOES database
utl::CoordinateSystemPtr GetEyeCoordinateSystem() const
Returns the Eye Coordinate system.
Class describing the Atmospheric profile.
Definition: ProfileResult.h:25
double abs(const SVector< n, T > &v)
Converts an Offline event to ADST.
Definition: Config.h:19
const Telescope & GetTelescope(const unsigned int telescopeId) const
Find Telescope by numerical Id.
Top of the hierarchy of the detector description interface.
Definition: Detector.h:81
const sdet::SDetector & GetSDetector() const
Definition: Detector.cc:119
EyeIterator EyesBegin(const ComponentSelector::Status status)
Definition: FEvent.h:58
Triple PointToLatitudeLongitudeHeight(const Point &thePoint) const
Convert Point to Lat/Long/Height.
const MolecularDB & GetMolecularDB(const MolecularIds::ProfileId &id) const
Low-level interface to portion of the database with molecular information.
double GetMieAttenuationLength(const utl::Point &xA, const double wLength) const
boost::filter_iterator< ComponentSelector, ConstAllPixelIterator > ConstPixelIterator
const fdet::FDetector & GetFDetector() const
Definition: Detector.cc:131
unsigned int GetNumberOfPixels() const
Definition: GOESDB.cc:48
constexpr double g
Definition: AugerUnits.h:200
void FillCloudCameraData(const evt::Event &event, Detector &det)
#define WARNING(message)
Macro for logging warning messages.
Definition: ErrorLogger.h:163
double GetMinCloudBase() const
Top of Fluorescence Detector event hierarchy.
Definition: FEvent.h:33
double GetInterval() const
Get the time interval as a double (in Auger base units)
Definition: TimeInterval.h:69
double AerosolAttenuationLengthSampling() const
Definition: Config.h:58
ZoneIterator ZonesBegin() const
Beginning of the collection of valid Zones.
Definition: MolecularDB.h:55
boost::filter_iterator< TelIsCommissioned, InternalConstTelescopeIterator > TelescopeIterator
An iterator over telescopes.
Definition: FDetector/Eye.h:76
fevt::FEvent & GetFEvent()
bool IsDense() const
bool StoreLidarData() const
Definition: Config.h:37
const utl::TimeInterval & GetSDTimeOffset() const
Time Offset of this eye with respect to SD.
bool WriteSD() const
Definition: Config.h:28
float GetCloudFraction() const
how much of pixel is obscured by clouds
Detector description interface for Telescope-related data.
double MinX() const
Return the minimum value for X (ordinate) stored in the profile.
boost::indirect_iterator< InternalLayerIterator, const MolecularLayer & > LayerIterator
Layer iterator returns a pointer to the molecular data slice for this zone.
Definition: MolecularZone.h:43
unsigned long GetGPSSecond() const
GPS second.
Definition: TimeStamp.h:124
int StoreGOESData() const
Definition: Config.h:43
Detector description interface for LidarDB-realted data.
Definition: LidarDB.h:26
StationIterator StationsBegin()
Beginning of all stations.
Definition: SEvent.h:57
void FillDetector(const evt::Event &theEvent, Detector &det)
utl::CoordinateSystemPtr GetReferenceCoordinateSystem() const
Get the reference coordinate system used for analysis (usually PampaAmarilla for Auger) ...
Definition: Detector.h:141
Description of a pixel.
bool WriteFD() const
Definition: Config.h:26
bool IsDense() const
Tells whether the station belongs to set of hypothetical &quot;dense&quot; stations.
Detector description interface for SDetector-related data.
Definition: SDetector.h:42
double GetVerticalAerosolOpticalDepth(const unsigned int eyeId, const double altitude=4.5 *utl::km) const
Retrieve vertical optical depth at some location and altitude.
const Config & GetConfig() const
Definition: Detector2ADST.h:34
CounterConstIterator CountersEnd() const
Definition: MEvent.h:52
double GetCloudCoverage() const
utl::CoordinateSystemPtr Get(const std::string &id)
Get a well-known Coordinate System.
bool HasData(const unsigned int pixelId) const
Check if cloud probability data exists for a given pixel at the current time.
Definition: GOESDB.cc:148
Access to database describing overall atmospheric quality.
TVector3 ToTVector3(const T &v, const utl::CoordinateSystemPtr &cs, const double unit=1)
int StoreCloudCameraData() const
Definition: Config.h:40
const Station & GetStation(const int stationId) const
Get station by Station Id.
Definition: SDetector.cc:192
const Counter & GetCounter(int id) const
Retrieve Counter by id.
Definition: MDetector.h:68
boost::indirect_iterator< InternalConstStationIterator, const Station & > ConstStationIterator
Definition: SEvent.h:54
#define ERROR(message)
Macro for logging error messages.
Definition: ErrorLogger.h:165
constexpr double m
Definition: AugerUnits.h:121
sevt::SEvent & GetSEvent()
constexpr double bar
Definition: AugerUnits.h:213
Root of the Muon event hierarchy.
Definition: MEvent.h:25
void FillLidarData(RecEvent &recEvent)
bool HasSEvent() const
unsigned int GetId() const
boost::filter_iterator< ComponentSelector, ConstAllTelescopeIterator > ConstTelescopeIterator
Definition: FEvent/Eye.h:73
const std::string & GetMessage() const
Retrieve the message from the exception.
utl::Point GetPosition() const
Eye position.
const atm::ProfileResult & EvaluateTemperatureVsHeight() const
Tabulated function giving Y=temperature as a function of X=height.
const LidarDB & GetLidarDB() const
low-level interface to portion of the database with cloud data from lidar analysis ...
double MaxX() const
Return the maximum value for X (ordinate) stored in the profile.
double GetHorizontalUniformity() const
ZoneIterator ZonesBegin() const
Beginning of the collection of valid Zones.
Definition: LidarDB.h:48
bool HasFdUpTime() const
Definition: FDetector.cc:262
constexpr double cm2
Definition: AugerUnits.h:118
EyeIterator EyesEnd(const FDetComponentSelector::Type type=FDetComponentSelector::ePhysical) const
iterator pointing to end of available eyes of given type (ePhysical, eVirtual, eAll) ...
Definition: FDetector.h:76

, generated on Tue Sep 26 2023.