Belle II Software  release-05-01-25
TOPPmtQE.h
1 /**************************************************************************
2  * BASF2 (Belle Analysis Framework 2) *
3  * Copyright(C) 2016 - Belle II Collaboration *
4  * *
5  * Author: The Belle II Collaboration *
6  * Contributors: Marko Staric, Alessandro Gaz *
7  * *
8  * This software is provided "as is" without any warranty. *
9  **************************************************************************/
10 
11 #pragma once
12 
13 #include <TObject.h>
14 #include <vector>
15 
16 namespace Belle2 {
25  class TOPPmtQE : public TObject {
26  public:
30  enum {c_NumPmtPixels = 16};
31 
35  TOPPmtQE()
36  {}
37 
46  TOPPmtQE(const std::string& serialNumber,
47  float lambdaFirst, float lambdaStep, float CE0, float CE):
48  m_serialNumber(serialNumber), m_lambdaFirst(lambdaFirst), m_lambdaStep(lambdaStep),
49  m_CE_noB(CE0), m_CE_withB(CE)
50  {}
51 
57  void setQE(unsigned pmtPixel, const std::vector<float>& qe)
58  {
59  pmtPixel--;
60  if (pmtPixel < c_NumPmtPixels) m_QE[pmtPixel] = qe;
61  }
62 
67  const std::string& getSerialNumber() const {return m_serialNumber;}
68 
74  const std::vector<float>& getQE(unsigned pmtPixel) const;
75 
83  double getQE(unsigned pmtPixel, double lambda) const;
84 
89  const std::vector<float>& getEnvelopeQE() const;
90 
97  double getEnvelopeQE(double lambda) const;
98 
107  double getEfficiency(unsigned pmtPixel, double lambda, bool BfieldOn) const;
108 
113  double getLambdaFirst() const {return m_lambdaFirst;}
114 
119  double getLambdaLast() const;
120 
126  double getLambdaLast(unsigned pmtPixel) const;
127 
132  double getLambdaStep() const {return m_lambdaStep;}
133 
139  double getCE(bool BfieldOn) const;
140 
141 
142  private:
143 
147  void setEnvelopeQE() const;
148 
155  double interpolate(double lambda, const std::vector<float>& QE) const;
156 
157  std::string m_serialNumber;
158  std::vector<float> m_QE[c_NumPmtPixels];
159  float m_lambdaFirst = 0;
160  float m_lambdaStep = 0;
161  float m_CE_noB = 0;
162  float m_CE_withB = 0;
165  mutable std::vector<float> m_envelopeQE;
166 
169  };
170 
172 } // end namespace Belle2
173 
174 
Belle2::TOPPmtQE::getCE
double getCE(bool BfieldOn) const
Returns collection efficiency.
Definition: TOPPmtQE.cc:61
Belle2::TOPPmtQE::m_lambdaStep
float m_lambdaStep
wavelength step [nm]
Definition: TOPPmtQE.h:168
Belle2::TOPPmtQE::m_serialNumber
std::string m_serialNumber
serial number, e.g.
Definition: TOPPmtQE.h:165
Belle2::TOPPmtQE::m_lambdaFirst
float m_lambdaFirst
wavelength of the first data point [nm]
Definition: TOPPmtQE.h:167
Belle2::TOPPmtQE::interpolate
double interpolate(double lambda, const std::vector< float > &QE) const
Interpolate between QE datapoints (linear interpolation).
Definition: TOPPmtQE.cc:107
Belle2::TOPPmtQE::m_QE
std::vector< float > m_QE[c_NumPmtPixels]
QE data points.
Definition: TOPPmtQE.h:166
Belle2::TOPPmtQE::getLambdaLast
double getLambdaLast() const
Returns wavelenght of the last data point (maximal of pixels)
Definition: TOPPmtQE.cc:70
Belle2::TOPPmtQE::getEfficiency
double getEfficiency(unsigned pmtPixel, double lambda, bool BfieldOn) const
Returns quantum times collection efficiency for a given pixel and wavelength, using linear interpolat...
Definition: TOPPmtQE.cc:52
Belle2::TOPPmtQE
Nagoya measurements of quantum efficiency.
Definition: TOPPmtQE.h:33
Belle2
Abstract base class for different kinds of events.
Definition: MillepedeAlgorithm.h:19
Belle2::TOPPmtQE::getQE
const std::vector< float > & getQE(unsigned pmtPixel) const
Returns quantum efficiency data points for a given pixel.
Definition: TOPPmtQE.cc:23
Belle2::TOPPmtQE::setQE
void setQE(unsigned pmtPixel, const std::vector< float > &qe)
Set quantum efficiency data points for a given pmtPixel.
Definition: TOPPmtQE.h:65
Belle2::TOPPmtQE::ClassDef
ClassDef(TOPPmtQE, 3)
don't write out
Belle2::TOPPmtQE::getSerialNumber
const std::string & getSerialNumber() const
Returns PMT serial number.
Definition: TOPPmtQE.h:75
Belle2::TOPPmtQE::m_envelopeQE
std::vector< float > m_envelopeQE
cache for envelope QE
Definition: TOPPmtQE.h:173
Belle2::TOPPmtQE::setEnvelopeQE
void setEnvelopeQE() const
Sets envelope quantum efficiency.
Definition: TOPPmtQE.cc:89
Belle2::TOPPmtQE::getLambdaStep
double getLambdaStep() const
Returns wavelenght step.
Definition: TOPPmtQE.h:140
Belle2::TOPPmtQE::m_CE_withB
float m_CE_withB
relative collection efficiency, with B field
Definition: TOPPmtQE.h:170
Belle2::TOPPmtQE::getEnvelopeQE
const std::vector< float > & getEnvelopeQE() const
Returns envelope quantum efficiency data points (maximum over pixels)
Definition: TOPPmtQE.cc:40
Belle2::TOPPmtQE::TOPPmtQE
TOPPmtQE()
Default constructor.
Definition: TOPPmtQE.h:43
Belle2::TOPPmtQE::getLambdaFirst
double getLambdaFirst() const
Returns wavelenght of the first data point.
Definition: TOPPmtQE.h:121
Belle2::TOPPmtQE::m_CE_noB
float m_CE_noB
relative collection efficiency, without B field
Definition: TOPPmtQE.h:169