Belle II Software development
TOPDigit Class Reference

Class to store TOP digitized hits (output of TOPDigitizer or raw data unpacker) relations to TOPSimHits, MCParticles. More...

#include <TOPDigit.h>

Inheritance diagram for TOPDigit:
DigitBase RelationsInterface< BASE >

Public Types

enum  EHitQuality {
  c_Junk = 0 ,
  c_Good = 1 ,
  c_CrossTalk = 3 ,
  c_CalPulse = 4 ,
  c_Uncalibrated = 5 ,
  c_Masked = 6
}
 hit quality enumerators More...
 
enum  EStatusBits {
  c_TimeBaseCalibrated = 1 ,
  c_ChannelT0Calibrated = 2 ,
  c_ModuleT0Calibrated = 4 ,
  c_CommonT0Calibrated = 8 ,
  c_FullyCalibrated = c_TimeBaseCalibrated | c_ChannelT0Calibrated | c_ModuleT0Calibrated | c_CommonT0Calibrated ,
  c_OffsetSubtracted = 16 ,
  c_EventT0Subtracted = 32 ,
  c_BunchOffsetSubtracted = 64
}
 calibration status enumerators More...
 
enum  EChargeShare {
  c_PrimaryChargeShare = 1 ,
  c_SecondaryChargeShare = 2
}
 charge sharing enumerators More...
 
enum  EAppendStatus {
  c_DontAppend = 0 ,
  c_Append = 1
}
 Enum for return state of addBGDigit function. More...
 

Public Member Functions

 TOPDigit ()
 Default constructor.
 
 TOPDigit (int moduleID, int pixelID, double rawTime)
 Usefull constructor.
 
void setModuleID (int moduleID)
 Sets module ID.
 
void setPixelID (int pixelID)
 Sets pixel ID.
 
void setChannel (unsigned int channel)
 Sets hardware channel number (0-based)
 
void setRawTime (double rawTime)
 Sets raw detection time.
 
void setTime (double time)
 Sets calibrated detection time.
 
void setTimeError (double timeError)
 Sets calibrated time uncertainty.
 
void setPulseHeight (int pulseHeight)
 Sets pulse height.
 
void setPulseWidth (double width)
 Sets pulse width.
 
void setIntegral (int integral)
 Sets pulse integral.
 
void setFirstWindow (unsigned window)
 Sets first ASIC window number of the merged waveform this hit is taken from.
 
void setHitQuality (EHitQuality quality)
 Sets hit quality flag.
 
void setStatus (unsigned short status)
 Sets calibration status (overwrites previously set bits)
 
void addStatus (unsigned short bitmask)
 Add calibration status.
 
void removeStatus (unsigned short bitmask)
 Remove calibration status.
 
void setPrimaryChargeShare ()
 Sets primary charge share flag.
 
void setSecondaryChargeShare ()
 Sets secondary charge share flag.
 
void resetChargeShare ()
 Remove charge share flag.
 
void subtractT0 (double t0)
 Subtract start time from m_time.
 
EHitQuality getHitQuality () const
 Returns hit quality.
 
unsigned short getStatus () const
 Returns calibration status bits.
 
bool hasStatus (unsigned short bitmask) const
 Returns calibration status.
 
bool isCalibrated () const
 Returns calibration status.
 
bool isTimeBaseCalibrated () const
 Returns calibration status.
 
bool isChannelT0Calibrated () const
 Returns calibration status.
 
bool isModuleT0Calibrated () const
 Returns calibration status.
 
bool isCommonT0Calibrated () const
 Returns calibration status.
 
bool isChargeShare () const
 Returns charge share status.
 
bool isPrimaryChargeShare () const
 Returns charge share status.
 
bool isSecondaryChargeShare () const
 Returns charge share status.
 
int getModuleID () const
 Returns module ID.
 
int getPixelID () const
 Returns pixel ID (1-based)
 
int getPixelRow () const
 Returns pixel row number (1-based)
 
int getPixelCol () const
 Returns pixel column number (1-based)
 
int getPMTRow () const
 Returns PMT row number (1-based)
 
int getPMTCol () const
 Returns PMT column number (1-based)
 
int getPMTNumber () const
 Returns PMT number (1-based)
 
int getPMTPixelRow () const
 Returns PMT pixel row number (1-based)
 
int getPMTPixelCol () const
 Returns PMT pixel column number (1-based)
 
int getPMTPixel () const
 Returns PMT pixel number (1-based)
 
unsigned int getChannel () const
 Returns hardware channel number.
 
unsigned int getASICChannel () const
 Returns ASIC channel number.
 
unsigned int getASICNumber () const
 Returns ASIC number.
 
unsigned int getCarrierNumber () const
 Returns carrier board number.
 
unsigned int getBoardstackNumber () const
 Returns boardstack number.
 
double getRawTime () const
 Returns raw detection time.
 
int getModulo256Sample () const
 Returns sample number modulo 256.
 
double getTime () const
 Returns t0-subtracted and calibrated time.
 
double getTimeError () const
 Returns calibrated time uncertainty.
 
int getPulseHeight () const
 Returns pulse height.
 
double getPulseWidth () const
 Returns pulse width.
 
int getIntegral () const
 Returns pulse integral.
 
unsigned getFirstWindow () const
 Returns first ASIC window number of the merged waveform this hit is taken from.
 
unsigned int getUniqueChannelID () const override
 Implementation of the base class function.
 
DigitBase::EAppendStatus addBGDigit (const DigitBase *bg) override
 Implementation of the base class function.
 
virtual void adjustAppendedBGDigit ()
 Virtual method for possible modification of BG digit which is just appended to simulation store 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).
 
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).
 
void copyRelations (const RelationsInterface< BASE > *sourceObj)
 Copies all relations of sourceObj (pointing from or to sourceObj) to this object (including weights).
 
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.
 
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.
 
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.
 
template<class TO >
TO * getRelatedTo (const std::string &name="", const std::string &namedRelation="") const
 Get the object to which this object has a relation.
 
template<class FROM >
FROM * getRelatedFrom (const std::string &name="", const std::string &namedRelation="") const
 Get the object from which this object has a relation.
 
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.
 
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.
 
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.
 
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.
 
virtual std::string getName () const
 Return a short name that describes this object, e.g.
 
virtual std::string getInfoHTML () const
 Return a short summary of this object's contents in HTML format.
 
std::string getInfo () const
 Return a short summary of this object's contents in raw text format.
 
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

static void setDoubleHitResolution (double time)
 Sets double hit resolution.
 
static void setPileupTime (double time)
 Sets pile-up time.
 

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

 ClassDefOverride (TOPDigit, 15)
 ClassDef.
 
 ClassDef (DigitBase, 2)
 ClassDef.
 

Private Attributes

int m_moduleID = 0
 module ID (1-based)
 
int m_pixelID = 0
 software channel ID (1-based)
 
unsigned m_channel = 0
 hardware channel number (0-based)
 
float m_rawTime = 0
 raw time expressed in samples (TDC bins)
 
float m_time = 0
 calibrated time in [ns], t0-subtracted
 
float m_timeError = 0
 time uncertainty (r.m.s) in [ns]
 
int m_pulseHeight = 0
 pulse height [ADC counts]
 
float m_pulseWidth = 0
 pulse width (FWHM) in [ns]
 
int m_integral = 0
 pulse integral [ADC counts]
 
unsigned short m_firstWindow = 0
 first ASIC window of the merged waveform
 
EHitQuality m_quality = c_Junk
 hit quality
 
unsigned short m_status = 0
 calibration status bits
 
unsigned short m_chargeShare = 0
 charge sharing flags
 
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.
 

Static Private Attributes

static float s_doubleHitResolution = 0
 double hit resolving time in [ns]
 
static float s_pileupTime = 0
 pile-up time in [ns]
 

Detailed Description

Class to store TOP digitized hits (output of TOPDigitizer or raw data unpacker) relations to TOPSimHits, MCParticles.

Definition at line 24 of file TOPDigit.h.

Member Enumeration Documentation

◆ EAppendStatus

enum EAppendStatus
inherited

Enum for return state of addBGDigit function.

Enumerator
c_DontAppend 

do not append BG digit to digits

c_Append 

append BG digit to digits

Definition at line 32 of file DigitBase.h.

32 {
33 c_DontAppend = 0,
34 c_Append = 1
35 };
@ c_DontAppend
do not append BG digit to digits
Definition: DigitBase.h:33
@ c_Append
append BG digit to digits
Definition: DigitBase.h:34

◆ EChargeShare

charge sharing enumerators

Enumerator
c_PrimaryChargeShare 

the largest one among hits sharing the same charge

c_SecondaryChargeShare 

others sharing the same charge

Definition at line 59 of file TOPDigit.h.

59 {
62 };
@ c_PrimaryChargeShare
the largest one among hits sharing the same charge
Definition: TOPDigit.h:60
@ c_SecondaryChargeShare
others sharing the same charge
Definition: TOPDigit.h:61

◆ EHitQuality

hit quality enumerators

Note: the only allowed place for switching c_Good to c_Masked or c_Uncalibrated is TOPChannelMasker because this information must also be passed to reconstruction

Definition at line 33 of file TOPDigit.h.

33 {
34 c_Junk = 0, // invalid feature extraction, pedestal jump, width too narrow/too wide
35 c_Good = 1, // good photon hit
36 c_CrossTalk = 3, // cross-talk
37 c_CalPulse = 4, // calibration pulse
38 c_Uncalibrated = 5, // good photon hit, but no time-base or channel T0 calibration
39 c_Masked = 6 // good photon hit, but channel is masked as dead or hot
40 };

◆ EStatusBits

calibration status enumerators

Definition at line 45 of file TOPDigit.h.

45 {
46 c_TimeBaseCalibrated = 1,
47 c_ChannelT0Calibrated = 2,
48 c_ModuleT0Calibrated = 4,
49 c_CommonT0Calibrated = 8,
50 c_FullyCalibrated = c_TimeBaseCalibrated | c_ChannelT0Calibrated | c_ModuleT0Calibrated | c_CommonT0Calibrated,
51 c_OffsetSubtracted = 16, // offset used in MC
52 c_EventT0Subtracted = 32,
53 c_BunchOffsetSubtracted = 64, // reconstructed average bunch offset
54 };

Constructor & Destructor Documentation

◆ TOPDigit() [1/2]

TOPDigit ( )
inline

Default constructor.

Definition at line 67 of file TOPDigit.h.

68 {}

◆ TOPDigit() [2/2]

TOPDigit ( int  moduleID,
int  pixelID,
double  rawTime 
)
inline

Usefull constructor.

Parameters
moduleIDmodule ID (1-based)
pixelIDpixel ID (1-based)
rawTimeraw time expressed in samples (TDC bins)

Definition at line 76 of file TOPDigit.h.

76 :
77 m_moduleID(moduleID),
78 m_pixelID(pixelID),
79 m_rawTime(rawTime),
80 m_quality(c_Good)
81 {}
float m_rawTime
raw time expressed in samples (TDC bins)
Definition: TOPDigit.h:424
int m_moduleID
module ID (1-based)
Definition: TOPDigit.h:421
EHitQuality m_quality
hit quality
Definition: TOPDigit.h:431
int m_pixelID
software channel ID (1-based)
Definition: TOPDigit.h:422

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 142 of file RelationsObject.h.

143 {
144 if (object)
146 object, object->m_cacheDataStoreEntry, object->m_cacheArrayIndex, weight, namedRelation);
147 }
void addRelation(const TObject *fromObject, StoreEntry *&fromEntry, int &fromIndex, const TObject *toObject, StoreEntry *&toEntry, int &toIndex, float weight, const std::string &namedRelation)
Add a relation from an object in a store array to another object in a store array.
Definition: DataStore.cc:492
static DataStore & Instance()
Instance of singleton Store.
Definition: DataStore.cc:54
DataStore::StoreEntry * m_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.

◆ 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 155 of file RelationsObject.h.

156 {
157 StoreEntry* toEntry = nullptr;
158 int toIndex = -1;
159 DataStore::Instance().addRelation(this, m_cacheDataStoreEntry, m_cacheArrayIndex, object, toEntry, toIndex, weight, namedRelation);
160 }

◆ addStatus()

void addStatus ( unsigned short  bitmask)
inline

Add calibration status.

Definition at line 169 of file TOPDigit.h.

169{ m_status |= bitmask; }
unsigned short m_status
calibration status bits
Definition: TOPDigit.h:432

◆ adjustAppendedBGDigit()

virtual void adjustAppendedBGDigit ( )
inlinevirtualinherited

Virtual method for possible modification of BG digit which is just appended to simulation store array.

Reimplemented in SVDShaperDigit.

Definition at line 62 of file DigitBase.h.

62{}

◆ 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 170 of file RelationsObject.h.

171 {
172 if (!sourceObj)
173 return;
174 auto fromRels = sourceObj->getRelationsFrom<RelationsInterface<BASE>>("ALL");
175 for (unsigned int iRel = 0; iRel < fromRels.size(); iRel++) {
176 fromRels.object(iRel)->addRelationTo(this, fromRels.weight(iRel));
177 }
178
179 auto toRels = sourceObj->getRelationsTo<RelationsInterface<BASE>>("ALL");
180 for (unsigned int iRel = 0; iRel < toRels.size(); iRel++) {
181 this->addRelationTo(toRels.object(iRel), toRels.weight(iRel));
182 }
183 }
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).

◆ getArrayIndex()

int getArrayIndex ( ) const
inlineinherited

Returns this object's array index (in StoreArray), or -1 if not found.

Definition at line 385 of file RelationsObject.h.

386 {
388 return m_cacheArrayIndex;
389 }
bool findStoreEntry(const TObject *object, StoreEntry *&entry, int &index)
Find an object in an array in the data store.
Definition: DataStore.cc:398

◆ getArrayName()

std::string getArrayName ( ) const
inlineinherited

Get name of array this object is stored in, or "" if not found.

Definition at line 377 of file RelationsObject.h.

◆ getArrayPointer()

TClonesArray * getArrayPointer ( ) const
inlineprotectedinherited

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

Definition at line 418 of file RelationsObject.h.

419 {
422 return nullptr;
424 }
TClonesArray * getPtrAsArray() const
Return ptr cast to TClonesArray.
Definition: StoreEntry.cc:83

◆ getASICChannel()

unsigned int getASICChannel ( ) const
inline

Returns ASIC channel number.

Returns
ASIC channel number

Definition at line 336 of file TOPDigit.h.

336{return m_channel & 0x07;}
unsigned m_channel
hardware channel number (0-based)
Definition: TOPDigit.h:423

◆ getASICNumber()

unsigned int getASICNumber ( ) const
inline

Returns ASIC number.

Returns
ASIC number

Definition at line 342 of file TOPDigit.h.

342{return (m_channel >> 3) & 0x03;}

◆ getBoardstackNumber()

unsigned int getBoardstackNumber ( ) const
inline

Returns boardstack number.

Returns
boardstack number

Definition at line 354 of file TOPDigit.h.

354{return (m_channel >> 7) & 0x03;}

◆ getCarrierNumber()

unsigned int getCarrierNumber ( ) const
inline

Returns carrier board number.

Returns
carrier board number

Definition at line 348 of file TOPDigit.h.

348{return (m_channel >> 5) & 0x03;}

◆ getChannel()

unsigned int getChannel ( ) const
inline

Returns hardware channel number.

Returns
hardware channel number

Definition at line 330 of file TOPDigit.h.

330{ return m_channel; }

◆ getFirstWindow()

unsigned getFirstWindow ( ) const
inline

Returns first ASIC window number of the merged waveform this hit is taken from.

Returns
window number

Definition at line 402 of file TOPDigit.h.

402{ return m_firstWindow;}
unsigned short m_firstWindow
first ASIC window of the merged waveform
Definition: TOPDigit.h:430

◆ getHitQuality()

EHitQuality getHitQuality ( ) const
inline

Returns hit quality.

Returns
hit quality

Definition at line 201 of file TOPDigit.h.

201{return m_quality; }

◆ 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 370 of file RelationsObject.h.

371 {
373 }
virtual std::string getInfoHTML() const
Return a short summary of this object's contents in HTML format.
std::string htmlToPlainText(const std::string &html)
See RelationsObject::getInfo()

◆ 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();
std::string getString(const TMatrixFBase &matrix, int precision=2, bool color=true)
get HTML table representing a matrix.
Definition: HTML.cc:24
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 Particle, Cluster, MCParticle, PIDLikelihood, SoftwareTriggerResult, Track, TrackFitResult, TRGSummary, and RecoTrack.

Definition at line 362 of file RelationsObject.h.

362{ return ""; }

◆ getIntegral()

int getIntegral ( ) const
inline

Returns pulse integral.

Returns
pulse integral [ADC counts]

Definition at line 396 of file TOPDigit.h.

396{return m_integral;}
int m_integral
pulse integral [ADC counts]
Definition: TOPDigit.h:429

◆ getModuleID()

int getModuleID ( ) const
inline

Returns module ID.

Returns
module ID

Definition at line 270 of file TOPDigit.h.

270{ return m_moduleID; }

◆ getName()

virtual std::string getName ( ) const
inlinevirtualinherited

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

pi+ for an MCParticle.

Reimplemented in Particle, MCParticle, and SpacePoint.

Definition at line 344 of file RelationsObject.h.

344{ return ""; }

◆ getPixelCol()

int getPixelCol ( ) const
inline

Returns pixel column number (1-based)

Returns
pixel column number

Definition at line 288 of file TOPDigit.h.

288{ return (m_pixelID - 1) % 64 + 1;}

◆ getPixelID()

int getPixelID ( ) const
inline

Returns pixel ID (1-based)

Returns
software channel ID

Definition at line 276 of file TOPDigit.h.

276{ return m_pixelID; }

◆ getPixelRow()

int getPixelRow ( ) const
inline

Returns pixel row number (1-based)

Returns
pixel row number

Definition at line 282 of file TOPDigit.h.

282{ return (m_pixelID - 1) / 64 + 1;}

◆ getPMTCol()

int getPMTCol ( ) const
inline

Returns PMT column number (1-based)

Returns
PMT column number

Definition at line 300 of file TOPDigit.h.

300{return (getPixelCol() - 1) / 4 + 1;}
int getPixelCol() const
Returns pixel column number (1-based)
Definition: TOPDigit.h:288

◆ getPMTNumber()

int getPMTNumber ( ) const
inline

Returns PMT number (1-based)

Returns
PMT number

Definition at line 306 of file TOPDigit.h.

306{return getPMTCol() + (getPMTRow() - 1) * 16;}
int getPMTRow() const
Returns PMT row number (1-based)
Definition: TOPDigit.h:294
int getPMTCol() const
Returns PMT column number (1-based)
Definition: TOPDigit.h:300

◆ getPMTPixel()

int getPMTPixel ( ) const
inline

Returns PMT pixel number (1-based)

Returns
PMT pixel

Definition at line 324 of file TOPDigit.h.

324{return getPMTPixelCol() + (getPMTPixelRow() - 1) * 4;}
int getPMTPixelCol() const
Returns PMT pixel column number (1-based)
Definition: TOPDigit.h:318
int getPMTPixelRow() const
Returns PMT pixel row number (1-based)
Definition: TOPDigit.h:312

◆ getPMTPixelCol()

int getPMTPixelCol ( ) const
inline

Returns PMT pixel column number (1-based)

Returns
PMT pixel column number

Definition at line 318 of file TOPDigit.h.

318{return (getPixelCol() - 1) % 4 + 1;}

◆ getPMTPixelRow()

int getPMTPixelRow ( ) const
inline

Returns PMT pixel row number (1-based)

Returns
PMT pixel row number

Definition at line 312 of file TOPDigit.h.

312{return (getPixelRow() - 1) % 4 + 1;}
int getPixelRow() const
Returns pixel row number (1-based)
Definition: TOPDigit.h:282

◆ getPMTRow()

int getPMTRow ( ) const
inline

Returns PMT row number (1-based)

Returns
PMT row number

Definition at line 294 of file TOPDigit.h.

294{return (getPixelRow() - 1) / 4 + 1;}

◆ getPulseHeight()

int getPulseHeight ( ) const
inline

Returns pulse height.

Returns
pulse height [ADC counts]

Definition at line 384 of file TOPDigit.h.

384{ return m_pulseHeight; }
int m_pulseHeight
pulse height [ADC counts]
Definition: TOPDigit.h:427

◆ getPulseWidth()

double getPulseWidth ( ) const
inline

Returns pulse width.

Returns
pulse width (FWHM) in [ns]

Definition at line 390 of file TOPDigit.h.

390{ return m_pulseWidth; }
float m_pulseWidth
pulse width (FWHM) in [ns]
Definition: TOPDigit.h:428

◆ getRawTime()

double getRawTime ( ) const
inline

Returns raw detection time.

Returns
time expressed in samples (TDC bins)

Definition at line 360 of file TOPDigit.h.

360{ return m_rawTime; }

◆ 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 278 of file RelationsObject.h.

279 {
281 T::Class(), name, namedRelation).object);
282 }
@ c_BothSides
Combination of c_FromSide and c_ToSide.
Definition: DataStore.h:79
Belle2::RelationEntry getRelationWith(ESearchSide searchSide, const TObject *object, StoreEntry *&entry, int &index, const TClass *withClass, const std::string &withName, const std::string &namedRelation)
Get the first relation between an object and another object in a store array.
Definition: DataStore.cc:597
TObject * object
Pointer to the object.
Definition: RelationEntry.h:32

◆ 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 263 of file RelationsObject.h.

264 {
266 m_cacheArrayIndex, FROM::Class(), name, namedRelation).object);
267 }
@ c_FromSide
Return relations/objects pointed from (to a given object).
Definition: DataStore.h:77

◆ 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 314 of file RelationsObject.h.

316 {
318 FROM::Class(), name, namedRelation);
319 return std::make_pair(static_cast<FROM*>(entry.object), entry.weight);
320 }

◆ 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 248 of file RelationsObject.h.

249 {
251 TO::Class(), name, namedRelation).object);
252 }
@ c_ToSide
Return relations/objects pointed to (from a given object).
Definition: DataStore.h:78

◆ 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 297 of file RelationsObject.h.

299 {
301 TO::Class(), name, namedRelation);
302 return std::make_pair(static_cast<TO*>(entry.object), entry.weight);
303 }

◆ 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 331 of file RelationsObject.h.

333 {
335 T::Class(), name, namedRelation);
336 return std::make_pair(static_cast<T*>(entry.object), entry.weight);
337 }

◆ 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 212 of file RelationsObject.h.

214 {
216 m_cacheArrayIndex, FROM::Class(), name, namedRelation));
217 }
RelationVector< T > getRelationsWith(const std::string &name="", const std::string &namedRelation="") const
Get the relations between this object and another store array.

◆ 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 197 of file RelationsObject.h.

198 {
200 m_cacheArrayIndex, TO::Class(), name, namedRelation));
201 }

◆ 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 230 of file RelationsObject.h.

231 {
233 m_cacheArrayIndex, T::Class(), name, namedRelation));
234 }

◆ getStatus()

unsigned short getStatus ( ) const
inline

Returns calibration status bits.

Returns
status bits

Definition at line 207 of file TOPDigit.h.

207{return m_status;}

◆ getTime()

double getTime ( ) const
inline

Returns t0-subtracted and calibrated time.

Returns
time in [ns]

Definition at line 372 of file TOPDigit.h.

372{ return m_time; }
float m_time
calibrated time in [ns], t0-subtracted
Definition: TOPDigit.h:425

◆ getTimeError()

double getTimeError ( ) const
inline

Returns calibrated time uncertainty.

Returns
uncertainty (r.m.s.) in [ns]

Definition at line 378 of file TOPDigit.h.

378{return m_timeError;}
float m_timeError
time uncertainty (r.m.s) in [ns]
Definition: TOPDigit.h:426

◆ getUniqueChannelID()

unsigned int getUniqueChannelID ( ) const
inlineoverridevirtual

Implementation of the base class function.

Enables BG overlay module to identify uniquely the physical channel of this Digit.

Returns
unique channel ID, composed of pixel ID (1-512) and module ID (1-16)

Implements DigitBase.

Definition at line 409 of file TOPDigit.h.

409{return m_pixelID + (m_moduleID << 16);}

◆ hasStatus()

bool hasStatus ( unsigned short  bitmask) const
inline

Returns calibration status.

Returns
calibration status

Definition at line 213 of file TOPDigit.h.

214 {
215 return (m_status & bitmask) == bitmask;
216 }

◆ isCalibrated()

bool isCalibrated ( ) const
inline

Returns calibration status.

Returns
true, if fully calibrated

Definition at line 222 of file TOPDigit.h.

222{return hasStatus(c_FullyCalibrated);}
bool hasStatus(unsigned short bitmask) const
Returns calibration status.
Definition: TOPDigit.h:213

◆ isChannelT0Calibrated()

bool isChannelT0Calibrated ( ) const
inline

Returns calibration status.

Returns
true, if channel T0 calibrated

Definition at line 234 of file TOPDigit.h.

234{return hasStatus(c_ChannelT0Calibrated);}

◆ isChargeShare()

bool isChargeShare ( ) const
inline

Returns charge share status.

Returns
true, if digit is sharing charge with some other digits

Definition at line 252 of file TOPDigit.h.

252{return m_chargeShare != 0;}
unsigned short m_chargeShare
charge sharing flags
Definition: TOPDigit.h:433

◆ isCommonT0Calibrated()

bool isCommonT0Calibrated ( ) const
inline

Returns calibration status.

Returns
true, if common T0 calibrated

Definition at line 246 of file TOPDigit.h.

246{return hasStatus(c_CommonT0Calibrated);}

◆ isModuleT0Calibrated()

bool isModuleT0Calibrated ( ) const
inline

Returns calibration status.

Returns
true, if module T0 calibrated

Definition at line 240 of file TOPDigit.h.

240{return hasStatus(c_ModuleT0Calibrated);}

◆ isPrimaryChargeShare()

bool isPrimaryChargeShare ( ) const
inline

Returns charge share status.

Returns
true, if digit is the primary one among those sharing the same charge

Definition at line 258 of file TOPDigit.h.

◆ isSecondaryChargeShare()

bool isSecondaryChargeShare ( ) const
inline

Returns charge share status.

Returns
true, if digit is not the primary one among those sharing the same charge

Definition at line 264 of file TOPDigit.h.

◆ isTimeBaseCalibrated()

bool isTimeBaseCalibrated ( ) const
inline

Returns calibration status.

Returns
true, if time base calibrated

Definition at line 228 of file TOPDigit.h.

228{return hasStatus(c_TimeBaseCalibrated);}

◆ removeStatus()

void removeStatus ( unsigned short  bitmask)
inline

Remove calibration status.

Definition at line 174 of file TOPDigit.h.

174{ m_status &= (~bitmask); }

◆ resetChargeShare()

void resetChargeShare ( )
inline

Remove charge share flag.

Definition at line 189 of file TOPDigit.h.

189{m_chargeShare = 0;}

◆ setChannel()

void setChannel ( unsigned int  channel)
inline

Sets hardware channel number (0-based)

Parameters
channelhardware channel number

Definition at line 111 of file TOPDigit.h.

111{m_channel = channel;}

◆ setDoubleHitResolution()

static void setDoubleHitResolution ( double  time)
inlinestatic

Sets double hit resolution.

Parameters
timedouble hit resolving time in [ns]

Definition at line 87 of file TOPDigit.h.

static float s_doubleHitResolution
double hit resolving time in [ns]
Definition: TOPDigit.h:435

◆ setFirstWindow()

void setFirstWindow ( unsigned  window)
inline

Sets first ASIC window number of the merged waveform this hit is taken from.

Parameters
windowASIC window number

Definition at line 153 of file TOPDigit.h.

153{ m_firstWindow = window;}

◆ setHitQuality()

void setHitQuality ( EHitQuality  quality)
inline

Sets hit quality flag.

Parameters
qualityhit quality

Definition at line 159 of file TOPDigit.h.

159{m_quality = quality;}

◆ setIntegral()

void setIntegral ( int  integral)
inline

Sets pulse integral.

Parameters
integralpulse integral [ADC counts]

Definition at line 147 of file TOPDigit.h.

147{m_integral = integral;}

◆ setModuleID()

void setModuleID ( int  moduleID)
inline

Sets module ID.

Parameters
moduleIDmodule ID (1-based)

Definition at line 99 of file TOPDigit.h.

99{m_moduleID = moduleID;}

◆ setPileupTime()

static void setPileupTime ( double  time)
inlinestatic

Sets pile-up time.

Parameters
timepile-up time in [ns]

Definition at line 93 of file TOPDigit.h.

93{s_pileupTime = time;}
static float s_pileupTime
pile-up time in [ns]
Definition: TOPDigit.h:436

◆ setPixelID()

void setPixelID ( int  pixelID)
inline

Sets pixel ID.

Parameters
pixelIDpixel ID (1-based)

Definition at line 105 of file TOPDigit.h.

105{m_pixelID = pixelID;}

◆ setPrimaryChargeShare()

void setPrimaryChargeShare ( )
inline

Sets primary charge share flag.

Definition at line 179 of file TOPDigit.h.

◆ setPulseHeight()

void setPulseHeight ( int  pulseHeight)
inline

Sets pulse height.

Parameters
pulseHeightpulse height [ADC counts]

Definition at line 135 of file TOPDigit.h.

135{m_pulseHeight = pulseHeight;}

◆ setPulseWidth()

void setPulseWidth ( double  width)
inline

Sets pulse width.

Parameters
widthpulse width (FWHM) in [ns]

Definition at line 141 of file TOPDigit.h.

141{m_pulseWidth = width;}

◆ setRawTime()

void setRawTime ( double  rawTime)
inline

Sets raw detection time.

Parameters
rawTimeraw time expressed in samples (TDC bins)

Definition at line 117 of file TOPDigit.h.

117{m_rawTime = rawTime;}

◆ setSecondaryChargeShare()

void setSecondaryChargeShare ( )
inline

Sets secondary charge share flag.

Definition at line 184 of file TOPDigit.h.

◆ setStatus()

void setStatus ( unsigned short  status)
inline

Sets calibration status (overwrites previously set bits)

Definition at line 164 of file TOPDigit.h.

164{ m_status = status; }

◆ setTime()

void setTime ( double  time)
inline

Sets calibrated detection time.

Parameters
timetime in [ns]

Definition at line 123 of file TOPDigit.h.

123{m_time = time;}

◆ setTimeError()

void setTimeError ( double  timeError)
inline

Sets calibrated time uncertainty.

Parameters
timeErroruncertainty (r.m.s.) in [ns]

Definition at line 129 of file TOPDigit.h.

129{m_timeError = timeError;}

◆ subtractT0()

void subtractT0 ( double  t0)
inline

Subtract start time from m_time.

Parameters
t0start time in [ns]

Definition at line 195 of file TOPDigit.h.

195{ m_time -= t0;}

Member Data Documentation

◆ m_cacheArrayIndex

int m_cacheArrayIndex
mutableprivateinherited

Cache of the index in the TClonesArray to which this object belongs.

Definition at line 432 of file RelationsObject.h.

◆ m_cacheDataStoreEntry

DataStore::StoreEntry* m_cacheDataStoreEntry
mutableprivateinherited

Cache of the data store entry to which this object belongs.

Definition at line 429 of file RelationsObject.h.

◆ m_channel

unsigned m_channel = 0
private

hardware channel number (0-based)

Definition at line 423 of file TOPDigit.h.

◆ m_chargeShare

unsigned short m_chargeShare = 0
private

charge sharing flags

Definition at line 433 of file TOPDigit.h.

◆ m_firstWindow

unsigned short m_firstWindow = 0
private

first ASIC window of the merged waveform

Definition at line 430 of file TOPDigit.h.

◆ m_integral

int m_integral = 0
private

pulse integral [ADC counts]

Definition at line 429 of file TOPDigit.h.

◆ m_moduleID

int m_moduleID = 0
private

module ID (1-based)

Definition at line 421 of file TOPDigit.h.

◆ m_pixelID

int m_pixelID = 0
private

software channel ID (1-based)

Definition at line 422 of file TOPDigit.h.

◆ m_pulseHeight

int m_pulseHeight = 0
private

pulse height [ADC counts]

Definition at line 427 of file TOPDigit.h.

◆ m_pulseWidth

float m_pulseWidth = 0
private

pulse width (FWHM) in [ns]

Definition at line 428 of file TOPDigit.h.

◆ m_quality

EHitQuality m_quality = c_Junk
private

hit quality

Definition at line 431 of file TOPDigit.h.

◆ m_rawTime

float m_rawTime = 0
private

raw time expressed in samples (TDC bins)

Definition at line 424 of file TOPDigit.h.

◆ m_status

unsigned short m_status = 0
private

calibration status bits

Definition at line 432 of file TOPDigit.h.

◆ m_time

float m_time = 0
private

calibrated time in [ns], t0-subtracted

Definition at line 425 of file TOPDigit.h.

◆ m_timeError

float m_timeError = 0
private

time uncertainty (r.m.s) in [ns]

Definition at line 426 of file TOPDigit.h.


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