Belle II Software  release-05-01-25
PXDGainCalibrator Class Reference

Singleton class for managing gain corrections for the PXD. More...

#include <PXDGainCalibrator.h>

Collaboration diagram for PXDGainCalibrator:

Public Member Functions

void initialize ()
 Initialize the PXDGainCalibrator.
 
void setGains ()
 Set gains from DB.
 
float getGainCorrection (VxdID id, unsigned int uid, unsigned int vid) const
 Get gain correction. More...
 
float getADUToEnergy (VxdID id, unsigned int uid, unsigned int vid) const
 Get conversion factor from ADU to energy. More...
 
unsigned short getBinU (VxdID id, unsigned int uid, unsigned int vid) const
 Get gain correction bin along sensor u side. More...
 
unsigned short getBinV (VxdID id, unsigned int vid) const
 Get gain correction bin along sensor v side. More...
 
unsigned short getBinU (VxdID id, unsigned int uid, unsigned int vid, unsigned short nBinsU) const
 Get gain correction bin along sensor u side. More...
 
unsigned short getBinV (VxdID id, unsigned int vid, unsigned short nBinsV) const
 Get gain correction bin along v side. More...
 
unsigned short getGlobalID (VxdID id, unsigned int uid, unsigned int vid) const
 Get global ID for gain correction on a sensor. More...
 
const PXDGainMapPargetGainMapParameters () const
 Return current gain correction payload.
 

Static Public Member Functions

static PXDGainCalibratorgetInstance ()
 Main (and only) way to access the PXDGainCalibrator.
 

Private Member Functions

 PXDGainCalibrator ()
 Singleton class, hidden constructor.
 
 PXDGainCalibrator (const PXDGainCalibrator &)=delete
 Singleton class, forbidden copy constructor.
 
PXDGainCalibratoroperator= (const PXDGainCalibrator &)=delete
 Singleton class, forbidden assignment operator.
 

Private Attributes

std::unique_ptr< DBObjPtr< PXDGainMapPar > > m_gainsFromDB
 Masked pixels retrieved from DB.
 
PXDGainMapPar m_gains
 Map of gain corrections.
 

Detailed Description

Singleton class for managing gain corrections for the PXD.

Definition at line 36 of file PXDGainCalibrator.h.

Member Function Documentation

◆ getADUToEnergy()

float getADUToEnergy ( Belle2::VxdID  id,
unsigned int  uid,
unsigned int  vid 
) const

Get conversion factor from ADU to energy.

Parameters
sensorIDunique ID of the sensor
uiduCell of single pixel
vidvCell of single pixel
Returns
ADUToEnergy conversion factor

Definition at line 45 of file PXDGainCalibrator.cc.

46 {
47  // FIXME: These constants are hardcoded as intermediate solution.
48  // They should be obtained from GeoCache and ultimately from the condDB.
49  float ADCUnit = 130.0;
50  float Gq = 0.6;
51  return Const::ehEnergy * ADCUnit / Gq / getGainCorrection(id, uid, vid);
52 }

◆ getBinU() [1/2]

unsigned short getBinU ( VxdID  id,
unsigned int  uid,
unsigned int  vid 
) const

Get gain correction bin along sensor u side.

Parameters
sensorIDunique ID of the sensor
uiduCell of single pixel
vidvCell of single pixel
Returns
uBin correction bin along u side of sensor

Definition at line 62 of file PXDGainCalibrator.cc.

◆ getBinU() [2/2]

unsigned short getBinU ( VxdID  id,
unsigned int  uid,
unsigned int  vid,
unsigned short  nBinsU 
) const

Get gain correction bin along sensor u side.

Parameters
sensorIDunique ID of the sensor
uiduCell of single pixel
vidvCell of single pixel
nBinsUnumber of gain bins along u side
Returns
uBin correction bin along u side of sensor

Definition at line 56 of file PXDGainCalibrator.cc.

◆ getBinV() [1/2]

unsigned short getBinV ( VxdID  id,
unsigned int  vid 
) const

Get gain correction bin along sensor v side.

Parameters
sensorIDunique ID of the sensor
vidvCell of single pixel
Returns
vBin correction bin along v side of sensor

Definition at line 73 of file PXDGainCalibrator.cc.

◆ getBinV() [2/2]

unsigned short getBinV ( VxdID  id,
unsigned int  vid,
unsigned short  nBinsV 
) const

Get gain correction bin along v side.

Parameters
sensorIDunique ID of the sensor
vidvCell of single pixel
nBinsVnumber of gain bins along v side
Returns
vBin correction bin along v side of sensor

Definition at line 67 of file PXDGainCalibrator.cc.

◆ getGainCorrection()

float getGainCorrection ( Belle2::VxdID  id,
unsigned int  uid,
unsigned int  vid 
) const

Get gain correction.

Parameters
sensorIDunique ID of the sensor
uiduCell of single pixel
vidvCell of single pixel
Returns
gain correction

Definition at line 36 of file PXDGainCalibrator.cc.

◆ getGlobalID()

unsigned short getGlobalID ( VxdID  id,
unsigned int  uid,
unsigned int  vid 
) const

Get global ID for gain correction on a sensor.

Parameters
sensorIDunique ID of the sensor
uiduCell of single pixel
vidvCell of single pixel
Returns
globalID Unique ID for gain correction

Definition at line 78 of file PXDGainCalibrator.cc.


The documentation for this class was generated from the following files:
Belle2::PXD::PXDGainCalibrator::getGainCorrection
float getGainCorrection(VxdID id, unsigned int uid, unsigned int vid) const
Get gain correction.
Definition: PXDGainCalibrator.cc:36
Belle2::Const::ehEnergy
static const double ehEnergy
Energy needed to create an electron-hole pair in Si at std.
Definition: Const.h:570