 |
Belle II Software
release-05-02-19
|
14 #include <vxd/dataobjects/VxdID.h>
15 #include <svd/dbobjects/SVDCalibrationsBase.h>
16 #include <svd/dbobjects/SVDCalibrationsVector.h>
17 #include <svd/dbobjects/SVDStripCalAmp.h>
18 #include <framework/database/DBObjPtr.h>
19 #include <framework/logging/Logger.h>
37 class SVDPulseShapeCalibrations {
40 typedef SVDCalibrationsBase< SVDCalibrationsVector< SVDStripCalAmp > >
48 B2INFO(
"SVDPulseShapeCalibrations: from now on we are using " <<
67 const bool& isU,
const unsigned short& strip,
68 const double& pulseADC
71 return pulseADC /
getGain(sensorID, isU, strip);
92 const bool& isU,
const unsigned short& strip,
93 const double& charge)
const
95 return roundl(charge *
getGain(sensorID, isU, strip));
117 const bool& isU,
const unsigned short& strip,
118 const double& charge)
const
121 if (chargeLongInt < 0)
123 return chargeLongInt > 255 ? 255 : chargeLongInt;
138 const unsigned short& strip)
const
161 inline float getWidth(
const VxdID& sensorID,
const bool& isU,
162 const unsigned short& strip)
const
164 return m_calAmp_aDBObjPtr->getReference(sensorID.getLayerNumber(), sensorID.getLadderNumber(), sensorID.getSensorNumber(),
187 inline float getGain(
const VxdID& sensorID,
const bool& isU,
188 const unsigned short& strip)
const
float getWidth(const VxdID &sensorID, const bool &isU, const unsigned short &strip) const
Return the width of the pulse shape for a given strip.
Class to uniquely identify a any structure of the PXD and SVD.
bool isValid()
returns true if the m_aDBObtPtr is valid in the requested IoV
baseType getLadderNumber() const
Get the ladder id.
TString getUniqueID()
returns the unique ID of the payload
float getPeakTime(const VxdID &sensorID, const bool &isU, const unsigned short &strip) const
Return the peaking time of the strip.
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 ...
Class for accessing objects in the database.
Abstract base class for different kinds of events.
SVDCalibrationsBase< SVDCalibrationsVector< SVDStripCalAmp > > t_calAmp_payload
typedef of the SVDStripCalAmp payload of all SVD strips
SVDPulseShapeCalibrations()
Constructor, no input argument is required.
float getGain(const VxdID &sensorID, const bool &isU, const unsigned short &strip) const
Return the channel gain.
DBObjPtr< t_calAmp_payload > m_calAmp_aDBObjPtr
SVDStripCalAmp payload.
baseType getSensorNumber() const
Get the sensor id.
baseType getLayerNumber() const
Get the layer id.
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...
static std::string calAmp_name
name of the SVDStripCalAmp payload
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]...