Singleton class for managing gain corrections for the PXD.
More...
#include <PXDGainCalibrator.h>
|
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.
|
|
float | getADUToEnergy (VxdID id, unsigned int uid, unsigned int vid) const |
| Get conversion factor from ADU to energy.
|
|
unsigned short | getBinU (VxdID id, unsigned int uid, unsigned int vid) const |
| Get gain correction bin along sensor u side.
|
|
unsigned short | getBinV (VxdID id, unsigned int vid) const |
| Get gain correction bin along sensor v side.
|
|
unsigned short | getBinU (VxdID id, unsigned int uid, unsigned int vid, unsigned short nBinsU) const |
| Get gain correction bin along sensor u side.
|
|
unsigned short | getBinV (VxdID id, unsigned int vid, unsigned short nBinsV) const |
| Get gain correction bin along v side.
|
|
unsigned short | getGlobalID (VxdID id, unsigned int uid, unsigned int vid) const |
| Get global ID for gain correction on a sensor.
|
|
const PXDGainMapPar & | getGainMapParameters () const |
| Return current gain correction payload.
|
|
Singleton class for managing gain corrections for the PXD.
Definition at line 26 of file PXDGainCalibrator.h.
◆ PXDGainCalibrator()
◆ getADUToEnergy()
float getADUToEnergy |
( |
Belle2::VxdID |
id, |
|
|
unsigned int |
uid, |
|
|
unsigned int |
vid |
|
) |
| const |
Get conversion factor from ADU to energy.
- Parameters
-
id | unique ID of the sensor |
uid | uCell of single pixel |
vid | vCell of single pixel |
- Returns
- ADUToEnergy conversion factor
Definition at line 43 of file PXDGainCalibrator.cc.
44{
45
46
47 float ADCUnit = 130.0;
48 float Gq = 0.6;
50}
static const double ehEnergy
Energy needed to create an electron-hole pair in Si at std.
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
-
id | unique ID of the sensor |
uid | uCell of single pixel |
vid | vCell of single pixel |
- Returns
- uBin correction bin along u side of sensor
Definition at line 60 of file PXDGainCalibrator.cc.
61{
63}
unsigned short getBinsU() const
Get number of bins along sensor u side.
PXDGainMapPar m_gains
Map of gain corrections.
unsigned short getBinU(VxdID id, unsigned int uid, unsigned int vid) const
Get gain correction bin along sensor u side.
◆ 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
-
id | unique ID of the sensor |
uid | uCell of single pixel |
vid | vCell of single pixel |
nBinsU | number of gain bins along u side |
- Returns
- uBin correction bin along u side of sensor
Definition at line 54 of file PXDGainCalibrator.cc.
55{
57 return (uid * 4 + vid % 4) / drainsPerBin;
58}
const SensorInfoBase & getSensorInfo(Belle2::VxdID id) const
Return a referecne to the SensorInfo of a given SensorID.
static GeoCache & getInstance()
Return a reference to the singleton instance.
int getUCells() const
Return number of pixel/strips in u direction.
◆ getBinV() [1/2]
unsigned short getBinV |
( |
VxdID |
id, |
|
|
unsigned int |
vid |
|
) |
| const |
Get gain correction bin along sensor v side.
- Parameters
-
id | unique ID of the sensor |
vid | vCell of single pixel |
- Returns
- vBin correction bin along v side of sensor
Definition at line 71 of file PXDGainCalibrator.cc.
72{
74}
unsigned short getBinsV() const
Get number of bins along sensor v side.
unsigned short getBinV(VxdID id, unsigned int vid) const
Get gain correction bin along sensor v side.
◆ getBinV() [2/2]
unsigned short getBinV |
( |
VxdID |
id, |
|
|
unsigned int |
vid, |
|
|
unsigned short |
nBinsV |
|
) |
| const |
Get gain correction bin along v side.
- Parameters
-
id | unique ID of the sensor |
vid | vCell of single pixel |
nBinsV | number of gain bins along v side |
- Returns
- vBin correction bin along v side of sensor
Definition at line 65 of file PXDGainCalibrator.cc.
66{
68 return vid / rowsPerBin;
69}
int getVCells() const
Return number of pixel/strips in v direction.
◆ getGainCorrection()
float getGainCorrection |
( |
Belle2::VxdID |
id, |
|
|
unsigned int |
uid, |
|
|
unsigned int |
vid |
|
) |
| const |
Get gain correction.
- Parameters
-
id | unique ID of the sensor |
uid | uCell of single pixel |
vid | vCell of single pixel |
- Returns
- gain correction
Definition at line 34 of file PXDGainCalibrator.cc.
35{
38 unsigned int uBin = (uid * 4 + vid % 4) / drainsPerBin;
39 unsigned int vBin = vid / rowsPerBin;
41}
float getContent(unsigned short sensorID, unsigned short globalID) const
Get content.
int getID(const std::vector< double > &breaks, double t)
get id of the time point t
◆ getGainMapParameters()
◆ getGlobalID()
unsigned short getGlobalID |
( |
VxdID |
id, |
|
|
unsigned int |
uid, |
|
|
unsigned int |
vid |
|
) |
| const |
Get global ID for gain correction on a sensor.
- Parameters
-
id | unique ID of the sensor |
uid | uCell of single pixel |
vid | vCell of single pixel |
- Returns
- globalID Unique ID for gain correction
Definition at line 76 of file PXDGainCalibrator.cc.
77{
78 auto uBin =
getBinU(
id, uid, vid);
81}
unsigned short getGlobalID(unsigned short uBin, unsigned short vBin) const
Get global id from uBin and vBin.
◆ getInstance()
◆ initialize()
Initialize the PXDGainCalibrator.
Definition at line 16 of file PXDGainCalibrator.cc.
17{
19
20 if ((*m_gainsFromDB).isValid()) {
23 }
24}
Class for accessing objects in the database.
std::unique_ptr< DBObjPtr< PXDGainMapPar > > m_gainsFromDB
Masked pixels retrieved from DB.
void setGains()
Set gains from DB.
◆ setGains()
◆ m_gains
◆ m_gainsFromDB
The documentation for this class was generated from the following files: