 |
Belle II Software
release-05-01-25
|
11 #include <pxd/reconstruction/PXDGainCalibrator.h>
12 #include <vxd/geometry/GeoCache.h>
13 #include <framework/gearbox/Const.h>
22 if ((*m_gainsFromDB).isValid()) {
40 unsigned int uBin = (uid * 4 + vid % 4) / drainsPerBin;
41 unsigned int vBin = vid / rowsPerBin;
42 return m_gains.getContent(
id.
getID(), uBin, vBin);
49 float ADCUnit = 130.0;
51 return Const::ehEnergy * ADCUnit / Gq / getGainCorrection(
id, uid, vid);
59 return (uid * 4 + vid % 4) / drainsPerBin;
64 return getBinU(
id, uid, vid, m_gains.getBinsU());
70 return vid / rowsPerBin;
75 return getBinV(
id, vid, m_gains.getBinsV());
80 auto uBin = getBinU(
id, uid, vid);
81 auto vBin = getBinV(
id, vid);
82 return m_gains.getGlobalID(uBin, vBin);
88 m_gains = **m_gainsFromDB;
Singleton class for managing gain corrections for the PXD.
int getUCells() const
Return number of pixel/strips in u direction.
Class to uniquely identify a any structure of the PXD and SVD.
unsigned short getBinV(VxdID id, unsigned int vid) const
Get gain correction bin along sensor v side.
static const SensorInfoBase & get(Belle2::VxdID id)
Return a reference to the SensorInfo of a given SensorID.
int getID(const std::vector< double > &breaks, double t)
get id of the time point t
void initialize()
Initialize the PXDGainCalibrator.
float getGainCorrection(VxdID id, unsigned int uid, unsigned int vid) const
Get gain correction.
unsigned short getGlobalID(VxdID id, unsigned int uid, unsigned int vid) const
Get global ID for gain correction on a sensor.
void setGains()
Set gains from DB.
float getADUToEnergy(VxdID id, unsigned int uid, unsigned int vid) const
Get conversion factor from ADU to energy.
static GeoCache & getInstance()
Return a reference to the singleton instance.
int getVCells() const
Return number of pixel/strips in v direction.
unsigned short getBinU(VxdID id, unsigned int uid, unsigned int vid) const
Get gain correction bin along sensor u side.
static PXDGainCalibrator & getInstance()
Main (and only) way to access the PXDGainCalibrator.