Belle II Software  release-08-01-10
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 26 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
idunique ID of the sensor
uiduCell of single pixel
vidvCell of single pixel
Returns
ADUToEnergy conversion factor

Definition at line 43 of file PXDGainCalibrator.cc.

44 {
45  // FIXME: These constants are hardcoded as intermediate solution.
46  // They should be obtained from GeoCache and ultimately from the condDB.
47  float ADCUnit = 130.0;
48  float Gq = 0.6;
49  return Const::ehEnergy * ADCUnit / Gq / getGainCorrection(id, uid, vid);
50 }
static const double ehEnergy
Energy needed to create an electron-hole pair in Si at std.
Definition: Const.h:688
float getGainCorrection(VxdID id, unsigned int uid, unsigned int vid) const
Get gain correction.

◆ getBinU() [1/2]

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

Get gain correction bin along sensor u side.

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

Definition at line 60 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
idunique 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 54 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
idunique ID of the sensor
vidvCell of single pixel
Returns
vBin correction bin along v side of sensor

Definition at line 71 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
idunique 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 65 of file PXDGainCalibrator.cc.

◆ getGainCorrection()

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

Get gain correction.

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

Definition at line 34 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
idunique ID of the sensor
uiduCell of single pixel
vidvCell of single pixel
Returns
globalID Unique ID for gain correction

Definition at line 76 of file PXDGainCalibrator.cc.


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