9#include <top/dbobjects/TOPPmtQE.h>
10#include <framework/logging/Logger.h>
24 if (pmtPixel < c_NumPmtPixels)
return m_QE[pmtPixel];
26 B2ERROR(
"TOPPmtQE::getQE: invalid pixel ID, returning empty vector");
34 if (pmtPixel < c_NumPmtPixels)
return interpolate(lambda,
m_QE[pmtPixel]);
71 for (
unsigned pixel = 0; pixel < c_NumPmtPixels; pixel++) {
72 const auto& QE =
m_QE[pixel];
73 size = std::max(size, QE.size());
81 if (pmtPixel < c_NumPmtPixels) {
92 for (
unsigned pixel = 0; pixel < c_NumPmtPixels; pixel++) {
93 const auto& QE =
m_QE[pixel];
94 size = std::max(size, QE.size());
97 for (
unsigned pixel = 0; pixel < c_NumPmtPixels; pixel++) {
98 const auto& QE =
m_QE[pixel];
99 for (
size_t i = 0; i < QE.size(); i++) {
108 if (dlam < 0 or dlam > (QE.size() - 1) *
m_lambdaStep)
return 0;
110 if (i > QE.size() - 2)
return QE.back();
float m_CE_withB
relative collection efficiency, with B field
float m_CE_noB
relative collection efficiency, without B field
float m_lambdaStep
wavelength step [nm]
std::vector< float > m_envelopeQE
cache for envelope QE
float m_lambdaFirst
wavelength of the first data point [nm]
std::vector< float > m_QE[c_NumPmtPixels]
QE data points.
double getEfficiency(unsigned pmtPixel, double lambda, bool BfieldOn) const
Returns quantum times collection efficiency for a given pixel and wavelength, using linear interpolat...
const std::vector< float > & getEnvelopeQE() const
Returns envelope quantum efficiency data points (maximum over pixels)
const std::vector< float > & getQE(unsigned pmtPixel) const
Returns quantum efficiency data points for a given pixel.
double getCE(bool BfieldOn) const
Returns collection efficiency.
double getLambdaLast() const
Returns wavelenght of the last data point (maximal of pixels)
double interpolate(double lambda, const std::vector< float > &QE) const
Interpolate between QE datapoints (linear interpolation).
void setEnvelopeQE() const
Sets envelope quantum efficiency.
Abstract base class for different kinds of events.