![]() |
Belle II Software
release-05-02-19
|
Class to store TOP digitized hits (output of TOPDigitizer or raw data unpacker) relations to TOPSimHits, MCParticles. More...
#include <TOPDigit.h>
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 | |
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. More... | |
void | setModuleID (int moduleID) |
Sets module ID. More... | |
void | setPixelID (int pixelID) |
Sets pixel ID. More... | |
void | setChannel (unsigned int channel) |
Sets hardware channel number (0-based) More... | |
void | setRawTime (double rawTime) |
Sets raw detection time. More... | |
void | setTime (double time) |
Sets calibrated detection time. More... | |
void | setTimeError (double timeError) |
Sets calibrated time uncertainty. More... | |
void | setPulseHeight (int pulseHeight) |
Sets pulse height. More... | |
void | setPulseWidth (double width) |
Sets pulse width. More... | |
void | setIntegral (int integral) |
Sets pulse integral. More... | |
void | setFirstWindow (unsigned window) |
Sets first ASIC window number of the merged waveform this hit is taken from. More... | |
void | setHitQuality (EHitQuality quality) |
Sets hit quality flag. More... | |
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. More... | |
EHitQuality | getHitQuality () const |
Returns hit quality. More... | |
unsigned short | getStatus () const |
Returns calibration status bits. More... | |
bool | hasStatus (unsigned short bitmask) const |
Returns calibration status. More... | |
bool | isCalibrated () const |
Returns calibration status. More... | |
bool | isTimeBaseCalibrated () const |
Returns calibration status. More... | |
bool | isChannelT0Calibrated () const |
Returns calibration status. More... | |
bool | isModuleT0Calibrated () const |
Returns calibration status. More... | |
bool | isCommonT0Calibrated () const |
Returns calibration status. More... | |
bool | isChargeShare () const |
Returns charge share status. More... | |
bool | isPrimaryChargeShare () const |
Returns charge share status. More... | |
bool | isSecondaryChargeShare () const |
Returns charge share status. More... | |
int | getModuleID () const |
Returns module ID. More... | |
int | getPixelID () const |
Returns pixel ID (1-based) More... | |
int | getPixelRow () const |
Returns pixel row number (1-based) More... | |
int | getPixelCol () const |
Returns pixel column number (1-based) More... | |
int | getPMTRow () const |
Returns PMT row number (1-based) More... | |
int | getPMTCol () const |
Returns PMT column number (1-based) More... | |
int | getPMTNumber () const |
Returns PMT number (1-based) More... | |
int | getPMTPixelRow () const |
Returns PMT pixel row number (1-based) More... | |
int | getPMTPixelCol () const |
Returns PMT pixel column number (1-based) More... | |
int | getPMTPixel () const |
Returns PMT pixel number (1-based) More... | |
unsigned int | getChannel () const |
Returns hardware channel number. More... | |
unsigned int | getASICChannel () const |
Returns ASIC channel number. More... | |
unsigned int | getASICNumber () const |
Returns ASIC number. More... | |
unsigned int | getCarrierNumber () const |
Returns carrier board number. More... | |
unsigned int | getBoardstackNumber () const |
Returns boardstack number. More... | |
double | getRawTime () const |
Returns raw detection time. More... | |
int | getModulo256Sample () const |
Returns sample number modulo 256. More... | |
double | getTime () const |
Returns t0-subtracted and calibrated time. More... | |
double | getTimeError () const |
Returns calibrated time uncertainty. More... | |
int | getPulseHeight () const |
Returns pulse height. More... | |
double | getPulseWidth () const |
Returns pulse width. More... | |
int | getIntegral () const |
Returns pulse integral. More... | |
unsigned | getFirstWindow () const |
Returns first ASIC window number of the merged waveform this hit is taken from. More... | |
unsigned int | getUniqueChannelID () const override |
Implementation of the base class function. More... | |
DigitBase::EAppendStatus | addBGDigit (const DigitBase *bg) override |
Implementation of the base class function. More... | |
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 | |
static void | setDoubleHitResolution (double time) |
Sets double hit resolution. More... | |
static void | setPileupTime (double time) |
Sets pile-up time. More... | |
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::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. | |
Static Private Attributes | |
static float | s_doubleHitResolution = 0 |
double hit resolving time in [ns] | |
static float | s_pileupTime = 0 |
pile-up time in [ns] | |
Class to store TOP digitized hits (output of TOPDigitizer or raw data unpacker) relations to TOPSimHits, MCParticles.
Definition at line 34 of file TOPDigit.h.
|
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 42 of file DigitBase.h.
enum 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 69 of file TOPDigit.h.
enum 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 43 of file TOPDigit.h.
|
inline |
Usefull constructor.
moduleID | module ID (1-based) |
pixelID | pixel ID (1-based) |
rawTime | raw time expressed in samples (TDC bins) |
Definition at line 86 of file TOPDigit.h.
|
inlineinherited |
Add a relation from this object to another object (with caching).
object | The object to which the relation should point. |
weight | The weight of the relation. |
namedRelation | Additional name for the relation, or "" for the default naming |
Definition at line 144 of file RelationsObject.h.
|
inlineinherited |
Add a relation from this object to another object (no caching, can be quite slow).
object | The object to which the relation should point. |
weight | The weight of the relation. |
namedRelation | Additional name for the relation, or "" for the default naming |
Definition at line 157 of file RelationsObject.h.
|
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.
|
inline |
|
inline |
|
inline |
|
inline |
Returns carrier board number.
Definition at line 358 of file TOPDigit.h.
|
inline |
Returns hardware channel number.
Definition at line 340 of file TOPDigit.h.
|
inline |
Returns first ASIC window number of the merged waveform this hit is taken from.
Definition at line 412 of file TOPDigit.h.
|
inline |
|
inlineinherited |
Return a short summary of this object's contents in raw text format.
Returns the contents of getInfoHTML() while translating line-breaks etc.
Definition at line 372 of file RelationsObject.h.
|
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:
Reimplemented in TrackFitResult, TRGSummary, Track, SoftwareTriggerResult, Particle, RecoTrack, MCParticle, Cluster, and PIDLikelihood.
Definition at line 364 of file RelationsObject.h.
|
inline |
Returns pulse integral.
Definition at line 406 of file TOPDigit.h.
|
inline |
|
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.
|
inline |
Returns pixel column number (1-based)
Definition at line 298 of file TOPDigit.h.
|
inline |
|
inline |
Returns pixel row number (1-based)
Definition at line 292 of file TOPDigit.h.
|
inline |
Returns PMT column number (1-based)
Definition at line 310 of file TOPDigit.h.
|
inline |
|
inline |
|
inline |
Returns PMT pixel column number (1-based)
Definition at line 328 of file TOPDigit.h.
|
inline |
Returns PMT pixel row number (1-based)
Definition at line 322 of file TOPDigit.h.
|
inline |
|
inline |
|
inline |
|
inline |
Returns raw detection time.
Definition at line 370 of file TOPDigit.h.
|
inlineinherited |
Get the object to or from which this object has a relation.
T | The class of objects to or from which the relation points. |
name | The 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. |
namedRelation | Additional name for the relation, or "" for the default naming |
Definition at line 280 of file RelationsObject.h.
|
inlineinherited |
Get the object from which this object has a relation.
FROM | The class of objects from which the relation points. |
name | The 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. |
namedRelation | Additional name for the relation, or "" for the default naming |
Definition at line 265 of file RelationsObject.h.
|
inlineinherited |
Get first related object & weight of relation pointing from an array.
FROM | The class of objects from which the relation points. |
name | The 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. |
namedRelation | Additional name for the relation, or "" for the default naming |
Definition at line 316 of file RelationsObject.h.
|
inlineinherited |
Get the object to which this object has a relation.
TO | The class of objects to which the relation points. |
name | The 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. |
namedRelation | Additional name for the relation, or "" for the default naming |
Definition at line 250 of file RelationsObject.h.
|
inlineinherited |
Get first related object & weight of relation pointing to an array.
TO | The class of objects to which the relation points. |
name | The 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. |
namedRelation | Additional name for the relation, or "" for the default naming |
Definition at line 299 of file RelationsObject.h.
|
inlineinherited |
Get first related object & weight of relation pointing from/to an array.
T | The class of objects to or from which the relation points. |
name | The 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. |
namedRelation | Additional name for the relation, or "" for the default naming |
Definition at line 333 of file RelationsObject.h.
|
inlineinherited |
Get the relations that point from another store array to this object.
FROM | The class of objects from which the relations point. |
name | The 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. |
namedRelation | Additional name for the relation, or "" for the default naming |
Definition at line 214 of file RelationsObject.h.
|
inlineinherited |
Get the relations that point from this object to another store array.
TO | The class of objects to which the relations point. |
name | The 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. |
namedRelation | Additional name for the relation, or "" for the default naming |
Definition at line 199 of file RelationsObject.h.
|
inlineinherited |
Get the relations between this object and another store array.
Relations in both directions are returned.
T | The class of objects to or from which the relations point. |
name | The 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. |
namedRelation | Additional name for the relation, or "" for the default naming |
Definition at line 232 of file RelationsObject.h.
|
inline |
|
inline |
Returns t0-subtracted and calibrated time.
Definition at line 382 of file TOPDigit.h.
|
inline |
Returns calibrated time uncertainty.
Definition at line 388 of file TOPDigit.h.
|
inlineoverridevirtual |
Implementation of the base class function.
Enables BG overlay module to identify uniquely the physical channel of this Digit.
Implements DigitBase.
Definition at line 419 of file TOPDigit.h.
|
inline |
|
inline |
Returns calibration status.
Definition at line 232 of file TOPDigit.h.
|
inline |
Returns calibration status.
Definition at line 244 of file TOPDigit.h.
|
inline |
Returns charge share status.
Definition at line 262 of file TOPDigit.h.
|
inline |
Returns calibration status.
Definition at line 256 of file TOPDigit.h.
|
inline |
Returns calibration status.
Definition at line 250 of file TOPDigit.h.
|
inline |
Returns charge share status.
Definition at line 268 of file TOPDigit.h.
|
inline |
Returns charge share status.
Definition at line 274 of file TOPDigit.h.
|
inline |
Returns calibration status.
Definition at line 238 of file TOPDigit.h.
|
inline |
Sets hardware channel number (0-based)
channel | hardware channel number |
Definition at line 121 of file TOPDigit.h.
|
inlinestatic |
Sets double hit resolution.
time | double hit resolving time in [ns] |
Definition at line 97 of file TOPDigit.h.
|
inline |
Sets first ASIC window number of the merged waveform this hit is taken from.
window | ASIC window number |
Definition at line 163 of file TOPDigit.h.
|
inline |
|
inline |
Sets pulse integral.
integral | pulse integral [ADC counts] |
Definition at line 157 of file TOPDigit.h.
|
inline |
|
inlinestatic |
|
inline |
|
inline |
Sets pulse height.
pulseHeight | pulse height [ADC counts] |
Definition at line 145 of file TOPDigit.h.
|
inline |
Sets pulse width.
width | pulse width (FWHM) in [ns] |
Definition at line 151 of file TOPDigit.h.
|
inline |
Sets raw detection time.
rawTime | raw time expressed in samples (TDC bins) |
Definition at line 127 of file TOPDigit.h.
|
inline |
Sets calibrated detection time.
time | time in [ns] |
Definition at line 133 of file TOPDigit.h.
|
inline |
Sets calibrated time uncertainty.
timeError | uncertainty (r.m.s.) in [ns] |
Definition at line 139 of file TOPDigit.h.
|
inline |
Subtract start time from m_time.
t0 | start time in [ns] |
Definition at line 205 of file TOPDigit.h.