PixelToApertureLightConverter.cc
Go to the documentation of this file.
1 
11 
12 #include <string>
13 
14 #include <evt/Event.h>
15 #include <fevt/Eye.h>
16 #include <fevt/Telescope.h>
17 #include <fevt/TelescopeSimData.h>
18 #include <fevt/FdComponentSelector.h>
19 
20 #include <fdet/FDetector.h>
21 #include <fdet/Eye.h>
22 #include <fdet/Telescope.h>
23 #include <fdet/Pixel.h>
24 #include <fdet/Channel.h>
25 
26 
27 
28 using namespace FdLightCollectionEfficiencyKG;
29 using namespace std;
30 
31 
32 /*************************************************************************/
34  const fevt::Eye& eye)
35  : fReferenceWl(theFDet.GetReferenceLambda()),
36  fDetEye(theFDet.GetEye(eye.GetId())),
37  fEye(eye),
38  fCurTelId(0),
39  fCurConfigSignature(NULL), fCurTelescope(NULL), fCurPixConverter(NULL)
40 {
41 }
42 
43 
44 /*************************************************************************/
45 double
47  const unsigned int pixId)
48 {
49  if (telId != fCurTelId) { // currently at the wrong id, switch telescope
50  fCurTelId = telId;
55  }
56 
57  // Return calculated conversion factor if known
58  PixelConversionConstantMap::const_iterator pixConvIter = fCurPixConverter->find(pixId);
59  if (pixConvIter != fCurPixConverter->end())
60  return pixConvIter->second;
61 
62  // Calculate and cache new conversion factor
63  const fdet::Pixel& detPixel = fCurTelescope->GetPixel(pixId);
64  const double pixQEff = detPixel.GetQEfficiency().Y(fReferenceWl);
65  const double elecGain = fCurTelescope->GetChannel(detPixel).GetElectronicsGain();
66  const double simCalibConst = detPixel.GetSimulatedEndToEndCalibration(*fCurConfigSignature);
67  const double pixConversion = pixQEff * elecGain * simCalibConst;
68  (*fCurPixConverter)[pixId] = pixConversion;
69 
70  return pixConversion;
71 }
72 
73 // Configure (x)emacs for this file ...
74 // Local Variables:
75 // mode: c++
76 // End:
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
Fluorescence Detector Eye Event.
Definition: FEvent/Eye.h:29
const Channel & GetChannel(const unsigned int channelId) const
Get Channel by id, throw utl::NonExistentComponentException if n.a.
double GetConversionConstant(const unsigned int telId, const unsigned int pixId)
double GetElectronicsGain() const
Detector description interface for FDetector-related data.
Definition: FDetector.h:44
const Pixel & GetPixel(const unsigned int pixelId) const
Get Pixel by id, throw utl::NonExistentComponentException if n.a.
fevt::TelescopeSimData & GetSimData()
const utl::TabulatedFunction & GetQEfficiency() const
Average quantum efficiency as a function of the wavelength.
const Telescope & GetTelescope(const unsigned int telescopeId) const
Find Telescope by numerical Id.
const std::string & GetConfigSignature() const
PixelToApertureLightConverter(const fdet::FDetector &theFDet, const fevt::Eye &eye)
Description of a pixel.
Fluorescence Detector Telescope Event.
double Y(const double x) const
Get or interpolate the Y value that corresponds to parameter x.

, generated on Tue Sep 26 2023.