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

Recalibration workflow at cell level. More...

#include <CellRecalibratorSpec.h>

Inherits o2::framework::Task.

Public Types

enum class  LEDEventSettings { KEEP , DROP , REDIRECT }
 Dedicated handling for LED events. More...
 

Public Member Functions

 CellRecalibratorSpec (uint32_t outputspec, LEDEventSettings ledsettings, bool badChannelCalib, bool timeCalib, bool gainCalib, bool isMC, std::shared_ptr< CalibLoader >(calibHandler))
 Constructor.
 
 ~CellRecalibratorSpec () final=default
 Destructor.
 
void init (framework::InitContext &ctx) final
 Initialize recalibrator.
 
void run (framework::ProcessingContext &ctx) final
 Run recalibration of cells for a new timeframe.
 
void finaliseCCDB (framework::ConcreteDataMatcher &matcher, void *obj) final
 Fetching cell objects and assigning them to the internal handlers.
 
void setRunBadChannelCalibration (bool doRun)
 Switch for bad channel calibration.
 
void setRunTimeCalibration (bool doRun)
 Switch for time calibration.
 
void setRunGainCalibration (bool doRun)
 Switch for the gain calibration.
 
bool isRunBadChannlCalibration () const
 Check if the bad channel calibration is enabled.
 
bool isRunTimeCalibration () const
 Check if the time calibration is enabled.
 
bool isRunGainCalibration () const
 Check if the gain calibration is enabled.
 
- 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

Recalibration workflow at cell level.

Author
Markus Fasel marku.nosp@m.s.fa.nosp@m.sel@c.nosp@m.ern..nosp@m.ch, Oak Ridge National Laboratory
Since
Sept 5, 2022

Recalibration at cell level

The workflow recalibrates a cell vector (with corresponding trigger records) for a given timeframe. The following calibrations are supported:

  • Bad channel calibration
  • Time calibration
  • Gain (energy) calibration Calibration objects are handled automatically via the CCDB. Calibrations must be enabled manually and are only applied in case the calibration objects exists in the CCDB.

While the energy and time calibration only change values within a cell the bad channel calibration decides whether a cell is accepted. Therefore the amount of cells can change for the given trigger. New trigger record objects are created and published to the same subspec as what is used for the output cell vector.

Definition at line 56 of file CellRecalibratorSpec.h.

Member Enumeration Documentation

◆ LEDEventSettings

Dedicated handling for LED events.

Enumerator
KEEP 

Keep LED events in timeframe (uncalibrated)

DROP 

Drop LED events.

REDIRECT 

Redirect LED events to dedicated output.

Definition at line 61 of file CellRecalibratorSpec.h.

Constructor & Destructor Documentation

◆ CellRecalibratorSpec()

CellRecalibratorSpec::CellRecalibratorSpec ( uint32_t  outputspec,
LEDEventSettings  ledsettings,
bool  badChannelCalib,
bool  timeCalib,
bool  gainCalib,
bool  isMC,
std::shared_ptr< CalibLoader calibHandler 
)

Constructor.

Parameters
outputspecSubspecification under which the output is posted
ledsettingsHandling of cells from LED events
badChannelCalibIf true the bad channel calibration is enabled
timeCalibIf true the time calibration is enabled
gainCalibIf true the gain calibration is enabled
isMCIf true the MCLabelContainer is adapted
calibHandlerHandler for calibration object loading

Definition at line 26 of file CellRecalibratorSpec.cxx.

◆ ~CellRecalibratorSpec()

o2::emcal::CellRecalibratorSpec::~CellRecalibratorSpec ( )
finaldefault

Destructor.

Member Function Documentation

◆ finaliseCCDB()

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

Fetching cell objects and assigning them to the internal handlers.

Parameters
matcherData type matcher of the CCDB object
objPointer to CCDB object loaded

Loading CCDB object into internal cache for the 3 supported CCDB entries (bad channel map, time calibration params, gain calibration params). Objects are only loaded in case the calibration type was enabled.

Reimplemented from o2::framework::Task.

Definition at line 146 of file CellRecalibratorSpec.cxx.

◆ init()

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

Initialize recalibrator.

Parameters
ctxInit context

Reimplemented from o2::framework::Task.

Definition at line 33 of file CellRecalibratorSpec.cxx.

◆ isRunBadChannlCalibration()

bool o2::emcal::CellRecalibratorSpec::isRunBadChannlCalibration ( ) const
inline

Check if the bad channel calibration is enabled.

Returns
True if the bad channel calibration is enabled, false otherwise

Definition at line 115 of file CellRecalibratorSpec.h.

◆ isRunGainCalibration()

bool o2::emcal::CellRecalibratorSpec::isRunGainCalibration ( ) const
inline

Check if the gain calibration is enabled.

Returns
True if the gain calibration is enabled, false otherwise

Definition at line 123 of file CellRecalibratorSpec.h.

◆ isRunTimeCalibration()

bool o2::emcal::CellRecalibratorSpec::isRunTimeCalibration ( ) const
inline

Check if the time calibration is enabled.

Returns
True if the time calibration is enabled, false otherwise

Definition at line 119 of file CellRecalibratorSpec.h.

◆ run()

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

Run recalibration of cells for a new timeframe.

Parameters
ctxProcessing context

Iterates over all triggers in the timeframe and recalibrates cells. Only calibrations which are enabled are applied. Calibrated cells and new trigger records are posted at the end of the timeframe to the subspecification requested in the constructor using standard types for cells and trigger records

Implements o2::framework::Task.

Definition at line 57 of file CellRecalibratorSpec.cxx.

◆ setRunBadChannelCalibration()

void o2::emcal::CellRecalibratorSpec::setRunBadChannelCalibration ( bool  doRun)
inline

Switch for bad channel calibration.

Parameters
doRunIf true the bad channel calibration is applied

Definition at line 103 of file CellRecalibratorSpec.h.

◆ setRunGainCalibration()

void o2::emcal::CellRecalibratorSpec::setRunGainCalibration ( bool  doRun)
inline

Switch for the gain calibration.

Parameters
doRunIf true the gain calibration is applied

Definition at line 111 of file CellRecalibratorSpec.h.

◆ setRunTimeCalibration()

void o2::emcal::CellRecalibratorSpec::setRunTimeCalibration ( bool  doRun)
inline

Switch for time calibration.

Parameters
doRunIf true the time calibration is applied

Definition at line 107 of file CellRecalibratorSpec.h.


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