Belle II Software  release-08-01-10
DATCONSVDDigit Class Reference

The DATCONSVDDigit class. More...

#include <DATCONSVDDigit.h>

Collaboration diagram for DATCONSVDDigit:

Public Types

typedef uint8_t APVRawSampleType
 Type of samples received from DAQ.
 
typedef std::array< APVRawSampleType, c_nAPVSamplesAPVRawSamples
 Type for array of samples received from DAQ.
 
typedef float APVFloatSampleType
 Types of samples for processing.
 
typedef std::array< APVFloatSampleType, c_nAPVSamplesAPVFloatSamples
 Types for array of samples for processing.
 

Public Member Functions

 DATCONSVDDigit (VxdID sensorID, bool isU, short cellID, APVFloatSampleType samples[c_nAPVSamples])
 Constructor using c-array of samples. More...
 
 DATCONSVDDigit (VxdID sensorID, bool isU, short cellID, APVFloatSamples samples)
 Constructor using a stl container of samples. More...
 
VxdID getSensorID () const
 Getter for the sensor ID.
 
VxdID::baseType getRawSensorID () const
 Getter for the raw sensor ID.
 
bool isUStrip () const
 Getter for the strip direction (u or v)
 
short int getCellID () const
 Getter for the strip ID.
 
APVFloatSamples getFloatSamples () const
 Get float-array of 6 APV25 samples. More...
 
APVRawSamples getRawSamples () const
 Get int-array of of 6 APV25 samples.
 
unsigned short getTotalCharge ()
 Getter for the total charge of the array in ADUs.
 
unsigned short getMaxSampleCharge () const
 Getter for the charge of the biggest sample of the array in ADUs.
 
unsigned short getMaxSampleIndex ()
 Getter for the index of the biggest sample inside the cluster (0...6)
 
void setSensorID (VxdID sensorid)
 Setter for the sensorID.
 
void setUStrip (bool isU)
 Setter for the strip direction (u or v).
 
void setCellID (short cellID)
 Setter for the stripID / cellID.
 
void setAPVRawSamples (APVFloatSamples apvInputSamples)
 Setter for the raw samples array.
 

Static Public Member Functions

template<typename T >
static DATCONSVDDigit::APVRawSampleType trimToSampleRange (T x)
 Convert a value to sample range. More...
 

Static Public Attributes

static const std::size_t c_nAPVSamples = 6
 Number of APV samples stored.
 

Private Attributes

VxdID::baseType m_sensorID
 Compressed sensor identifier.
 
bool m_isU
 True if U, false if V.
 
short m_cellID
 Strip coordinate in pitch units.
 
APVRawSamples m_samples
 6 APV signals from the strip.
 
unsigned short m_totalCharge
 Total charge of this DATCONSVDDigit.
 
unsigned short m_maxSampleIndex
 Index of charge of sample max.
 

Detailed Description

The DATCONSVDDigit class.

This class is a simplified version of the SVDShaperDigit class. It is used for the DATCON simulation, as DATCON has less information of the SVD hits available compared to the usual SVDShaperDigits. The DATCONSVDDigit holds a set of 6 raw APV25 signal samples taken on a strip.

Definition at line 30 of file DATCONSVDDigit.h.

Constructor & Destructor Documentation

◆ DATCONSVDDigit() [1/2]

DATCONSVDDigit ( VxdID  sensorID,
bool  isU,
short  cellID,
APVFloatSampleType  samples[c_nAPVSamples] 
)
inline

Constructor using c-array of samples.

Parameters
sensorIDSensor VXD ID.
isUTrue if u strip, false if v.
cellIDStrip ID.
samplesstd::array of 6 APV raw samples.

Definition at line 53 of file DATCONSVDDigit.h.

53  :
54  m_sensorID(sensorID), m_isU(isU), m_cellID(cellID), m_totalCharge(0), m_maxSampleIndex(0)
55  {
56  std::transform(samples, samples + c_nAPVSamples, m_samples.begin(),
57  [](APVFloatSampleType x)->APVRawSampleType { return trimToSampleRange(x); });
58  }
unsigned short m_maxSampleIndex
Index of charge of sample max.
bool m_isU
True if U, false if V.
static const std::size_t c_nAPVSamples
Number of APV samples stored.
VxdID::baseType m_sensorID
Compressed sensor identifier.
unsigned short m_totalCharge
Total charge of this DATCONSVDDigit.
float APVFloatSampleType
Types of samples for processing.
short m_cellID
Strip coordinate in pitch units.
APVRawSamples m_samples
6 APV signals from the strip.

◆ DATCONSVDDigit() [2/2]

DATCONSVDDigit ( VxdID  sensorID,
bool  isU,
short  cellID,
APVFloatSamples  samples 
)
inline

Constructor using a stl container of samples.

Parameters
sensorIDSensor VXD ID.
isUTrue if u strip, false if v.
cellIDStrip ID.
samplesstd::array of 6 APV raw samples.

Definition at line 66 of file DATCONSVDDigit.h.

Member Function Documentation

◆ getFloatSamples()

APVFloatSamples getFloatSamples ( ) const
inline

Get float-array of 6 APV25 samples.


Definition at line 86 of file DATCONSVDDigit.h.

◆ trimToSampleRange()

static DATCONSVDDigit::APVRawSampleType trimToSampleRange ( x)
inlinestatic

Convert a value to sample range.

Parameters
xvalue to be converted
Returns
APVRawSampleType representation of x

Definition at line 148 of file DATCONSVDDigit.h.


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