Belle II Software development
LinearGlobalADCCountTranslator Class Reference

This class simply assumes a linear translation through (0,0) More...

#include <LinearGlobalADCCountTranslator.h>

Inheritance diagram for LinearGlobalADCCountTranslator:
ADCCountTranslatorBase

Public Member Functions

 LinearGlobalADCCountTranslator (const float conversionFactor=3.2 *1e-8)
 Constructor with a default calibration constant.
 
 ~LinearGlobalADCCountTranslator ()
 Destructor.
 
float getCharge (unsigned short adcCount, const WireID &, bool, float, float)
 just multiply with the conversion factor and return.
 

Private Attributes

float m_conversionFactor
 Conversion factor as determined from calibration.
 

Detailed Description

This class simply assumes a linear translation through (0,0)

Definition at line 20 of file LinearGlobalADCCountTranslator.h.

Constructor & Destructor Documentation

◆ LinearGlobalADCCountTranslator()

LinearGlobalADCCountTranslator ( const float  conversionFactor = 3.2 * 1e-8)
inlineexplicit

Constructor with a default calibration constant.

Definition at line 23 of file LinearGlobalADCCountTranslator.h.

23 :
24 m_conversionFactor(conversionFactor)
25 {}
float m_conversionFactor
Conversion factor as determined from calibration.

◆ ~LinearGlobalADCCountTranslator()

Destructor.

Definition at line 28 of file LinearGlobalADCCountTranslator.h.

28{}

Member Function Documentation

◆ getCharge()

float getCharge ( unsigned short  adcCount,
const WireID ,
bool  ,
float  ,
float   
)
inlinevirtual

just multiply with the conversion factor and return.

Implements ADCCountTranslatorBase.

Definition at line 31 of file LinearGlobalADCCountTranslator.h.

35 {
36 // const float EnergyLossOffset = 1.6 * 1e-8; // GeV
37 // return (adcCount * m_conversionFactor + EnergyLossOffset);
38
39 //round-down -> round-up to be consistent with real adc module
40 return (static_cast<float>(adcCount) - 0.5) * m_conversionFactor;
41 }

Member Data Documentation

◆ m_conversionFactor

float m_conversionFactor
private

Conversion factor as determined from calibration.

Definition at line 45 of file LinearGlobalADCCountTranslator.h.


The documentation for this class was generated from the following file: