Belle II Software  release-05-01-25
DATCONSVDDigit Class Reference

The DATCONSVDDigit class. More...

#include <DATCONSVDDigit.h>

Inheritance diagram for DATCONSVDDigit:
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

template<typename T >
 DATCONSVDDigit (VxdID sensorID, bool isU, short cellID, T samples[c_nAPVSamples])
 Constructor using c-array of samples. More...
 
template<typename T >
 DATCONSVDDigit (VxdID sensorID, bool isU, short cellID, T samples)
 Constructor using a stl container of samples. More...
 
 DATCONSVDDigit ()
 Default constructor for the ROOT IO.
 
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 ()
 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.
 
void addRelationTo (const RelationsInterface< BASE > *object, float weight=1.0, const std::string &namedRelation="") const
 Add a relation from this object to another object (with caching). More...
 
void addRelationTo (const TObject *object, float weight=1.0, const std::string &namedRelation="") const
 Add a relation from this object to another object (no caching, can be quite slow). More...
 
void copyRelations (const RelationsInterface< BASE > *sourceObj)
 Copies all relations of sourceObj (pointing from or to sourceObj) to this object (including weights). More...
 
template<class TO >
RelationVector< TO > getRelationsTo (const std::string &name="", const std::string &namedRelation="") const
 Get the relations that point from this object to another store array. More...
 
template<class FROM >
RelationVector< FROM > getRelationsFrom (const std::string &name="", const std::string &namedRelation="") const
 Get the relations that point from another store array to this object. More...
 
template<class T >
RelationVector< T > getRelationsWith (const std::string &name="", const std::string &namedRelation="") const
 Get the relations between this object and another store array. More...
 
template<class TO >
TO * getRelatedTo (const std::string &name="", const std::string &namedRelation="") const
 Get the object to which this object has a relation. More...
 
template<class FROM >
FROM * getRelatedFrom (const std::string &name="", const std::string &namedRelation="") const
 Get the object from which this object has a relation. More...
 
template<class T >
T * getRelated (const std::string &name="", const std::string &namedRelation="") const
 Get the object to or from which this object has a relation. More...
 
template<class TO >
std::pair< TO *, float > getRelatedToWithWeight (const std::string &name="", const std::string &namedRelation="") const
 Get first related object & weight of relation pointing to an array. More...
 
template<class FROM >
std::pair< FROM *, float > getRelatedFromWithWeight (const std::string &name="", const std::string &namedRelation="") const
 Get first related object & weight of relation pointing from an array. More...
 
template<class T >
std::pair< T *, float > getRelatedWithWeight (const std::string &name="", const std::string &namedRelation="") const
 Get first related object & weight of relation pointing from/to an array. More...
 
virtual std::string getName () const
 Return a short name that describes this object, e.g. More...
 
virtual std::string getInfoHTML () const
 Return a short summary of this object's contents in HTML format. More...
 
std::string getInfo () const
 Return a short summary of this object's contents in raw text format. More...
 
std::string getArrayName () const
 Get name of array this object is stored in, or "" if not found.
 
int getArrayIndex () const
 Returns this object's array index (in StoreArray), or -1 if not found.
 

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.
 

Protected Member Functions

TClonesArray * getArrayPointer () const
 Returns the pointer to the raw DataStore array holding this object (protected since these arrays are easy to misuse).
 

Private Member Functions

 ClassDef (RelationsInterface, 0)
 defines interface for accessing relations of objects in StoreArray.
 

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_maxSampleCharge
 Charge of sample max.
 
unsigned short m_maxSampleIndex
 Index of charge of sample max.
 
DataStore::StoreEntrym_cacheDataStoreEntry
 Cache of the data store entry to which this object belongs.
 
int m_cacheArrayIndex
 Cache of the index in the TClonesArray to which this object belongs.
 

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 44 of file DATCONSVDDigit.h.

Constructor & Destructor Documentation

◆ DATCONSVDDigit() [1/2]

DATCONSVDDigit ( VxdID  sensorID,
bool  isU,
short  cellID,
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 68 of file DATCONSVDDigit.h.

76  :
77  m_sensorID(sensorID), m_isU(isU), m_cellID(cellID), m_totalCharge(0), m_maxSampleCharge(0), m_maxSampleIndex(0)

◆ DATCONSVDDigit() [2/2]

DATCONSVDDigit ( VxdID  sensorID,
bool  isU,
short  cellID,
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 84 of file DATCONSVDDigit.h.

Member Function Documentation

◆ addRelationTo() [1/2]

void addRelationTo ( const RelationsInterface< BASE > *  object,
float  weight = 1.0,
const std::string &  namedRelation = "" 
) const
inlineinherited

Add a relation from this object to another object (with caching).

Parameters
objectThe object to which the relation should point.
weightThe weight of the relation.
namedRelationAdditional name for the relation, or "" for the default naming

Definition at line 144 of file RelationsObject.h.

◆ addRelationTo() [2/2]

void addRelationTo ( const TObject *  object,
float  weight = 1.0,
const std::string &  namedRelation = "" 
) const
inlineinherited

Add a relation from this object to another object (no caching, can be quite slow).

Parameters
objectThe object to which the relation should point.
weightThe weight of the relation.
namedRelationAdditional name for the relation, or "" for the default naming

Definition at line 157 of file RelationsObject.h.

◆ copyRelations()

void copyRelations ( const RelationsInterface< BASE > *  sourceObj)
inlineinherited

Copies all relations of sourceObj (pointing from or to sourceObj) to this object (including weights).

Useful if you want to make a complete copy of a StoreArray object to make modifications to it, but retain all information on linked objects.

Note: this only works if sourceObj inherits from the same base (e.g. RelationsObject), and only for related objects that also inherit from the same base.

Definition at line 172 of file RelationsObject.h.

◆ getFloatSamples()

APVFloatSamples getFloatSamples ( ) const
inline

Get float-array of 6 APV25 samples.


Definition at line 114 of file DATCONSVDDigit.h.

◆ getInfo()

std::string getInfo ( ) const
inlineinherited

Return a short summary of this object's contents in raw text format.

Returns the contents of getInfoHTML() while translating line-breaks etc.

Note
: You don't need to implement this function (it's not virtual), getInfoHTML() is enough.

Definition at line 372 of file RelationsObject.h.

◆ getInfoHTML()

virtual std::string getInfoHTML ( ) const
inlinevirtualinherited

Return a short summary of this object's contents in HTML format.

Reimplement this in your own class to provide useful output for display or debugging purposes. For example, you might do something like:

std::stringstream out;
out << "<b>PDG</b>: " << m_pdg << "<br>";
out << "<b>Covariance Matrix</b>: " << HTML::getString(getCovariance5()) << "<br>";
return out.str();
See also
Particle::getInfoHTML() for a more complex example.
HTML for some utility functions.
Use getInfo() to get a raw text version of this output.

Reimplemented in TrackFitResult, TRGSummary, Track, SoftwareTriggerResult, Particle, RecoTrack, MCParticle, Cluster, and PIDLikelihood.

Definition at line 364 of file RelationsObject.h.

◆ getName()

virtual std::string getName ( ) const
inlinevirtualinherited

Return a short name that describes this object, e.g.

pi+ for an MCParticle.

Reimplemented in SpacePoint, Particle, and MCParticle.

Definition at line 346 of file RelationsObject.h.

◆ getRelated()

T* getRelated ( const std::string &  name = "",
const std::string &  namedRelation = "" 
) const
inlineinherited

Get the object to or from which this object has a relation.

Template Parameters
TThe class of objects to or from which the relation points.
Parameters
nameThe name of the store array to or from which the relation points. If empty the default store array name for class T will be used. If the special name "ALL" is given all store arrays containing objects of type T are considered.
namedRelationAdditional name for the relation, or "" for the default naming
Returns
The first related object or a null pointer.

Definition at line 280 of file RelationsObject.h.

◆ getRelatedFrom()

FROM* getRelatedFrom ( const std::string &  name = "",
const std::string &  namedRelation = "" 
) const
inlineinherited

Get the object from which this object has a relation.

Template Parameters
FROMThe class of objects from which the relation points.
Parameters
nameThe name of the store array from which the relation points. If empty the default store array name for class FROM will be used. If the special name "ALL" is given all store arrays containing objects of type FROM are considered.
namedRelationAdditional name for the relation, or "" for the default naming
Returns
The first related object or a null pointer.

Definition at line 265 of file RelationsObject.h.

◆ getRelatedFromWithWeight()

std::pair<FROM*, float> getRelatedFromWithWeight ( const std::string &  name = "",
const std::string &  namedRelation = "" 
) const
inlineinherited

Get first related object & weight of relation pointing from an array.

Template Parameters
FROMThe class of objects from which the relation points.
Parameters
nameThe name of the store array from which the relation points. If empty the default store array name for class FROM will be used. If the special name "ALL" is given all store arrays containing objects of type FROM are considered.
namedRelationAdditional name for the relation, or "" for the default naming
Returns
Pair of first related object and the relation weight, or (NULL, 1.0) if none found.

Definition at line 316 of file RelationsObject.h.

◆ getRelatedTo()

TO* getRelatedTo ( const std::string &  name = "",
const std::string &  namedRelation = "" 
) const
inlineinherited

Get the object to which this object has a relation.

Template Parameters
TOThe class of objects to which the relation points.
Parameters
nameThe name of the store array to which the relation points. If empty the default store array name for class TO will be used. If the special name "ALL" is given all store arrays containing objects of type TO are considered.
namedRelationAdditional name for the relation, or "" for the default naming
Returns
The first related object or a null pointer.

Definition at line 250 of file RelationsObject.h.

◆ getRelatedToWithWeight()

std::pair<TO*, float> getRelatedToWithWeight ( const std::string &  name = "",
const std::string &  namedRelation = "" 
) const
inlineinherited

Get first related object & weight of relation pointing to an array.

Template Parameters
TOThe class of objects to which the relation points.
Parameters
nameThe name of the store array to which the relation points. If empty the default store array name for class TO will be used. If the special name "ALL" is given all store arrays containing objects of type TO are considered.
namedRelationAdditional name for the relation, or "" for the default naming
Returns
Pair of first related object and the relation weight, or (NULL, 1.0) if none found.

Definition at line 299 of file RelationsObject.h.

◆ getRelatedWithWeight()

std::pair<T*, float> getRelatedWithWeight ( const std::string &  name = "",
const std::string &  namedRelation = "" 
) const
inlineinherited

Get first related object & weight of relation pointing from/to an array.

Template Parameters
TThe class of objects to or from which the relation points.
Parameters
nameThe name of the store array to or from which the relation points. If empty the default store array name for class T will be used. If the special name "ALL" is given all store arrays containing objects of type T are considered.
namedRelationAdditional name for the relation, or "" for the default naming
Returns
Pair of first related object and the relation weight, or (NULL, 1.0) if none found.

Definition at line 333 of file RelationsObject.h.

◆ getRelationsFrom()

RelationVector<FROM> getRelationsFrom ( const std::string &  name = "",
const std::string &  namedRelation = "" 
) const
inlineinherited

Get the relations that point from another store array to this object.

Template Parameters
FROMThe class of objects from which the relations point.
Parameters
nameThe name of the store array from which the relations point. If empty the default store array name for class FROM will be used. If the special name "ALL" is given all store arrays containing objects of type FROM are considered.
namedRelationAdditional name for the relation, or "" for the default naming
Returns
A vector of relations.

Definition at line 214 of file RelationsObject.h.

◆ getRelationsTo()

RelationVector<TO> getRelationsTo ( const std::string &  name = "",
const std::string &  namedRelation = "" 
) const
inlineinherited

Get the relations that point from this object to another store array.

Template Parameters
TOThe class of objects to which the relations point.
Parameters
nameThe name of the store array to which the relations point. If empty the default store array name for class TO will be used. If the special name "ALL" is given all store arrays containing objects of type TO are considered.
namedRelationAdditional name for the relation, or "" for the default naming
Returns
A vector of relations.

Definition at line 199 of file RelationsObject.h.

◆ getRelationsWith()

RelationVector<T> getRelationsWith ( const std::string &  name = "",
const std::string &  namedRelation = "" 
) const
inlineinherited

Get the relations between this object and another store array.

Relations in both directions are returned.

Template Parameters
TThe class of objects to or from which the relations point.
Parameters
nameThe name of the store array to or from which the relations point. If empty the default store array name for class T will be used. If the special name "ALL" is given all store arrays containing objects of type T are considered.
namedRelationAdditional name for the relation, or "" for the default naming
Returns
A vector of relations.

Definition at line 232 of file RelationsObject.h.

◆ trimToSampleRange()

static DATCONSVDDigit::APVRawSampleType trimToSampleRange ( x)
inlinestatic

Convert a value to sample range.

Parameters
valueto be converted
Returns
APVRawSampleType representation of x

Definition at line 176 of file DATCONSVDDigit.h.


The documentation for this class was generated from the following file:
Belle2::DATCONSVDDigit::m_isU
bool m_isU
True if U, false if V.
Definition: DATCONSVDDigit.h:207
Belle2::DATCONSVDDigit::m_maxSampleIndex
unsigned short m_maxSampleIndex
Index of charge of sample max.
Definition: DATCONSVDDigit.h:212
Belle2::HTML::getString
std::string getString(const TMatrixFBase &matrix, int precision=2, bool color=true)
get HTML table representing a matrix.
Definition: HTML.cc:18
Belle2::DATCONSVDDigit::m_totalCharge
unsigned short m_totalCharge
Total charge of this DATCONSVDDigit.
Definition: DATCONSVDDigit.h:210
Belle2::DATCONSVDDigit::m_cellID
short m_cellID
Strip coordinate in pitch units.
Definition: DATCONSVDDigit.h:208
Belle2::DATCONSVDDigit::m_sensorID
VxdID::baseType m_sensorID
Compressed sensor identifier.
Definition: DATCONSVDDigit.h:206
Belle2::DATCONSVDDigit::m_maxSampleCharge
unsigned short m_maxSampleCharge
Charge of sample max.
Definition: DATCONSVDDigit.h:211