Project
Loading...
Searching...
No Matches
o2::emcal::EventContainer Class Reference

Containter of cells for a given event. More...

#include <RecoContainer.h>

Classes

class  TRUIndexException
 Handler for access of TRU data with invalid TRU index. More...
 

Public Member Functions

 EventContainer ()=default
 Constructor.
 
 EventContainer (const o2::InteractionRecord &currentIR)
 Constructor, setting interaction record.
 
 ~EventContainer ()=default
 Destructor.
 
void setTriggerBits (uint64_t triggerbits)
 Set trigger bits of the interaction.
 
void setInteractionRecord (const o2::InteractionRecord &currentIR)
 Set interaction record.
 
uint64_t getTriggerBits () const
 Get trigger bits of the interaction.
 
const o2::InteractionRecordgetInteractionRecord () const
 Get interaction record of the event.
 
const gsl::span< const RecCellInfogetCells () const
 Get cells in container.
 
const gsl::span< const RecCellInfogetLEDMons () const
 Get LEDMONs in container.
 
int getNumberOfCells () const
 Get the number of cells in the event.
 
int getNumberOfLEDMONs () const
 Get the number of LEDMONs in the event.
 
TRUDataHandlergetTRUData (std::size_t truIndex)
 Read and write access TRU data of a given TRU.
 
const TRUDataHandlerreadTRUData (std::size_t truIndex) const
 Read-only access TRU data of a given TRU.
 
const std::unordered_map< uint16_t, FastORTimeSeries > & getTimeSeriesContainer () const
 Access to container with FastOR time series.
 
void setCell (int tower, double energy, double time, ChannelType_t celltype, int hwaddress, int ddlID, bool doMergeHGLG)
 Add cell information to the event container.
 
void setLEDMONCell (int tower, double energy, double time, ChannelType_t celltype, int hwaddress, int ddlID, bool doMergeHGLG)
 Add LEDMON information to the event container.
 
void setFastOR (uint16_t fastORAbsID, uint8_t starttime, const gsl::span< const uint16_t > timesamples)
 Add bunch of time series to the container.
 
void sortCells (bool isLEDmon)
 Sort Cells / LEDMONs in container according to tower / module ID.
 

Detailed Description

Containter of cells for a given event.

Author
Markus Fasel marku.nosp@m.s.fa.nosp@m.sel@c.nosp@m.ern..nosp@m.ch, Oak Ridge National Laboratory
Since
May 30, 2023

The EventContainer is part of the reco container and keeps the cell / LEDMON / TRU data of a given event (trigger) defined by the BC and orbit in the raw data header. In case the gain type merging is activated the event container performs on-the-fly merging of high- and low-gain data for cells and LEDMONS keeping only high- or low-gain and preferring the high-gain due to better resolution if not saturated.

Error handling: The EventContainer can raise a TRUIndexException in case TRU information with an unexpected index (>= 52) is added / requested.

Definition at line 73 of file RecoContainer.h.

Constructor & Destructor Documentation

◆ EventContainer() [1/2]

o2::emcal::EventContainer::EventContainer ( )
default

Constructor.

◆ EventContainer() [2/2]

EventContainer::EventContainer ( const o2::InteractionRecord currentIR)

Constructor, setting interaction record.

Parameters
currentIRInteraction record of the trigger

Definition at line 19 of file RecoContainer.cxx.

◆ ~EventContainer()

o2::emcal::EventContainer::~EventContainer ( )
default

Destructor.

Member Function Documentation

◆ getCells()

const gsl::span< const RecCellInfo > o2::emcal::EventContainer::getCells ( ) const
inline

Get cells in container.

Returns
List of cells in container

Definition at line 134 of file RecoContainer.h.

◆ getInteractionRecord()

const o2::InteractionRecord & o2::emcal::EventContainer::getInteractionRecord ( ) const
inline

Get interaction record of the event.

Returns
Interaction record connected to this event

Definition at line 130 of file RecoContainer.h.

◆ getLEDMons()

const gsl::span< const RecCellInfo > o2::emcal::EventContainer::getLEDMons ( ) const
inline

Get LEDMONs in container.

Returns
List of LEDMONs

Definition at line 138 of file RecoContainer.h.

◆ getNumberOfCells()

int o2::emcal::EventContainer::getNumberOfCells ( ) const
inline

Get the number of cells in the event.

Returns
Number of cells

Definition at line 142 of file RecoContainer.h.

◆ getNumberOfLEDMONs()

int o2::emcal::EventContainer::getNumberOfLEDMONs ( ) const
inline

Get the number of LEDMONs in the event.

Returns
Number of LEDMONs

Definition at line 146 of file RecoContainer.h.

◆ getTimeSeriesContainer()

const std::unordered_map< uint16_t, FastORTimeSeries > & o2::emcal::EventContainer::getTimeSeriesContainer ( ) const
inline

Access to container with FastOR time series.

Returns
Container with time series

Definition at line 162 of file RecoContainer.h.

◆ getTriggerBits()

uint64_t o2::emcal::EventContainer::getTriggerBits ( ) const
inline

Get trigger bits of the interaction.

Returns
Trigger bits

Definition at line 126 of file RecoContainer.h.

◆ getTRUData()

TRUDataHandler & EventContainer::getTRUData ( std::size_t  truIndex)

Read and write access TRU data of a given TRU.

Parameters
truIndexIndex of the TRU
Returns
TRU data handler for the TRU
Exceptions
TRUIndexExceptionin case the TRU index is invalid (>= 52)

Definition at line 115 of file RecoContainer.cxx.

◆ readTRUData()

const TRUDataHandler & EventContainer::readTRUData ( std::size_t  truIndex) const

Read-only access TRU data of a given TRU.

Parameters
truIndexIndex of the TRU
Returns
TRU data handler for the TRU
Exceptions
TRUIndexExceptionin case the TRU index is invalid (>= 52)

Definition at line 123 of file RecoContainer.cxx.

◆ setCell()

void o2::emcal::EventContainer::setCell ( int  tower,
double  energy,
double  time,
ChannelType_t  celltype,
int  hwaddress,
int  ddlID,
bool  doMergeHGLG 
)
inline

Add cell information to the event container.

Parameters
towerTower ID
energyCell energy
timeCell time
celltypeCell type (high gain or low gain)
hwaddressHardware address
ddlIDID of the DDL
doMergeHGLGIf true merge with existing HG/LG cell

In case of merge mode the priory is given to the HG digitizer (better resolution). As long as the energy is not in the saturation region (approx 16 GeV) the HG is selected, otherwise the LG digit is used.

Definition at line 176 of file RecoContainer.h.

◆ setFastOR()

void EventContainer::setFastOR ( uint16_t  fastORAbsID,
uint8_t  starttime,
const gsl::span< const uint16_t >  timesamples 
)

Add bunch of time series to the container.

Parameters
fastORAbsIDAbsolute ID of the FastOR
starttimeStart time of the bunch
timesamplesTime samples of the bunch in time-reversed format

In case a TimeSeries is already present for the given FastOR abs. ID in the container the bunch is added to this, otherwise a new TimeSeries is added with the ADCs of the bunch.

Definition at line 94 of file RecoContainer.cxx.

◆ setInteractionRecord()

void o2::emcal::EventContainer::setInteractionRecord ( const o2::InteractionRecord currentIR)
inline

Set interaction record.

Parameters
currentIRInteraction record of the trigger

Definition at line 122 of file RecoContainer.h.

◆ setLEDMONCell()

void o2::emcal::EventContainer::setLEDMONCell ( int  tower,
double  energy,
double  time,
ChannelType_t  celltype,
int  hwaddress,
int  ddlID,
bool  doMergeHGLG 
)
inline

Add LEDMON information to the event container.

Parameters
towerLEDMON ID
energyLEDMON energy
timeLEDMON time
celltypeLEDMON type (high gain or low gain)
hwaddressHardware address
ddlIDID of the DDL
doMergeHGLGIf true merge with existing HG/LG LEDMON

In case of merge mode the priory is given to the HG digitizer (better resolution). As long as the energy is not in the saturation region (approx 16 GeV) the HG is selected, otherwise the LG digit is used.

Definition at line 193 of file RecoContainer.h.

◆ setTriggerBits()

void o2::emcal::EventContainer::setTriggerBits ( uint64_t  triggerbits)
inline

Set trigger bits of the interaction.

Parameters
triggerbitsTrigger bits

Definition at line 118 of file RecoContainer.h.

◆ sortCells()

void EventContainer::sortCells ( bool  isLEDmon)

Sort Cells / LEDMONs in container according to tower / module ID.

Parameters
isLEDmonSwitch between Cell and LEDMON

Definition at line 104 of file RecoContainer.cxx.


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