Belle II Software  release-05-01-25
TOPWavelengthFilter.h
1 /**************************************************************************
2  * BASF2 (Belle Analysis Framework 2) *
3  * Copyright(C) 2016 - Belle II Collaboration *
4  * *
5  * Author: The Belle II Collaboration *
6  * Contributors: Rikuya Okuto *
7  * *
8  * This software is provided "as is" without any warranty. *
9  **************************************************************************/
10 
11 #pragma once
12 
13 #include <top/dbobjects/TOPGeoBase.h>
14 #include <vector>
15 
16 namespace Belle2 {
25  class TOPWavelengthFilter : public TOPGeoBase {
26  public:
27 
32  {}
33 
41  TOPWavelengthFilter(float lambdaFirst, float lambdaStep,
42  const std::vector<float>& trEffi,
43  const std::string& name = "TOPWavelengthFilter"): TOPGeoBase(name),
44  m_lambdaFirst(lambdaFirst), m_lambdaStep(lambdaStep), m_transmittances(trEffi)
45  {}
46 
51  const std::vector<float>& getBulkTransmittances() const {return m_transmittances;}
52 
58  float getBulkTransmittance(double lambda) const;
59 
64  float getLambdaFirst() const {return m_lambdaFirst;}
65 
70  float getLambdaStep() const {return m_lambdaStep;}
71 
76  bool isConsistent() const override;
77 
82  void print(const std::string& title = "Wavelength filter bulk transmittance") const override;
83 
84 
85  private:
86 
87  float m_lambdaFirst = 0;
88  float m_lambdaStep = 0;
89  std::vector<float> m_transmittances;
93  };
94 
96 } // end namespace Belle2
97 
98 
Belle2::TOPGeoBase
Base class for geometry parameters.
Definition: TOPGeoBase.h:35
Belle2::TOPWavelengthFilter::print
void print(const std::string &title="Wavelength filter bulk transmittance") const override
Print the content of the class.
Definition: TOPWavelengthFilter.cc:47
Belle2::TOPWavelengthFilter::getLambdaFirst
float getLambdaFirst() const
Returns wavelength of the first data point.
Definition: TOPWavelengthFilter.h:72
Belle2::TOPWavelengthFilter::m_lambdaStep
float m_lambdaStep
wavelength step [nm]
Definition: TOPWavelengthFilter.h:96
Belle2::TOPWavelengthFilter::getBulkTransmittance
float getBulkTransmittance(double lambda) const
Returns bulk transmittance at given wavelength using linear interpolation.
Definition: TOPWavelengthFilter.cc:23
Belle2
Abstract base class for different kinds of events.
Definition: MillepedeAlgorithm.h:19
Belle2::TOPWavelengthFilter::isConsistent
bool isConsistent() const override
Check for consistency of data members.
Definition: TOPWavelengthFilter.cc:36
Belle2::TOPWavelengthFilter::getLambdaStep
float getLambdaStep() const
Returns wavelength step.
Definition: TOPWavelengthFilter.h:78
Belle2::TOPWavelengthFilter::getBulkTransmittances
const std::vector< float > & getBulkTransmittances() const
Returns bulk transmittance data points.
Definition: TOPWavelengthFilter.h:59
Belle2::TOPWavelengthFilter::TOPWavelengthFilter
TOPWavelengthFilter()
Default constructor.
Definition: TOPWavelengthFilter.h:39
Belle2::TOPWavelengthFilter::m_lambdaFirst
float m_lambdaFirst
wavelength of the first data point [nm]
Definition: TOPWavelengthFilter.h:95
Belle2::TOPWavelengthFilter::ClassDefOverride
ClassDefOverride(TOPWavelengthFilter, 1)
ClassDef.
Belle2::TOPWavelengthFilter::m_transmittances
std::vector< float > m_transmittances
bulk transmittance data points
Definition: TOPWavelengthFilter.h:97