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

#include <Digit.h>

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

Public Member Functions

 Digit ()=default
 
 Digit (short cell, float amplitude, float time, int label)
 Main Digit constructor.
 
 Digit (short cell, float amplitude, float time, bool isTrigger2x2, int label)
 Contructor for TRU Digits.
 
 Digit (const Hit &hit, int label)
 Digit constructor from Hit.
 
 ~Digit ()=default
 
void fillFromHit (const Hit &hit)
 Replace content of this digit with new one, from hit.
 
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.
 
void addEnergyTime (float energy, float time)
 
bool isTRU () const
 
short getAbsId () const
 Absolute sell id.
 
void setAbsId (short cellId)
 
short getTRUId () const
 
void setTRUId (short cellId)
 
float getAmplitude () const
 Energy deposited in a cell.
 
void setAmplitude (float amplitude)
 
float getTime () const
 time measured in digit w.r.t. photon to PHOS arrival
 
void setTime (float time)
 
bool isHighGain () const
 Checks if this digit is produced in High Gain or Low Gain channels.
 
void setHighGain (Bool_t isHG)
 
bool is2x2Tile () const
 
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/4]

o2::phos::Digit::Digit ( )
default

◆ Digit() [2/4]

Digit::Digit ( short  cell,
float  amplitude,
float  time,
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() [3/4]

Digit::Digit ( short  cell,
float  amplitude,
float  time,
bool  isTrigger2x2,
int  label 
)

Contructor for TRU Digits.

Parameters
celltruId of a tile, amplitude energy deposited in a tile, time, triggerType 2x2 or 4x4, dummy label

Definition at line 25 of file Digit.cxx.

◆ Digit() [4/4]

Digit::Digit ( const Hit hit,
int  label 
)

Digit constructor from Hit.

Parameters
PHOSHit
Returns
constructed Digit

Definition at line 30 of file Digit.cxx.

◆ ~Digit()

o2::phos::Digit::~Digit ( )
default

Member Function Documentation

◆ addEnergyTime()

void Digit::addEnergyTime ( float  energy,
float  time 
)

Definition at line 67 of file Digit.cxx.

◆ canAdd()

bool Digit::canAdd ( const Digit  other) const

Check, if one can add two digits.

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

Definition at line 40 of file Digit.cxx.

◆ fillFromHit()

void Digit::fillFromHit ( const Hit hit)

Replace content of this digit with new one, from hit.

Parameters
PHOSHit
Returns

Definition at line 33 of file Digit.cxx.

◆ getAbsId()

short o2::phos::Digit::getAbsId ( ) const
inline

Absolute sell id.

Definition at line 106 of file Digit.h.

◆ getAmplitude()

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

Energy deposited in a cell.

Definition at line 113 of file Digit.h.

◆ getLabel()

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

index of entry in MCLabels array

Returns
ndex of entry in MCLabels array

Definition at line 128 of file Digit.h.

◆ getTime()

float o2::phos::Digit::getTime ( ) const
inline

time measured in digit w.r.t. photon to PHOS arrival

Definition at line 117 of file Digit.h.

◆ getTRUId()

short o2::phos::Digit::getTRUId ( ) const
inline

Definition at line 109 of file Digit.h.

◆ is2x2Tile()

bool o2::phos::Digit::is2x2Tile ( ) const
inline

Definition at line 124 of file Digit.h.

◆ isHighGain()

bool o2::phos::Digit::isHighGain ( ) const
inline

Checks if this digit is produced in High Gain or Low Gain channels.

Definition at line 121 of file Digit.h.

◆ isTRU()

bool o2::phos::Digit::isTRU ( ) const
inline

Definition at line 103 of file Digit.h.

◆ operator+=()

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

if addable, adds energy and list of primaries.

Parameters
anotherPHOS Digit
Returns
digit with sum of energies and longer list of primaries

Definition at line 45 of file Digit.cxx.

◆ operator<()

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

Comparison oparator, based on time and absId.

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

Definition at line 61 of file Digit.h.

◆ operator==()

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

Comparison oparator, based on time and absId.

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

Definition at line 85 of file Digit.h.

◆ operator>()

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

Comparison oparator, based on time and absId.

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

Definition at line 73 of file Digit.h.

◆ PrintStream()

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

Definition at line 77 of file Digit.cxx.

◆ reset()

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

Definition at line 131 of file Digit.h.

◆ setAbsId()

void o2::phos::Digit::setAbsId ( short  cellId)
inline

Definition at line 107 of file Digit.h.

◆ setAmplitude()

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

Definition at line 114 of file Digit.h.

◆ setHighGain()

void o2::phos::Digit::setHighGain ( Bool_t  isHG)
inline

Definition at line 122 of file Digit.h.

◆ setLabel()

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

Definition at line 129 of file Digit.h.

◆ setTime()

void o2::phos::Digit::setTime ( float  time)
inline

Definition at line 118 of file Digit.h.

◆ setTRUId()

void o2::phos::Digit::setTRUId ( short  cellId)
inline

Definition at line 110 of file Digit.h.

Member Data Documentation

◆ kTimeGate

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

Definition at line 32 of file Digit.h.


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