Project
Loading...
Searching...
No Matches
o2::cpv::Digit Class Reference

#include <Digit.h>

Inherits o2::dataformats::TimeStamp< T >.

Public Member Functions

 Digit ()=default
 
 Digit (unsigned short cell, float amplitude, int label)
 Main Digit constructor.
 
 ~Digit ()=default
 
bool operator< (const Digit &other) const
 Comparison oparator, based on time and absId.
 
bool operator> (const Digit &other) const
 Comparison oparator, based on time and absId.
 
bool operator== (const Digit &other) const
 Comparison oparator, based on time and absId.
 
bool canAdd (const Digit other) const
 Check, if one can add two digits.
 
Digitoperator+= (const Digit &other)
 if addable, adds energy and list of primaries.
 
unsigned short getAbsId () const
 Absolute sell id.
 
void setAbsId (unsigned short cellId)
 
float getAmplitude () const
 Energy deposited in a cell.
 
void setAmplitude (float amplitude)
 
int getLabel () const
 index of entry in MCLabels array
 
void setLabel (int l)
 
void reset ()
 
void PrintStream (std::ostream &stream) const
 
- Public Member Functions inherited from o2::dataformats::TimeStamp< T >
 GPUhdDefault () TimeStamp()=default
 
 GPUhdDefault () ~TimeStamp()=default
 
 GPUdi () TimeStamp(T time)
 
 GPUhdi () T getTimeStamp() const
 
 GPUdi () void setTimeStamp(T t)
 
 GPUdi () bool operator
 
 ClassDefNV (TimeStamp, 1)
 

Static Public Attributes

static constexpr int kTimeGate = 25
 

Detailed Description

Definition at line 28 of file Digit.h.

Constructor & Destructor Documentation

◆ Digit() [1/2]

o2::cpv::Digit::Digit ( )
default

◆ Digit() [2/2]

Digit::Digit ( unsigned short  cell,
float  amplitude,
int  label 
)

Main Digit constructor.

Parameters
cellabsId of a cell, amplitude energy deposited in a cell, time time measured in cell, label label of a particle in case of MC
Returns
constructed Digit

Definition at line 21 of file Digit.cxx.

◆ ~Digit()

o2::cpv::Digit::~Digit ( )
default

Member Function Documentation

◆ canAdd()

bool Digit::canAdd ( const Digit  other) const

Check, if one can add two digits.

Parameters
anotherCPV Digit
Returns
true if time stamps are same and absId are same

Definition at line 25 of file Digit.cxx.

◆ getAbsId()

unsigned short o2::cpv::Digit::getAbsId ( ) const
inline

Absolute sell id.

Definition at line 87 of file Digit.h.

◆ getAmplitude()

float o2::cpv::Digit::getAmplitude ( ) const
inline

Energy deposited in a cell.

Definition at line 91 of file Digit.h.

◆ getLabel()

int o2::cpv::Digit::getLabel ( ) const
inline

index of entry in MCLabels array

Returns
ndex of entry in MCLabels array

Definition at line 96 of file Digit.h.

◆ operator+=()

Digit & Digit::operator+= ( const Digit other)

if addable, adds energy and list of primaries.

Parameters
anotherCPV Digit
Returns
digit with sum of energies

Definition at line 30 of file Digit.cxx.

◆ operator<()

bool o2::cpv::Digit::operator< ( const Digit other) const
inline

Comparison oparator, based on time and absId.

Parameters
anotherCPV Digit
Returns
result of comparison: first time, if time same, then absId

Definition at line 47 of file Digit.h.

◆ operator==()

bool o2::cpv::Digit::operator== ( const Digit other) const
inline

Comparison oparator, based on time and absId.

Parameters
anotherCPV Digit
Returns
result of comparison: first time, if time same, then absId

Definition at line 71 of file Digit.h.

◆ operator>()

bool o2::cpv::Digit::operator> ( const Digit other) const
inline

Comparison oparator, based on time and absId.

Parameters
anotherCPV Digit
Returns
result of comparison: first time, if time same, then absId

Definition at line 59 of file Digit.h.

◆ PrintStream()

void Digit::PrintStream ( std::ostream &  stream) const

Definition at line 48 of file Digit.cxx.

◆ reset()

void o2::cpv::Digit::reset ( )
inline

Definition at line 100 of file Digit.h.

◆ setAbsId()

void o2::cpv::Digit::setAbsId ( unsigned short  cellId)
inline

Definition at line 88 of file Digit.h.

◆ setAmplitude()

void o2::cpv::Digit::setAmplitude ( float  amplitude)
inline

Definition at line 92 of file Digit.h.

◆ setLabel()

void o2::cpv::Digit::setLabel ( int  l)
inline

Definition at line 97 of file Digit.h.

Member Data Documentation

◆ kTimeGate

constexpr int o2::cpv::Digit::kTimeGate = 25
staticconstexpr

Definition at line 32 of file Digit.h.


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