Belle II Software development
TOPPmtGainPar Class Reference

Parameterized PMT gain (from laser testing at Nagoya) More...

#include <TOPPmtGainPar.h>

Inheritance diagram for TOPPmtGainPar:

Public Types

enum  { c_NumPmtPixels = 16 }
 number of PMT pixels More...
 

Public Member Functions

 TOPPmtGainPar ()
 Default constructor.
 
 TOPPmtGainPar (const std::string &serialNumber)
 Useful constructor.
 
void setPmtPixelData (unsigned pmtPixel, double constant, double slope, double ratio)
 Sets the data for a given PMT pmtPixel.
 
void setNominalHV0 (float HV)
 Sets the high voltage at gain of 5x10^5, without B field.
 
void setNominalHV (float HV)
 Sets the high voltage at gain of 5x10^5, with B field.
 
const std::string & getSerialNumber () const
 Returns PMT serial number.
 
double getConstant (unsigned pmtPixel) const
 Returns constant of the gain vs HV fitting function.
 
double getSlope (unsigned pmtPixel) const
 Returns slope of the gain vs HV fitting function.
 
double getRatio (unsigned pmtPixel) const
 Returns ratio of gains between 1.5T and 0T.
 
float getNominalHV0 () const
 Returns nominal HV (corresponding to a gain of 5x10^5 at B = 0)
 
float getNominalHV () const
 Returns nominal HV (corresponding to a gain of 5x10^5 at B = 1.5T)
 
double getGain0 (unsigned pmtPixel, double HV) const
 Returns pmtPixel gain at B = 0 for a given high voltage.
 
double getGain (unsigned pmtPixel, float HV) const
 Returns pmtPixel gain at B = 1.5 T for a given high voltage.
 
void print () const
 Print the class content.
 

Private Member Functions

 ClassDef (TOPPmtGainPar, 3)
 ClassDef.
 

Private Attributes

std::string m_serialNumber
 serial number, e.g.
 
float m_constant [c_NumPmtPixels] = {0}
 constant
 
float m_slope [c_NumPmtPixels] = {0}
 slope
 
float m_ratio [c_NumPmtPixels] = {0}
 ratio of gains at B = 1.5 T and B = 0
 
float m_HV_noB = 0
 high voltage for the gain of 5x10^5, no B field
 
float m_HV_withB = 0
 high voltage for the gain of 5x10^5, with B field
 

Detailed Description

Parameterized PMT gain (from laser testing at Nagoya)

Definition at line 23 of file TOPPmtGainPar.h.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum

number of PMT pixels

Definition at line 28 of file TOPPmtGainPar.h.

28{c_NumPmtPixels = 16};

Constructor & Destructor Documentation

◆ TOPPmtGainPar() [1/2]

TOPPmtGainPar ( )
inline

Default constructor.

Definition at line 33 of file TOPPmtGainPar.h.

34 {}

◆ TOPPmtGainPar() [2/2]

TOPPmtGainPar ( const std::string &  serialNumber)
inlineexplicit

Useful constructor.

Parameters
serialNumberserial number

Definition at line 40 of file TOPPmtGainPar.h.

40 :
41 m_serialNumber(serialNumber)
42 {}
std::string m_serialNumber
serial number, e.g.

Member Function Documentation

◆ getConstant()

double getConstant ( unsigned  pmtPixel) const
inline

Returns constant of the gain vs HV fitting function.

Parameters
pmtPixelpmtPixel number (1-based)
Returns
constant

Definition at line 83 of file TOPPmtGainPar.h.

84 {
85 pmtPixel--;
86 if (pmtPixel >= c_NumPmtPixels) return 0;
87 return m_constant[pmtPixel];
88 }
float m_constant[c_NumPmtPixels]
constant

◆ getGain()

double getGain ( unsigned  pmtPixel,
float  HV 
) const
inline

Returns pmtPixel gain at B = 1.5 T for a given high voltage.

Parameters
pmtPixelpmtPixel number (1-based)
HVhigh voltage [V]
Returns
gain

Definition at line 145 of file TOPPmtGainPar.h.

146 {
147 return getGain0(pmtPixel, HV) * getRatio(pmtPixel);
148 }
double getRatio(unsigned pmtPixel) const
Returns ratio of gains between 1.5T and 0T.
double getGain0(unsigned pmtPixel, double HV) const
Returns pmtPixel gain at B = 0 for a given high voltage.

◆ getGain0()

double getGain0 ( unsigned  pmtPixel,
double  HV 
) const
inline

Returns pmtPixel gain at B = 0 for a given high voltage.

Parameters
pmtPixelpmtPixel number (1-based)
HVhigh voltage [V]
Returns
gain

Definition at line 132 of file TOPPmtGainPar.h.

133 {
134 pmtPixel--;
135 if (pmtPixel >= c_NumPmtPixels) return 0;
136 return exp(m_constant[pmtPixel] + m_slope[pmtPixel] * HV) * 1.0e6;
137 }
float m_slope[c_NumPmtPixels]
slope

◆ getNominalHV()

float getNominalHV ( ) const
inline

Returns nominal HV (corresponding to a gain of 5x10^5 at B = 1.5T)

Returns
HV in [V]

Definition at line 124 of file TOPPmtGainPar.h.

124{return m_HV_withB;}
float m_HV_withB
high voltage for the gain of 5x10^5, with B field

◆ getNominalHV0()

float getNominalHV0 ( ) const
inline

Returns nominal HV (corresponding to a gain of 5x10^5 at B = 0)

Returns
HV in [V]

Definition at line 118 of file TOPPmtGainPar.h.

118{return m_HV_noB;}
float m_HV_noB
high voltage for the gain of 5x10^5, no B field

◆ getRatio()

double getRatio ( unsigned  pmtPixel) const
inline

Returns ratio of gains between 1.5T and 0T.

Parameters
pmtPixelpmtPixel number (1-based)
Returns
gain ratio

Definition at line 107 of file TOPPmtGainPar.h.

108 {
109 pmtPixel--;
110 if (pmtPixel >= c_NumPmtPixels) return 0;
111 return m_ratio[pmtPixel];
112 }
float m_ratio[c_NumPmtPixels]
ratio of gains at B = 1.5 T and B = 0

◆ getSerialNumber()

const std::string & getSerialNumber ( ) const
inline

Returns PMT serial number.

Returns
serial number

Definition at line 76 of file TOPPmtGainPar.h.

76{return m_serialNumber;}

◆ getSlope()

double getSlope ( unsigned  pmtPixel) const
inline

Returns slope of the gain vs HV fitting function.

Parameters
pmtPixelpmtPixel number (1-based)
Returns
slope

Definition at line 95 of file TOPPmtGainPar.h.

96 {
97 pmtPixel--;
98 if (pmtPixel >= c_NumPmtPixels) return 0;
99 return m_slope[pmtPixel];
100 }

◆ setNominalHV()

void setNominalHV ( float  HV)
inline

Sets the high voltage at gain of 5x10^5, with B field.

Parameters
HVhigh voltage [V]

Definition at line 70 of file TOPPmtGainPar.h.

70{m_HV_withB = HV;}

◆ setNominalHV0()

void setNominalHV0 ( float  HV)
inline

Sets the high voltage at gain of 5x10^5, without B field.

Parameters
HVhigh voltage [V]

Definition at line 64 of file TOPPmtGainPar.h.

64{m_HV_noB = HV;}

◆ setPmtPixelData()

void setPmtPixelData ( unsigned  pmtPixel,
double  constant,
double  slope,
double  ratio 
)
inline

Sets the data for a given PMT pmtPixel.

Parameters
pmtPixelpmtPixel number (1-based)
constantfitting function constant (gain vs HV)
slopefitting function slope (gain vs HV)
ratioratio of gains at B = 1.5 T and B = 0

Definition at line 51 of file TOPPmtGainPar.h.

52 {
53 pmtPixel--;
54 if (pmtPixel >= c_NumPmtPixels) return;
55 m_constant[pmtPixel] = constant;
56 m_slope[pmtPixel] = slope;
57 m_ratio[pmtPixel] = ratio;
58 }

Member Data Documentation

◆ m_constant

float m_constant[c_NumPmtPixels] = {0}
private

constant

Definition at line 159 of file TOPPmtGainPar.h.

◆ m_HV_noB

float m_HV_noB = 0
private

high voltage for the gain of 5x10^5, no B field

Definition at line 162 of file TOPPmtGainPar.h.

◆ m_HV_withB

float m_HV_withB = 0
private

high voltage for the gain of 5x10^5, with B field

Definition at line 163 of file TOPPmtGainPar.h.

◆ m_ratio

float m_ratio[c_NumPmtPixels] = {0}
private

ratio of gains at B = 1.5 T and B = 0

Definition at line 161 of file TOPPmtGainPar.h.

◆ m_serialNumber

std::string m_serialNumber
private

serial number, e.g.

JTxxxx

Definition at line 158 of file TOPPmtGainPar.h.

◆ m_slope

float m_slope[c_NumPmtPixels] = {0}
private

slope

Definition at line 160 of file TOPPmtGainPar.h.


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