11#include <vxd/dataobjects/VxdID.h>
12#include <svd/dbobjects/SVDCalibrationsBase.h>
13#include <svd/dbobjects/SVDCalibrationsVector.h>
14#include <svd/dbobjects/SVDStripCalAmp.h>
15#include <framework/database/DBObjPtr.h>
16#include <framework/logging/Logger.h>
45 B2DEBUG(20,
"SVDPulseShapeCalibrations: from now on we are using " <<
63 const bool& isU,
const unsigned short& strip,
64 const double& pulseADC
67 return pulseADC /
getGain(sensorID, isU, strip);
87 const bool& isU,
const unsigned short& strip,
88 const double& charge)
const
90 return roundl(charge *
getGain(sensorID, isU, strip));
111 const bool& isU,
const unsigned short& strip,
112 const double& charge)
const
115 if (chargeLongInt < 0)
117 return chargeLongInt > 255 ? 255 : chargeLongInt;
131 const unsigned short& strip)
const
155 const unsigned short& strip)
const
181 const unsigned short& strip)
const
Class for accessing objects in the database.
base class for calibrations classes
This class defines the dbobject and the methods to access the SVD calibrations from the local runs pr...
static std::string calAmp_name
name of the SVDStripCalAmp payload
SVDCalibrationsBase< SVDCalibrationsVector< SVDStripCalAmp > > t_calAmp_payload
typedef of the SVDStripCalAmp payload of all SVD strips
DBObjPtr< t_calAmp_payload > m_calAmp_aDBObjPtr
SVDStripCalAmp payload.
float getGain(const VxdID &sensorID, const bool &isU, const unsigned short &strip) const
Return the channel gain.
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]...
SVDPulseShapeCalibrations()
Constructor, no input argument is required.
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...
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 ...
float getPeakTime(const VxdID &sensorID, const bool &isU, const unsigned short &strip) const
Return the peaking time of the strip.
TString getUniqueID()
returns the unique ID of the payload
float getWidth(const VxdID &sensorID, const bool &isU, const unsigned short &strip) const
Return the width of the pulse shape for a given strip.
bool isValid()
returns true if the m_aDBObtPtr is valid in the requested IoV
Class to uniquely identify a any structure of the PXD and SVD.
baseType getSensorNumber() const
Get the sensor id.
baseType getLadderNumber() const
Get the ladder id.
baseType getLayerNumber() const
Get the layer id.
Abstract base class for different kinds of events.