Project
Loading...
Searching...
No Matches
o2::emcal::reco_workflow::RawToCellConverterSpec Class Reference

Coverter task for Raw data to EMCAL cells and trigger objects. More...

#include <RawToCellConverterSpec.h>

Inherits o2::framework::Task.

Public Member Functions

 RawToCellConverterSpec (int subspecification, bool hasDecodingErrors, bool hasTriggerReconstruction, std::shared_ptr< CalibLoader > calibhandler)
 Constructor.
 
 ~RawToCellConverterSpec () override
 Destructor.
 
void init (framework::InitContext &ctx) final
 Initializing the RawToCellConverterSpec.
 
void run (framework::ProcessingContext &ctx) final
 Run conversion of raw data to cells.
 
void finaliseCCDB (framework::ConcreteDataMatcher &matcher, void *obj) final
 Handle objects obtained from the CCDB.
 
void setMaxErrorMessages (int maxMessages)
 Set max number of error messages printed.
 
void setNoiseThreshold (int threshold)
 Set noise threshold for gain type errors.
 
int getNoiseThreshold () const
 Get the noise threshold for gain type errors.
 
void setSubspecification (header::DataHeader::SubSpecificationType subspecification)
 Set ID of the subspecification.
 
header::DataHeader::SubSpecificationType getSubspecification () const
 Get ID of the subspecification.
 
- Public Member Functions inherited from o2::framework::Task
virtual ~Task ()
 
virtual void endOfStream (EndOfStreamContext &context)
 This is invoked whenever we have an EndOfStream event.
 
virtual void stop ()
 This is invoked on stop.
 

Detailed Description

Coverter task for Raw data to EMCAL cells and trigger objects.

Author
Hadi Hassan hadi..nosp@m.hass.nosp@m.an@ce.nosp@m.rn.c.nosp@m.h, Oak Ridge National Laboratory
Markus Fasel marku.nosp@m.s.fa.nosp@m.sel@c.nosp@m.ern..nosp@m.ch, Oak Ridge National Laboratory
Since
December 10, 2019

General reconstruction task of EMCAL raw data of FEC and trigger sources, running during the synchronous reconstruction. The task decodees pages from ALTRO, Fake ALTRO and STU sources, and mergees the data according to events (triggers). The data is then further processed based on the origin of the data:

  • in case of FEC data (cells or LEDMONS) a raw fit is performed, and data from high- and low-gain channels are merged, always preferring the high-gain data if not saturated (better resolution)
  • in case of Fake ALTRO data (TRU) the L0 timesums, trigger patches and TRU information are reconstructed. For the trigger patches a small peak finder selects the time sample with the max. patch energy. For the L0 timesums a fixed L0 time (8) is used for all event types

FEC and trigger information are ordered according to events and streamed to their output buffers, where corresponding trigger records mark ranges in the buffer belonging to the same trigger. Tasks subscribing to outputs from this task must always subscribe to teh trigger records in addition.

Several components of the task (raw parsing, ALTRO decoding, channel mapping and geometry, raw fit) can end in error states, particularly due to unexpected data. Error handling is performed internally at different stages. Errors are cathegoriezed as major or minor errors, where major errors prevent decoding the page while minor errors only lead to loss of certain segments. For monitoring tasks must subscribe to EMC/DECODERERR.

In order to guarantee data consistency a link checker compares the links contributing to data from a certain trigger to the links activated in the DCS. If not all links are present the timeframe is discarded. In order to switch off that feature the option –no-checkactivelinks must be activated.

Inputs:

Input spec Optional CCDB Purpose
EMC/RAWDATA no no EMCAL raw data
FLP/DISTSUBTIMEFRAME yes no Message send when no data was received in TF
EMC/RECOPARAM no yes Reconstruction parameters
EMC/FEEDCS no yes FEE DCS information

Outputs:

Input spec Subspec (default) Optional Purpose
EMC/CELLS 1 no EMCAL cell (tower) data
EMC/CELLSTRGR 1 no Trigger records related to cell data
EMC/DECODERERR 1 yes Decoder errors (for QC), if enabled
EMC/TRUS 1 yes TRU information, if trigger reconstruction enabled
EMC/TRUSTRGR 1 yes Trigger reconrds related to TRU information
EMC/PATCHES 1 yes Trigger patches, if trigger reconstruction enabled
EMC/PATCHESTRGR 1 yes Trigger reconrds related to trigger patches
EMC/FASTORS 1 yes L0 timesums, if trigger reconstruction enabled
EMC/FASTORSTRGR 1 yes Trigger reconrds related to L0 timesums

Workflow options (via –EMCALRawToCellConverterSpec ...):

Option Default Possible values Purpose
fitmethod gamma2 gamma2,standard Raw fit method
maxmessage 100 any int Max. amount of error messages on infoLogger
printtrailer false set (bool) Print RCU trailer (for debugging)
no-mergeHGLG false set (bool) Do not merge HG and LG channels for same tower
no-checkactivelinks false set (bool) Do not check for active links per BC
no-evalpedestal false set (bool) Disable pedestal evaluation

Global switches of the EMCAL reco workflow related to the RawToCellConverter:

Option Default Purpose
disable-decoding-errors false Disable sending decoding errors
disable-trigger-reconstruction false Disable trigger reconstruction
ignore-dist-stf false disable subscribing to FLP/DISTSUBTIMEFRAME/0

Definition at line 120 of file RawToCellConverterSpec.h.

Constructor & Destructor Documentation

◆ RawToCellConverterSpec()

o2::emcal::reco_workflow::RawToCellConverterSpec::RawToCellConverterSpec ( int  subspecification,
bool  hasDecodingErrors,
bool  hasTriggerReconstruction,
std::shared_ptr< CalibLoader calibhandler 
)
inline

Constructor.

Parameters
subspecificationOutput subspecification for parallel running on multiple nodes
hasDecodingErrorsOption to swich on/off creating raw decoding error objects for later monitoring
hasTriggerReconstructionPerform trigger reconstruction and add trigger-related outputs
calibhandlerCalibration object handler

Definition at line 128 of file RawToCellConverterSpec.h.

◆ ~RawToCellConverterSpec()

RawToCellConverterSpec::~RawToCellConverterSpec ( )
override

Destructor.

Definition at line 51 of file RawToCellConverterSpec.cxx.

Member Function Documentation

◆ finaliseCCDB()

void RawToCellConverterSpec::finaliseCCDB ( framework::ConcreteDataMatcher matcher,
void obj 
)
finalvirtual

Handle objects obtained from the CCDB.

Parameters
matcherMatcher providing the CCDB path of the object
objCCDB object loaded by the CCDB interface

Reimplemented from o2::framework::Task.

Definition at line 408 of file RawToCellConverterSpec.cxx.

◆ getNoiseThreshold()

int o2::emcal::reco_workflow::RawToCellConverterSpec::getNoiseThreshold ( ) const
inline

Get the noise threshold for gain type errors.

Returns
Noise threshold

Definition at line 166 of file RawToCellConverterSpec.h.

◆ getSubspecification()

header::DataHeader::SubSpecificationType o2::emcal::reco_workflow::RawToCellConverterSpec::getSubspecification ( ) const
inline

Get ID of the subspecification.

Returns
subspecification

Can be used to define differenciate between output in case different processors run in parallel (i.e. on different FLPs)

Definition at line 180 of file RawToCellConverterSpec.h.

◆ init()

void RawToCellConverterSpec::init ( framework::InitContext ctx)
finalvirtual

Initializing the RawToCellConverterSpec.

Parameters
ctxInit context

Reimplemented from o2::framework::Task.

Definition at line 58 of file RawToCellConverterSpec.cxx.

◆ run()

void RawToCellConverterSpec::run ( framework::ProcessingContext ctx)
finalvirtual

Run conversion of raw data to cells.

Parameters
ctxProcessing context

The following branches are linked: Input RawData: {"ROUT", "RAWDATA", 0, Lifetime::Timeframe} Output cells: {"EMC", "CELLS", 0, Lifetime::Timeframe} Output cells trigger record: {"EMC", "CELLSTR", 0, Lifetime::Timeframe}

Implements o2::framework::Task.

Definition at line 114 of file RawToCellConverterSpec.cxx.

◆ setMaxErrorMessages()

void o2::emcal::reco_workflow::RawToCellConverterSpec::setMaxErrorMessages ( int  maxMessages)
inline

Set max number of error messages printed.

Parameters
maxMessagesMax. amount of messages printed

Error messages will be suppressed once the maximum is reached

Definition at line 155 of file RawToCellConverterSpec.h.

◆ setNoiseThreshold()

void o2::emcal::reco_workflow::RawToCellConverterSpec::setNoiseThreshold ( int  threshold)
inline

Set noise threshold for gain type errors.

Parameters
thresholdNoise threshold

Definition at line 162 of file RawToCellConverterSpec.h.

◆ setSubspecification()

void o2::emcal::reco_workflow::RawToCellConverterSpec::setSubspecification ( header::DataHeader::SubSpecificationType  subspecification)
inline

Set ID of the subspecification.

Parameters
subspecification

Can be used to define differenciate between output in case different processors run in parallel (i.e. on different FLPs)

Definition at line 173 of file RawToCellConverterSpec.h.


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