Belle II Software development
TOPCalChannelRQE Class Reference

Class to store relative quantum efficiency of channels w.r.t initial one measured in PMT QA QE is expected to decrease during the experiment due to aging induced by acuumulated charge. More...

#include <TOPCalChannelRQE.h>

Inheritance diagram for TOPCalChannelRQE:

Public Types

enum  EStatus {
  c_Default = 0 ,
  c_Calibrated = 1 ,
  c_Unusable = 2
}
 Calibration status of a constant. More...
 

Public Member Functions

 TOPCalChannelRQE ()
 Default constructor.
 
void setRQE (int moduleID, unsigned channel, double relQE)
 Sets the relative QE for a single channel and switches status to calibrated.
 
void setUnusable (int moduleID, unsigned channel)
 Switches calibration status to unusable to flag badly calibrated constant.
 
double getRQE (int moduleID, unsigned channel) const
 Returns the relative QE for a single channel (1.0 if status is c_Default)
 
bool isCalibrated (int moduleID, unsigned channel) const
 Returns calibration status.
 
bool isDefault (int moduleID, unsigned channel) const
 Returns calibration status.
 
bool isUnusable (int moduleID, unsigned channel) const
 Returns calibration status.
 

Private Types

enum  {
  c_numModules = 16 ,
  c_numChannels = 512
}
 Sizes. More...
 

Private Member Functions

 ClassDef (TOPCalChannelRQE, 1)
 ClassDef.
 

Private Attributes

float m_relQE [c_numModules][c_numChannels] = {{0.0}}
 relative quantum efficiency
 
EStatus m_status [c_numModules][c_numChannels] = {{c_Default}}
 calibration status
 

Detailed Description

Class to store relative quantum efficiency of channels w.r.t initial one measured in PMT QA QE is expected to decrease during the experiment due to aging induced by acuumulated charge.

Definition at line 24 of file TOPCalChannelRQE.h.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
private

Sizes.

Enumerator
c_numModules 

number of modules

c_numChannels 

number of channels per module

Definition at line 149 of file TOPCalChannelRQE.h.

149 {
150 c_numModules = 16,
151 c_numChannels = 512
152 };
@ c_numChannels
number of channels per module
@ c_numModules
number of modules

◆ EStatus

enum EStatus

Calibration status of a constant.

Enumerator
c_Default 

uncalibrated default value

c_Calibrated 

good calibrated value

c_Unusable 

bad calibrated value

Definition at line 30 of file TOPCalChannelRQE.h.

30 {
31 c_Default = 0,
32 c_Calibrated = 1,
33 c_Unusable = 2
34 };
@ c_Calibrated
good calibrated value
@ c_Unusable
bad calibrated value
@ c_Default
uncalibrated default value

Constructor & Destructor Documentation

◆ TOPCalChannelRQE()

TOPCalChannelRQE ( )
inline

Default constructor.

Definition at line 39 of file TOPCalChannelRQE.h.

39{}

Member Function Documentation

◆ getRQE()

double getRQE ( int  moduleID,
unsigned  channel 
) const
inline

Returns the relative QE for a single channel (1.0 if status is c_Default)

Parameters
moduleIDmodule ID (1-based)
channelhardware channel number (0-based)
Returns
relative quantum efficieny (absolute value, not in %)

Definition at line 87 of file TOPCalChannelRQE.h.

88 {
89 unsigned module = moduleID - 1;
90 if (module >= c_numModules) {
91 B2WARNING("Invalid module number, returning 0 (" << ClassName() << ")");
92 return 0;
93 }
94 if (channel >= c_numChannels) {
95 B2WARNING("Invalid channel number, returning 0 (" << ClassName() << ")");
96 return 0;
97 }
98 if (m_status[module][channel] == c_Default) return 1.0;
99 return m_relQE[module][channel];
100 }
EStatus m_status[c_numModules][c_numChannels]
calibration status
float m_relQE[c_numModules][c_numChannels]
relative quantum efficiency

◆ isCalibrated()

bool isCalibrated ( int  moduleID,
unsigned  channel 
) const
inline

Returns calibration status.

Parameters
moduleIDmodule ID (1-based)
channelhardware channel number (0-based)
Returns
true, if good calibrated

Definition at line 108 of file TOPCalChannelRQE.h.

109 {
110 unsigned module = moduleID - 1;
111 if (module >= c_numModules) return false;
112 if (channel >= c_numChannels) return false;
113 return m_status[module][channel] == c_Calibrated;
114 }

◆ isDefault()

bool isDefault ( int  moduleID,
unsigned  channel 
) const
inline

Returns calibration status.

Parameters
moduleIDmodule ID (1-based)
channelhardware channel number (0-based)
Returns
true, if default (not calibrated)

Definition at line 122 of file TOPCalChannelRQE.h.

123 {
124 unsigned module = moduleID - 1;
125 if (module >= c_numModules) return false;
126 if (channel >= c_numChannels) return false;
127 return m_status[module][channel] == c_Default;
128 }

◆ isUnusable()

bool isUnusable ( int  moduleID,
unsigned  channel 
) const
inline

Returns calibration status.

Parameters
moduleIDmodule ID (1-based)
channelhardware channel number (0-based)
Returns
true, if bad calibrated

Definition at line 136 of file TOPCalChannelRQE.h.

137 {
138 unsigned module = moduleID - 1;
139 if (module >= c_numModules) return false;
140 if (channel >= c_numChannels) return false;
141 return m_status[module][channel] == c_Unusable;
142 }

◆ setRQE()

void setRQE ( int  moduleID,
unsigned  channel,
double  relQE 
)
inline

Sets the relative QE for a single channel and switches status to calibrated.

Parameters
moduleIDmodule ID (1-based)
channelhardware channel number (0-based)
relQErelative quantum efficiency w.r.t initial one (absolute value, not in %)

Definition at line 47 of file TOPCalChannelRQE.h.

48 {
49 unsigned module = moduleID - 1;
50 if (module >= c_numModules) {
51 B2ERROR("Invalid module number, constant not set (" << ClassName() << ")");
52 return;
53 }
54 if (channel >= c_numChannels) {
55 B2ERROR("Invalid channel number, constant not set (" << ClassName() << ")");
56 return;
57 }
58 m_relQE[module][channel] = relQE;
59 m_status[module][channel] = c_Calibrated;
60 }

◆ setUnusable()

void setUnusable ( int  moduleID,
unsigned  channel 
)
inline

Switches calibration status to unusable to flag badly calibrated constant.

Parameters
moduleIDmodule ID (1-based)
channelhardware channel number (0-based)

Definition at line 67 of file TOPCalChannelRQE.h.

68 {
69 unsigned module = moduleID - 1;
70 if (module >= c_numModules) {
71 B2ERROR("Invalid module number, status not set (" << ClassName() << ")");
72 return;
73 }
74 if (channel >= c_numChannels) {
75 B2ERROR("Invalid channel number, status not set (" << ClassName() << ")");
76 return;
77 }
78 m_status[module][channel] = c_Unusable;
79 }

Member Data Documentation

◆ m_relQE

float m_relQE[c_numModules][c_numChannels] = {{0.0}}
private

relative quantum efficiency

Definition at line 155 of file TOPCalChannelRQE.h.

◆ m_status

EStatus m_status[c_numModules][c_numChannels] = {{c_Default}}
private

calibration status

Definition at line 156 of file TOPCalChannelRQE.h.


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