Belle II Software development
SVDPulseShapeCalibrations Class Reference

This class defines the dbobject and the methods to access the SVD calibrations from the local runs providing the constants needed to calibrate the SVDShaperDigit: the charge, the ADC counts, the peaking time and the width. More...

#include <SVDPulseShapeCalibrations.h>

Public Types

typedef SVDCalibrationsBase< SVDCalibrationsVector< SVDStripCalAmp > > t_calAmp_payload
 typedef of the SVDStripCalAmp payload of all SVD strips
 

Public Member Functions

 SVDPulseShapeCalibrations ()
 Constructor, no input argument is required.
 
double getChargeFromADC (const Belle2::VxdID &sensorID, const bool &isU, const unsigned short &strip, const double &pulseADC) const
 Return the charge (number of electrons/holes) collected on a specific strip, given the number of ADC counts.
 
long int getADCFromCharge (const Belle2::VxdID &sensorID, const bool &isU, const unsigned short &strip, const double &charge) const
 Return a signed long integer corresponding to the ADC pulse height per strip, provided the charge [e] collected on that strip.
 
unsigned char getCappedADCFromCharge (const Belle2::VxdID &sensorID, const bool &isU, const unsigned short &strip, const double &charge) const
 Return an unsigned 8 bit integer corresponding to the ADC pulse height per strip, provided the charge [e] collected on that strip.
 
float getPeakTime (const VxdID &sensorID, const bool &isU, const unsigned short &strip) const
 Return the peaking time of the strip.
 
float getWidth (const VxdID &sensorID, const bool &isU, const unsigned short &strip) const
 Return the width of the pulse shape for a given strip.
 
TString getUniqueID ()
 returns the unique ID of the payload
 
bool isValid ()
 returns true if the m_aDBObtPtr is valid in the requested IoV
 

Static Public Attributes

static std::string calAmp_name = std::string("SVDPulseShapeCalibrations")
 name of the SVDStripCalAmp payload
 

Private Member Functions

float getGain (const VxdID &sensorID, const bool &isU, const unsigned short &strip) const
 Return the channel gain.
 

Private Attributes

DBObjPtr< t_calAmp_payloadm_calAmp_aDBObjPtr
 SVDStripCalAmp payload.
 

Detailed Description

This class defines the dbobject and the methods to access the SVD calibrations from the local runs providing the constants needed to calibrate the SVDShaperDigit: the charge, the ADC counts, the peaking time and the width.

Definition at line 34 of file SVDPulseShapeCalibrations.h.

Member Typedef Documentation

◆ t_calAmp_payload

typedef of the SVDStripCalAmp payload of all SVD strips

Definition at line 38 of file SVDPulseShapeCalibrations.h.

Constructor & Destructor Documentation

◆ SVDPulseShapeCalibrations()

Constructor, no input argument is required.

Definition at line 41 of file SVDPulseShapeCalibrations.h.

43 {
44 m_calAmp_aDBObjPtr.addCallback([ this ](const std::string&) -> void {
45 B2DEBUG(20, "SVDPulseShapeCalibrations: from now on we are using " <<
46 this->m_calAmp_aDBObjPtr -> get_uniqueID()); });
47 }
static std::string calAmp_name
name of the SVDStripCalAmp payload
DBObjPtr< t_calAmp_payload > m_calAmp_aDBObjPtr
SVDStripCalAmp payload.

Member Function Documentation

◆ getADCFromCharge()

long int getADCFromCharge ( const Belle2::VxdID sensorID,
const bool &  isU,
const unsigned short &  strip,
const double &  charge 
) const
inline

Return a signed long integer corresponding to the ADC pulse height per strip, provided the charge [e] collected on that strip.

Input:

Parameters
sensorIDidentity of the sensor for which the calibration is required
isUsensor side, true for p side, false for n side
stripstrip number
chargethe charge in units [e] is also required as input argument

Output: an integer number representing the ADC pulse height for the correponding input charge, on the given strip. The output is capped at 255.

Definition at line 85 of file SVDPulseShapeCalibrations.h.

89 {
90 return roundl(charge * getGain(sensorID, isU, strip));
91 }
float getGain(const VxdID &sensorID, const bool &isU, const unsigned short &strip) const
Return the channel gain.

◆ getCappedADCFromCharge()

unsigned char getCappedADCFromCharge ( const Belle2::VxdID sensorID,
const bool &  isU,
const unsigned short &  strip,
const double &  charge 
) const
inline

Return an unsigned 8 bit integer corresponding to the ADC pulse height per strip, provided the charge [e] collected on that strip.

Input:

Parameters
sensorIDidentity of the sensor for which the calibration is required
isUsensor side, true for p side, false for n side
stripstrip number
chargethe charge in units [e] is also required as input argument

Output: an integer number representing the ADC pulse height for the correponding input charge, on the given strip. The output is capped at 255.

Definition at line 109 of file SVDPulseShapeCalibrations.h.

113 {
114 auto chargeLongInt = getADCFromCharge(sensorID, isU, strip, charge);
115 if (chargeLongInt < 0)
116 return 0;
117 return chargeLongInt > 255 ? 255 : chargeLongInt;
118 }
long int getADCFromCharge(const Belle2::VxdID &sensorID, const bool &isU, const unsigned short &strip, const double &charge) const
Return a signed long integer corresponding to the ADC pulse height per strip, provided the charge [e]...

◆ getChargeFromADC()

double getChargeFromADC ( const Belle2::VxdID sensorID,
const bool &  isU,
const unsigned short &  strip,
const double &  pulseADC 
) const
inline

Return the charge (number of electrons/holes) collected on a specific strip, given the number of ADC counts.

Input:

Parameters
sensorIDidentity of the sensor for which the calibration is required
isUsensor side, true for p side, false for n side
stripstrip number
pulseADC: The ADC-pulse height, a double between 0 and 255 (included)

Output: float corresponding to the charge [e] converted from the read ADC pulse.

Definition at line 61 of file SVDPulseShapeCalibrations.h.

66 {
67 return pulseADC / getGain(sensorID, isU, strip);
68 }

◆ getGain()

float getGain ( const VxdID sensorID,
const bool &  isU,
const unsigned short &  strip 
) const
inlineprivate

Return the channel gain.

the gain is expressed in ADC counts / # electrons injected in the channel That is: pulseADC / gain = charge [e] charge * gain = pulse height [ADC counts]

Definition at line 180 of file SVDPulseShapeCalibrations.h.

182 {
183 return m_calAmp_aDBObjPtr->getReference(sensorID.getLayerNumber(), sensorID.getLadderNumber(), sensorID.getSensorNumber(),
184 m_calAmp_aDBObjPtr->sideIndex(isU), strip).gain ;
185
186 }

◆ getPeakTime()

float getPeakTime ( const VxdID sensorID,
const bool &  isU,
const unsigned short &  strip 
) const
inline

Return the peaking time of the strip.

Input:

Parameters
sensorIDidentity of the sensor for which the calibration is required
isUsensor side, true for p side, false for n side
stripstrip number

Output: a float number corresponding to the peaking time

Definition at line 130 of file SVDPulseShapeCalibrations.h.

132 {
133 return m_calAmp_aDBObjPtr->getReference(sensorID.getLayerNumber(), sensorID.getLadderNumber(),
134 sensorID.getSensorNumber(), m_calAmp_aDBObjPtr->sideIndex(isU),
135 strip).peakTime;
136 }

◆ getUniqueID()

TString getUniqueID ( )
inline

returns the unique ID of the payload

Definition at line 163 of file SVDPulseShapeCalibrations.h.

163{ return m_calAmp_aDBObjPtr->get_uniqueID(); }

◆ getWidth()

float getWidth ( const VxdID sensorID,
const bool &  isU,
const unsigned short &  strip 
) const
inline

Return the width of the pulse shape for a given strip.

Since it is provided from local run measurements in [APV clock/8] units, the correct value to be uploaded on the central DB for the width in [ns], the conversion factor [31.44ns/8] must be applied. The payload already retrieves the converted width in [ns].

Input:

Parameters
sensorIDidentity of the sensor for which the calibration is required
isUsensor side, true for p side, false for n side
stripstrip number

Output: a float number corresponding to the pulse width in ns.

Definition at line 154 of file SVDPulseShapeCalibrations.h.

156 {
157 return m_calAmp_aDBObjPtr->getReference(sensorID.getLayerNumber(), sensorID.getLadderNumber(), sensorID.getSensorNumber(),
158 m_calAmp_aDBObjPtr->sideIndex(isU), strip).pulseWidth;
159
160 }

◆ isValid()

bool isValid ( )
inline

returns true if the m_aDBObtPtr is valid in the requested IoV

Definition at line 166 of file SVDPulseShapeCalibrations.h.

167 {
168 return m_calAmp_aDBObjPtr.isValid();
169 }

Member Data Documentation

◆ calAmp_name

std::string calAmp_name = std::string("SVDPulseShapeCalibrations")
static

name of the SVDStripCalAmp payload

Definition at line 36 of file SVDPulseShapeCalibrations.h.

◆ m_calAmp_aDBObjPtr

DBObjPtr< t_calAmp_payload > m_calAmp_aDBObjPtr
private

SVDStripCalAmp payload.

Definition at line 189 of file SVDPulseShapeCalibrations.h.


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