Belle II Software  release-08-01-10
ARICHAerogelInfo.cc
1 /**************************************************************************
2  * basf2 (Belle II Analysis Software Framework) *
3  * Author: The Belle II Collaboration *
4  * *
5  * See git log for contributors and copyright holders. *
6  * This file is licensed under LGPL-3.0, see LICENSE.md. *
7  **************************************************************************/
8 
9 #include <arich/dbobjects/ARICHAerogelInfo.h>
10 #include <framework/logging/Logger.h>
11 
12 using namespace Belle2;
13 using namespace std;
14 
16 {
17  if (lambda < c_lambdaMin || lambda > c_lambdaMax) {
18  B2INFO("lambda not in right interval!");
19  return -1;
20  }
21  int index = (int) round((lambda - c_lambdaMin) / c_lambdaStep);
22  return m_transmittance[index];
23 }
24 
25 
26 void ARICHAerogelInfo::setAerogelTransmittanceElement(int lambda, float transmittance)
27 {
28  if (lambda < c_lambdaMin || lambda > c_lambdaMax) {
29  B2INFO("lambda not in right interval!");
30  }
31  int index = (int) round((lambda - c_lambdaMin) / c_lambdaStep);
32  m_transmittance[index] = transmittance;
33 }
34 
35 
36 void ARICHAerogelInfo::setAerogelTransmittance(std::vector<float> transmittance)
37 {
38  for (unsigned int i = 0; i < transmittance.size(); i++) m_transmittance.push_back(transmittance[i]);
39 }
40 
41 
42 void ARICHAerogelInfo::setAerogelTransmittanceLambda(std::vector<float> lambda)
43 {
44  for (unsigned int i = 0; i < lambda.size(); i++) m_lambda.push_back(lambda[i]);
45 }
46 
47 
float getAerogelTransmittanceElement(int lambda) const
Return Aerogel Transmittance at lambda.
void setAerogelTransmittanceLambda(std::vector< float > lambda)
Set Lambda for Aerogel Transmittance.
void setAerogelTransmittance(std::vector< float > transmittance)
Set Aerogel Transmittance.
void setAerogelTransmittanceElement(int lambda, float transmittance)
Set Aerogel Transmittance at lambda.
Abstract base class for different kinds of events.