TelescopeSimulatorLX/TelescopeSimulator.cc
Go to the documentation of this file.
1 #include <utl/config.h>
2 
3 #include "TelescopeSimulator.h"
4 
5 #include <utl/Reader.h>
6 #include <utl/ErrorLogger.h>
7 #include <utl/AugerUnits.h>
8 #include <utl/MathConstants.h>
9 #include <utl/Math.h>
10 #include <utl/PhysicalConstants.h>
11 #include <utl/PhysicalFunctions.h>
12 #include <utl/Point.h>
13 #include <utl/TabulatedFunction.h>
14 #include <utl/TabulatedFunctionErrors.h>
15 #include <utl/Trace.h>
16 #include <utl/MultiTabulatedFunction.h>
17 #include <utl/Photon.h>
18 #include <utl/RandomEngine.h>
19 #include <utl/UTMPoint.h>
20 
21 #include <fwk/CentralConfig.h>
22 #include <fwk/CoordinateSystemRegistry.h>
23 #include <fwk/RandomEngineRegistry.h>
24 
25 #include <det/Detector.h>
26 
27 #include <fdet/FDetector.h>
28 #include <fdet/Eye.h>
29 #include <fdet/Telescope.h>
30 #include <fdet/Camera.h>
31 #include <fdet/Pixel.h>
32 
33 #include <evt/Event.h>
34 
35 #include <fevt/FEvent.h>
36 #include <fevt/Eye.h>
37 #include <fevt/TelescopeSimData.h>
38 #include <fevt/Telescope.h>
39 #include <fevt/PixelSimData.h>
40 #include <fevt/Pixel.h>
41 
42 #include <CLHEP/Random/Randomize.h>
43 
44 #include <boost/tuple/tuple.hpp>
45 
46 #include <map>
47 #include <iomanip>
48 #include <fstream>
49 #include <sstream>
50 
51 #include <G4RunManager.hh>
52 #include <G4UImanager.hh>
53 #include <G4VUserPhysicsList.hh>
54 #include <G4Timer.hh>
55 #include <G4ProcessTable.hh>
56 //#include <G4VisExecutive.hh>
57 
60 #include "FDsimG4PhysicsList.hh"
61 #include "FDsimG4EventAction.hh"
63 #include "FDsimG4VisExecutive.hh"
64 #include "FDsimG4XMLManager.hh"
65 #include "FDsimG4Defs.hh"
66 #include "FDsimG4Write2ROOT.hh"
67 
68 using namespace TelescopeSimulatorLX;
69 using namespace std;
70 using namespace utl;
71 using namespace evt;
72 using namespace fwk;
73 using namespace det;
74 using namespace fdet;
75 
76 using CLHEP::RandFlat;
77 
78 
81 {
82  fXMLManager = FDsimG4XMLManager();
83  fXMLManager.Init("TelescopeSimulatorLX");
84 
85  fDrumMode = false;
86 
87  INFO("Geant4 telescope ray-tracing (beta-version)");
88 
89  Branch topB = CentralConfig::GetInstance()->GetTopBranch("TelescopeSimulatorLX");
90  if (!topB) {
91  ERROR("No XML configuration found for TelescopeSimulatorLX!");
92  return eFailure;
93  }
94 
95  // --------------------- **OPTIONAL** ---------------------
96  fVerbosityLevel = 0;
97 
98  if (topB.GetChild("verbosityLevel"))
99  topB.GetChild("verbosityLevel").GetData(fVerbosityLevel);
100 
101  fG4MacroFile = "";
102  fG4Standalone = false;
103  fWeightFactor = 1.0;
104  fROOTFile = "FDsimG4.root";
105 
106  Branch G4optionsB = topB.GetChild("options");
107  if (G4optionsB) {
108  string instr;
109 
110  if (G4optionsB.GetChild("ROOTFile"))
111  G4optionsB.GetChild("ROOTFile").GetData(fROOTFile);
112 
113  if (G4optionsB.GetChild("G4MacroFile"))
114  G4optionsB.GetChild("G4MacroFile").GetData(fG4MacroFile);
115 
116  if (G4optionsB.GetChild("G4Standalone")) {
117  G4optionsB.GetChild("G4Standalone").GetData(instr);
118  fG4Standalone = (instr == "yes");
119  }
120 
121  if (G4optionsB.GetChild("weightFactor"))
122  G4optionsB.GetChild("weightFactor").GetData(fWeightFactor);
123  }
124 
125  if (!fG4Standalone)
126  fWeightFactor = 1.0;
127  if (fG4Standalone) {
128  INFO("TelescopeSimulatorLX will be run in standalone mode.");
129  if (fG4MacroFile == "") {
130  ERROR ("Standalone mode was selected but no macro file given.");
131  return eFailure;
132  }
133  }
134 
135  if (fG4MacroFile != "")
136  INFO("Reading Geant4 macro file.");
137 
138  fWrite2ROOT = nullptr;
139 
140 #ifdef __TELESCOPE_SIMULATOR_LX_USE_ROOT__
141  if (!fROOTFile.empty())
142  fWrite2ROOT = new FDsimG4Write2ROOT(fROOTFile);
143 #endif
144 
145  INFO("Initializing FDsimG4");
146 
147  fG4RunManager = new G4RunManager();
148 
149  FDsimG4DetectorConstruction* const myDetector =
150  new FDsimG4DetectorConstruction("CO1", fXMLManager);
151  myDetector->SetVerbosityLevel(fVerbosityLevel);
152  fG4RunManager->SetUserInitialization(myDetector);
153  fG4RunManager->SetUserInitialization(new FDsimG4PhysicsList);
154 
156  fG4RunManager->SetUserAction(fG4PrimGenAct);
157 
158  fG4PrimGenAct->SetUseGeneralParticleSource(fG4Standalone);
159 
160  if (fWrite2ROOT)
161  fG4EventAction = new FDsimG4EventAction(fWrite2ROOT);
162  else
163  fG4EventAction = new FDsimG4EventAction();
164 
165  fG4RunManager->SetUserAction(fG4EventAction);
166 
167  FDsimG4VisExecutive* const visManager = new FDsimG4VisExecutive();
168  visManager->Initialize();
169 
170  // Initialize G4 kernel
171  fG4RunManager->Initialize();
172 
173  // Get the Pointer to the UI Manager
174  fG4UImanager = G4UImanager::GetUIpointer();
175 
176  /* --------------------------------------------------- the model
177  config signature
178  */
179 //#warning This is purposely hardcoded to 'TelescopeSimulatorKG' in order to allow the approximate calibration of the raytracing. TelescopeSimulatorLX is not to be used in any real simulation production nor physical analysis like this.
180  fGeneralConfigSignature = "TelescopeSimulatorKG";
181 
182  return eSuccess;
183 }
184 
185 
188 {
189  if (fG4Standalone && !event.HasFEvent())
190  event.MakeFEvent();
191 
192  if (fG4Standalone) {
193 
194  fevt::FEvent& fEvent = event.GetFEvent();
195  Detector& detector = Detector::GetInstance();
196 
197  const FDetector& detFD = detector.GetFDetector();
198 
199  const TimeStamp& simTime = detector.GetTime();
200 
201  // set the FD event times
202  fEvent.GetHeader().SetTime(simTime);
203  event.GetHeader().SetTime(simTime);
204  event.GetHeader().SetId("");
205 
206  for (FDetector::EyeIterator itEye = detFD.EyesBegin();
207  itEye != detFD.EyesEnd(); ++itEye) {
208 
209  const int eyeId = itEye->GetId();
210 
211  if (!event.GetFEvent().HasEye(eyeId))
212  event.GetFEvent().MakeEye(eyeId);
213 
214  fevt::Eye& eyeEvent = event.GetFEvent().GetEye(eyeId);
215 
216  for (Eye::TelescopeIterator itTel = itEye->TelescopesBegin();
217  itTel != itEye->TelescopesEnd(); ++itTel) {
218 
219  const int telId = itTel->GetId();
220 
221  if (!eyeEvent.HasTelescope(telId))
222  eyeEvent.MakeTelescope(telId);
223  if (!eyeEvent.GetTelescope(telId).HasSimData())
224  eyeEvent.GetTelescope(telId).MakeSimData();
225 
226  fevt::Telescope& telData = eyeEvent.GetTelescope(telId);
227 
228  fevt::TelescopeSimData& telSim = telData.GetSimData();
229  telSim.SetPhotonsStartTime(simTime);
230 
231  const unsigned int telTraceNBins = 1000;
232  telSim.SetNumberOfPhotonBins(telTraceNBins);
233 
234  }
235 
236  }
237 
238  }
239 
240  //
241 
242  if (!event.HasFEvent()) {
243  ERROR("Event has no FEvent.");
244  return eFailure;
245  }
246  fevt::FEvent& fEvent = event.GetFEvent();
247 
248  if (!event.HasSimShower()) {
249  /* In drum mode the handling of photons is different from normal mode.
250  While normaly photons are tracked with a weight, in drum mode photons are tracked
251  as physical objects that can only get absorbed - or not. */
252  fDrumMode = true;
253  if (fWeightFactor != 1) {
254  ERROR("Photon weight-factor was not 1. Reseting!");
255  fWeightFactor = 1;
256  }
257  }
258 
259  const Detector& detector = Detector::GetInstance();
260  const FDetector& detFD = detector.GetFDetector();
261 
262  //
263 
265  iEye != fEvent.EyesEnd(fevt::ComponentSelector::eInDAQ); ++iEye) {
266 
267  if (iEye->GetStatus() == fevt::ComponentSelector::eDeSelected)
268  continue;
269 
270  const unsigned int eyeId = iEye->GetId();
271  fevt::Eye& eyeEvent = *iEye;
272 
274  iTel != eyeEvent.TelescopesEnd(fevt::ComponentSelector::eInDAQ); ++iTel) {
275 
276  Reset();
277 
278  const unsigned int telId = iTel->GetId();
279  fevt::Telescope& telEvent = *iTel;
280  const fdet::Telescope& detTel = detFD.GetTelescope(telEvent);
281 
282  const CoordinateSystemPtr& telCS = detTel.GetTelescopeCoordinateSystem();
283 
284 #ifdef __TELESCOPE_SIMULATOR_LX_USE_ROOT__
285  const fdet::Eye& detEye = detFD.GetEye(*iEye);
286  const CoordinateSystemPtr& eyeCS = detEye.GetEyeCoordinateSystem();
287  if (fWrite2ROOT) {
288  fWrite2ROOT->SetTelCS(telCS);
289  fWrite2ROOT->SetEyeCS(eyeCS);
290  }
291 #endif
292 
293  if (fVerbosityLevel > 0) {
294  ostringstream info;
295  info << "Raytracing eye=" << eyeId << ", "
296  "telescope=" << telId << ", "
297  "rDia=" << setw(6) << detTel.GetDiaphragmRadius();
298  INFO(info);
299  }
300 
301  if (!fG4MacroFile.empty()) {
302  const std::string command = "/control/execute ";
303  fG4UImanager->ApplyCommand(command + fG4MacroFile);
304  }
305 
306  if (!fG4Standalone) {
307 
308  fevt::TelescopeSimData& telSim = telEvent.GetSimData();
309  telSim.SetConfigSignatureStr(detTel.GetConfigSignatureStr(fGeneralConfigSignature));
310 
311  const int nPhotons = telSim.GetNPhotons();
312  if (!nPhotons)
313  continue;
314 
315  if (fVerbosityLevel > 0) {
316  ostringstream info;
317  info << "Raytracing nPhotons=" << nPhotons;
318  INFO(info);
319  }
320 
321  FDsimG4StoreOpticalHit* g4Photon = nullptr;
322 
323  const double minWl = detFD.GetModelMinWavelength();
324  const double maxWl = detFD.GetModelMaxWavelength();
325 
327  iPhoton != telSim.PhotonsEnd(); ++iPhoton) {
328 
329  const double wavelength = iPhoton->GetWavelength();
330 
331  if (wavelength < minWl || wavelength > maxWl)
332  continue;
333 
334  utl::Photon photonIn = *iPhoton;
335 
336  g4Photon = new FDsimG4StoreOpticalHit();
337 
338  const auto wl = photonIn.GetWavelength();
339  g4Photon->SetEnergy(utl::kPlanck * utl::kSpeedOfLight / wl / utl::eV);
340  g4Photon->SetWavelength(wl / utl::nanometer);
341  g4Photon->SetTime(photonIn.GetTime().GetInterval() / utl::ns);
342 
343  const auto& pos = photonIn.GetPosition();
344  g4Photon->SetPosX(pos.GetX(telCS) / utl::m);
345  g4Photon->SetPosY(pos.GetY(telCS) / utl::m);
346  g4Photon->SetPosZ(pos.GetZ(telCS) / utl::m);
347 
348  const auto& dir = photonIn.GetDirection();
349  g4Photon->SetDirX(dir.GetX(telCS));
350  g4Photon->SetDirY(dir.GetY(telCS));
351  g4Photon->SetDirZ(dir.GetZ(telCS));
352 
353  g4Photon->SetWeight(photonIn.GetWeight());
354 
355  fG4Photons.push_back(g4Photon);
356 
357  }
358 
359  const int nPhot = fG4Photons.size();
360 
361  ostringstream info;
362  info << "Processing " << nPhot << " photons...";
363  INFO(info);
364 
365  fG4PhotonsIter = fG4Photons.begin();
366 
367  fG4RunManager->BeamOn(nPhot);
368 
369  }
370 
371  FillTraces(iEye, iTel);
372 
373  }
374 
375  }
376 
377  return eSuccess;
378 }
379 
380 
383 {
384  if (fG4RunManager)
385  delete fG4RunManager ;
386 
387  G4VVisManager * visManager = G4VVisManager::GetConcreteInstance();
388  if (visManager)
389  delete visManager;
390 
391  cout << "Vis manager deleted." << endl;
392 
393  if (fG4EventAction)
394  fG4EventAction = NULL;
395 
396 #ifdef __TELESCOPE_SIMULATOR_LX_USE_ROOT__
397  if (fWrite2ROOT){
398  fWrite2ROOT->SaveAndClose();
399  delete fWrite2ROOT;
400  fWrite2ROOT = NULL;
401  }
402 #endif
403 
404  return eSuccess;
405 }
406 
407 
410 {
411  FDsimG4StoreOpticalHit* const g4Phot = *fG4PhotonsIter;
412  ++fG4PhotonsIter;
413  return g4Phot;
414 }
415 
416 
417 void
419 {
420  fG4PixelHits.push_back(g4PixelHit);
421 }
422 
423 
424 void
426 {
427  // CBT Reset here vectors
428  for (const auto p : fG4Photons)
429  delete p;
430 
431  fG4Photons.clear();
432  fG4PixelHits.clear();
433 }
434 
435 
436 void
438  const fevt::Eye::TelescopeIterator& iTel)
439 {
440  Detector& detector = Detector::GetInstance();
441  const FDetector& detFD = detector.GetFDetector();
442 
443  const unsigned int eyeId = iEye->GetId();
444 
445  const unsigned int telId = iTel->GetId();
446  fevt::Telescope& telEvent = *iTel;
447  const fdet::Telescope& detTel = detFD.GetTelescope(telEvent);
448 
449  const TabulatedFunction& telMeasEfficiency = detTel.GetMeasuredRelativeEfficiency();
450 
451  fevt::TelescopeSimData& telSim = telEvent.GetSimData();
452 
453  const double normWavelength = detFD.GetReferenceLambda();
454 
455  const fdet::Camera& detCamera = detTel.GetCamera();
456  const unsigned int telTraceNBins = telSim.GetNumberOfPhotonBins();
457  const double telTraceBinWidth = detCamera.GetFADCBinSize();
458 
459  map<int, TraceD*> traces;
460 
461  FDsimG4StoreOpticalHit pixelHit;
462 
463  const double minWl = detFD.GetModelMinWavelength();
464  const double maxWl = detFD.GetModelMaxWavelength();
465 
466  for (const auto& pixelHit : fG4PixelHits) {
467 
468  const unsigned int pxlId = pixelHit.GetPMTid();
469  const double wavelength = pixelHit.GetWavelength() * utl::nanometer;
470  const double time = pixelHit.GetTime() * utl::ns;
471  const double weight = pixelHit.GetWeight();
472 
473  if (fVerbosityLevel > 1)
474  pixelHit.Print();
475 
476  if (wavelength < minWl || wavelength > maxWl)
477  continue;
478 
479  const int col = (pxlId - 1) / 22 + 1;
480  const int row = pxlId - 22*(col - 1) ;
481 
482  if (pxlId < detTel.GetFirstPixelId() || pxlId > detTel.GetLastPixelId()) {
483  ostringstream err;
484  err << " Pixel Id=" << pxlId << " does not exists on camera!"
485  << " col=" << col << " row=" << row;
486  ERROR(err);
487  continue;
488  }
489 
490  const fdet::Pixel& detPix = detTel.GetPixel(pxlId);
491  const TabulatedFunction& qEff = detPix.GetQEfficiency();
492 
493  if (wavelength < qEff[0].X() || wavelength > qEff[qEff.GetNPoints()-1].X())
494  continue;
495 
496  // !! this factor is to achive consistency to reconstruction !!
497  double efficiencyCorrection = 0;
498  if (!fDrumMode) {
499  const double modelRelEff = detTel.GetModelRelativeEfficiency(wavelength);
500  if (modelRelEff)
501  efficiencyCorrection = telMeasEfficiency.Y(wavelength) / modelRelEff;
502  }
503 
504  const int bin = int(time / telTraceBinWidth);
505 
506  if (fVerbosityLevel > 1) {
507  cerr << " bin=" << setw(4) << bin
508  << " time=" << setw(6) << time/utl::ns
509  << " weight=" << setw(4) << weight
510  << " wl=" << setw(4) << wavelength/utl::nanometer
511  << " col=" << setw(3) << col
512  << " row=" << setw(3) << row
513  << " pixelId=" << setw(3) << pxlId
514  << " telTraceBinWidth=" << setw(3) << telTraceBinWidth
515  << " telTraceNBins=" << setw(5) << telTraceNBins
516  << " EQ=" << qEff.Y(wavelength)/qEff.Y(normWavelength)
517  << " EC=" << efficiencyCorrection
518  << endl;
519  }
520 
521  if (bin < 0 || bin >= int(telTraceNBins)) {
522 
523  if (fVerbosityLevel > 2) {
524  ostringstream err;
525  err << "Bin out of range. bin=" << bin
526  << " weight=" << weight << "telTraceNBins= " << telTraceNBins;
527  ERROR(err);
528  }
529 
530  continue;
531  }
532 
533  // create pixels trace if not there yet
534  if (!traces.count(pxlId)) {
535 
536  if (!telEvent.HasPixel(pxlId))
537  telEvent.MakePixel(pxlId);
538 
539  fevt::Pixel& pixData = telEvent.GetPixel(pxlId);
540 
541  if (!pixData.HasSimData())
542  pixData.MakeSimData();
543 
544  fevt::PixelSimData& pixSimData = pixData.GetSimData();
545 
546  if (!pixSimData.HasPhotonTrace(fevt::FdConstants::eTotal))
547  pixSimData.MakePhotonTrace(telTraceNBins, telTraceBinWidth, fevt::FdConstants::eTotal);
548 
549  traces[pxlId] = &pixSimData.GetPhotonTrace(fevt::FdConstants::eTotal);
550  }
551 
552  // add to pixel's trace
553  (*traces[pxlId])[bin] +=
554  (fDrumMode ? 1 : (weight * fWeightFactor
555  * qEff.Y(wavelength) / qEff.Y(normWavelength)
556  * efficiencyCorrection));
557 
558  }
559 
560  if (fVerbosityLevel > 2) {
561  // Output pixels with signal
562  for (auto iTrace = traces.begin(); iTrace != traces.end(); ++iTrace) {
563 
564  const int pxlId = iTrace->first;
565 
566  const int col = (pxlId - 1) / 22 + 1; // (col-1)*22 + row;
567  const int row = (pxlId - 1) % 22 + 1;
568 
569  cerr << "eyeId=" << eyeId << " telId=" << telId << " pixelId=" << pxlId << " "
570  "col=" << col << " row=" << row << " trace:";
571 
572  double signal = 0;
573  for (unsigned int i = 0; i < telTraceNBins; ++i) {
574 
575  if (fVerbosityLevel > 3 && (*iTrace->second)[i]) {
576  cerr << " i: " << i << " val: " << (*iTrace->second)[i]
577  << " |";
578  }
579  signal += (*iTrace->second)[i];
580  }
581 
582  cerr << " total signal " << signal << endl;
583 
584  }
585  }
586 }
Telescope & GetTelescope(const unsigned int telescopeId, const ComponentSelector::Status status=ComponentSelector::eHasData)
Retrieve Telescope by Id, throw exception if not existent.
Definition: FEvent/Eye.cc:57
Branch GetTopBranch() const
Definition: Branch.cc:63
double GetModelRelativeEfficiency(const double wl) const
unsigned int GetId() const
Definition: FEvent/Eye.h:54
unsigned int GetNPoints() const
double GetFADCBinSize() const
constexpr double eV
Definition: AugerUnits.h:185
constexpr double kPlanck
Header & GetHeader()
Definition: FEvent.h:92
int GetNumberOfPhotonBins() const
Fluorescence Detector Eye Event.
Definition: FEvent/Eye.h:29
bool HasFEvent() const
unsigned int GetFirstPixelId() const
utl::TimeStamp GetTime() const
Get time pertaining to the detector description.
Definition: Detector.h:134
Class to hold collection (x,y) points and provide interpolation between them.
bool HasSimShower() const
EyeIterator EyesEnd(const ComponentSelector::Status status)
Definition: FEvent.h:66
double GetDiaphragmRadius() const
double GetMeasuredRelativeEfficiency(const double wl) const
#define INFO(message)
Macro for logging informational messages.
Definition: ErrorLogger.h:161
double GetWeight() const
weight assigned to the photon
Definition: Photon.h:21
double GetModelMinWavelength() const
Definition: FDetector.cc:291
PixelSimData & GetSimData()
Definition: FEvent/Pixel.h:35
void MakeEye(const unsigned int eyeId, const ComponentSelector::Status status=ComponentSelector::eHasData)
Definition: FEvent.cc:115
fwk::VModule::ResultFlag Run(evt::Event &event) override
Run: invoked once per event.
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
boost::filter_iterator< ComponentSelector, AllEyeIterator > EyeIterator
selective Eye iterators
Definition: FEvent.h:55
const std::string & GetConfigSignatureStr(const std::string &module) const
Branch GetChild(const std::string &childName) const
Get child of this Branch by child name.
Definition: Branch.cc:211
bool HasPhotonTrace(const FdConstants::LightSource source) const
Check that trace for source /par source is present.
Definition: PixelSimData.h:51
void MakeTelescope(const unsigned int telescopeId, const ComponentSelector::Status status=ComponentSelector::eHasData)
Make Telescope telescopeId.
Definition: FEvent/Eye.cc:102
void MakeSimData()
Definition: FEvent/Pixel.cc:10
PhotonIterator PhotonsEnd()
const Camera & GetCamera() const
Get the Camera object that belongs to the telescope.
Detector description interface for FDetector-related data.
Definition: FDetector.h:44
A TimeStamp holds GPS second and nanosecond for some event.
Definition: TimeStamp.h:110
constexpr double nanometer
Definition: AugerUnits.h:102
const Pixel & GetPixel(const unsigned int pixelId) const
Get Pixel by id, throw utl::NonExistentComponentException if n.a.
void SetPhotonsStartTime(const utl::TimeStamp &ts)
void FillTraces(const fevt::FEvent::EyeIterator &eIt, const fevt::Eye::TelescopeIterator &tIt)
void SetConfigSignatureStr(const std::string &configSignatureStr)
boost::shared_ptr< const CoordinateTransformer > CoordinateSystemPtr
Shared pointer for coordinate systems.
void MakePixel(const unsigned int pixelId, const ComponentSelector::Status status=ComponentSelector::eHasData)
Make Pixel telescopeId.
bool HasPixel(const unsigned int pixelId, const ComponentSelector::Status status=ComponentSelector::eHasData) const
Check if the pixel is in the event.
fevt::TelescopeSimData & GetSimData()
Description of simulated data for one Telescope.
Class representing a document branch.
Definition: Branch.h:107
unsigned int GetLastPixelId() const
utl::CoordinateSystemPtr GetTelescopeCoordinateSystem() const
void SetTime(const utl::TimeStamp &time)
Definition: FEvent/Header.h:29
boost::filter_iterator< FDetComponentSelector, AllEyeIterator > EyeIterator
Definition: FDetector.h:69
Fluorescence Detector Pixel event.
Definition: FEvent/Pixel.h:28
const utl::TabulatedFunction & GetQEfficiency() const
Average quantum efficiency as a function of the wavelength.
double GetModelMaxWavelength() const
Definition: FDetector.cc:312
utl::CoordinateSystemPtr GetEyeCoordinateSystem() const
Returns the Eye Coordinate system.
TelescopeIterator TelescopesEnd()
first available tel of status eHasData (DEPRECATED)
Definition: FEvent/Eye.cc:230
Top of the hierarchy of the detector description interface.
Definition: Detector.h:81
EyeIterator EyesBegin(const ComponentSelector::Status status)
Definition: FEvent.h:58
const fdet::FDetector & GetFDetector() const
Definition: Detector.cc:131
bool HasSimData() const
Definition: FEvent/Pixel.h:38
boost::filter_iterator< ComponentSelector, AllTelescopeIterator > TelescopeIterator
selective Telescope iterators
Definition: FEvent/Eye.h:72
void GetData(bool &b) const
Overloads of the GetData member template function.
Definition: Branch.cc:644
void SetG4PixelHit(const FDsimG4StoreOpticalHit &g4PixelHit)
Top of Fluorescence Detector event hierarchy.
Definition: FEvent.h:33
std::list< utl::Photon >::iterator PhotonIterator
TelescopeIterator TelescopesBegin()
first available tel of status eHasData (DEPRECATED)
Definition: FEvent/Eye.cc:207
double GetInterval() const
Get the time interval as a double (in Auger base units)
Definition: TimeInterval.h:69
double GetReferenceLambda() const
Definition: FDetector.cc:332
boost::filter_iterator< TelIsCommissioned, InternalConstTelescopeIterator > TelescopeIterator
An iterator over telescopes.
Definition: FDetector/Eye.h:76
const utl::Vector & GetDirection() const
Definition: Photon.h:26
fevt::FEvent & GetFEvent()
fwk::VModule::ResultFlag Init() override
Initialize: invoked at beginning of run (NOT beginning of event)
Pixel & GetPixel(const unsigned int pixelId, const ComponentSelector::Status status=ComponentSelector::eHasData)
Retrieve Pixel by Id, throw exception if not existent.
Manager for specific FD description parameters in XML file.
bool HasEye(const unsigned int eyeId, const ComponentSelector::Status status=ComponentSelector::eHasData) const
Definition: FEvent.cc:57
constexpr double kSpeedOfLight
Detector description interface for Telescope-related data.
ResultFlag
Flag returned by module methods to the RunController.
Definition: VModule.h:60
const Telescope & GetTelescope(const fevt::Telescope &eventTel) const
Get fdet::Telescope from fevt::Telescope.
Definition: FDetector.cc:150
PhotonIterator PhotonsBegin()
bool HasTelescope(const unsigned int telescopeId, const ComponentSelector::Status status=ComponentSelector::eHasData) const
Check if the telescope is in the event.
Definition: FEvent/Eye.cc:117
Description of a pixel.
utl::TraceD & GetPhotonTrace(const FdConstants::LightSource source=FdConstants::eTotal)
Simulated Photon Trace.
Definition: PixelSimData.h:37
constexpr double ns
Definition: AugerUnits.h:162
fwk::VModule::ResultFlag Finish() override
Finish: invoked at end of the run (NOT end of the event)
Fluorescence Detector Telescope Event.
double GetWavelength() const
Definition: Photon.h:27
double Y(const double x) const
Get or interpolate the Y value that corresponds to parameter x.
void SetNumberOfPhotonBins(const int n)
#define ERROR(message)
Macro for logging error messages.
Definition: ErrorLogger.h:165
constexpr double m
Definition: AugerUnits.h:121
utl::TimeInterval GetTime() const
Definition: Photon.h:28
bool HasSimData() const
Fluorescence Detector Pixel Simulated Data.
Definition: PixelSimData.h:28
Description of a camera.
void MakePhotonTrace(unsigned int size, double binning, const FdConstants::LightSource source=FdConstants::eTotal)
Definition: PixelSimData.cc:31
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
const utl::Point & GetPosition() const
Definition: Photon.h:25

, generated on Tue Sep 26 2023.