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

Nonlinearity functions for energy correction. More...

#include <NonlinearityHandler.h>

Classes

class  UninitException
 Handling missing initialisation of the NonlinearityHanlder. More...
 

Public Types

enum class  NonlinType_t {
  DATA_TESTBEAM_SHAPER , DATA_TESTBEAM_SHAPER_WOSCALE , DATA_TESTBEAM_CORRECTED , DATA_TESTBEAM_CORRECTED_V2 ,
  DATA_TESTBEAM_CORRECTED_V3 , DATA_TESTBEAM_CORRECTED_V4 , MC_TESTBEAM_FINAL , MC_PI0 ,
  MC_PI0_V2 , MC_PI0_V3 , MC_PI0_V5 , MC_PI0_V6 ,
  UNKNOWN
}
 Types of nonlinearity functions available. More...
 

Public Member Functions

 NonlinearityHandler ()=default
 Dummy constructor.
 
 NonlinearityHandler (NonlinType_t nonlintype)
 Constructor, defining nonlinearity function.
 
 ~NonlinearityHandler ()=default
 Destructor.
 
void setNonlinType (NonlinType_t nonlintype)
 Set type of nonlinearity function.
 
double getCorrectedClusterEnergy (double energy) const
 Get corrected cluster energy for the selected nonlinearity parameterization.
 
double getCorrectedClusterEnergy (const AnalysisCluster &cluster) const
 Get corrected cluster energy for the selected nonlinearity parameterization.
 
void printStream (std::ostream &stream) const
 Print information about the nonlinearity function.
 

Static Public Member Functions

static NonlinType_t getNonlinType (const std::string_view name)
 Get type of a nonlinearity function from its name.
 
static const chargetNonlinName (NonlinType_t nonlin)
 Get name of the nonlinearity function from the function type.
 
static double evaluateShaperCorrectionCellEnergy (double energy, double ecalibHG=1)
 Get corrected energy at cell level for the shaper saturation at high energy.
 

Detailed Description

Nonlinearity functions for energy correction.

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

Calculating a corrected cluster energy based on the raw cluster energy. Several parameterisations are provided. The function is selected during construction of the object. The corrected cluster energy is obtained via the function getCorrectedClusterEnergy.

The correction for the shaper sturation must be applied at cell energy level. Only one parameterisation for the shaper nonlinearity exists, for which the parameterisation does not depend on the type of the cluster nonlinearity. The function evaluateShaperCorrectionCellEnergy is static and can therefore be applied without a cluster nonlinearity parameterisation.

based on nonlinearity implementation in AliEMCALRecoUtils

Definition at line 42 of file NonlinearityHandler.h.

Member Enumeration Documentation

◆ NonlinType_t

Types of nonlinearity functions available.

Enumerator
DATA_TESTBEAM_SHAPER 

Data, testbeam nonlin for shaper correction, with energy rescaling.

DATA_TESTBEAM_SHAPER_WOSCALE 

Data, testbeam nonlin for shaper correction, without energy rescaling.

DATA_TESTBEAM_CORRECTED 

Data, inital testbeam nonlin without shaper correction.

DATA_TESTBEAM_CORRECTED_V2 

Data, inital testbeam nonlin without shaper correction, version 2.

DATA_TESTBEAM_CORRECTED_V3 

Data, inital testbeam nonlin without shaper correction, version 3.

DATA_TESTBEAM_CORRECTED_V4 

Data, inital testbeam nonlin without shaper correction, version 4.

MC_TESTBEAM_FINAL 

MC, function corresponding to data testbeam nonlin for shaper correction, with energy rescaling.

MC_PI0 

MC, function corresponding to inital testbeam nonlin without shaper correction.

MC_PI0_V2 

MC, function corresponding to inital testbeam nonlin without shaper correction, version 2.

MC_PI0_V3 

MC, function corresponding to inital testbeam nonlin without shaper correction, version 3.

MC_PI0_V5 

MC, function corresponding to inital testbeam nonlin without shaper correction, version 5.

MC_PI0_V6 

MC, function corresponding to inital testbeam nonlin without shaper correction, version 6.

UNKNOWN 

No function set.

Definition at line 66 of file NonlinearityHandler.h.

Constructor & Destructor Documentation

◆ NonlinearityHandler() [1/2]

o2::emcal::NonlinearityHandler::NonlinearityHandler ( )
default

Dummy constructor.

Non-linearity type not set, will fail when trying to evaluate for a certain energy. Use constructor with nonlinearity function specified instead. Only intended for constructing standard containers.

◆ NonlinearityHandler() [2/2]

NonlinearityHandler::NonlinearityHandler ( NonlinType_t  nonlintype)

Constructor, defining nonlinearity function.

Parameters
nonlintypeType of t, he nonlinearity function

Initializing all parameters and settings of the nonlinearity function. Nonlinearity correction at cluster level can be obtained using objects constructed by this.

Definition at line 19 of file NonlinearityHandler.cxx.

◆ ~NonlinearityHandler()

o2::emcal::NonlinearityHandler::~NonlinearityHandler ( )
default

Destructor.

Member Function Documentation

◆ evaluateShaperCorrectionCellEnergy()

double NonlinearityHandler::evaluateShaperCorrectionCellEnergy ( double  energy,
double  ecalibHG = 1 
)
static

Get corrected energy at cell level for the shaper saturation at high energy.

Parameters
energyRaw cell energy
ecalibHGFinetuning of the high-gain energy scale

Definition at line 194 of file NonlinearityHandler.cxx.

◆ getCorrectedClusterEnergy() [1/2]

double o2::emcal::NonlinearityHandler::getCorrectedClusterEnergy ( const AnalysisCluster cluster) const
inline

Get corrected cluster energy for the selected nonlinearity parameterization.

Parameters
energyRaw cluster energy
Returns
Corrected cluster energy
Exceptions
UninitExceptionin case the NonlinearityHandler is not configured

Definition at line 130 of file NonlinearityHandler.h.

◆ getCorrectedClusterEnergy() [2/2]

double NonlinearityHandler::getCorrectedClusterEnergy ( double  energy) const

Get corrected cluster energy for the selected nonlinearity parameterization.

Parameters
energyRaw cluster energy
Returns
Corrected cluster energy
Exceptions
UninitExceptionin case the NonlinearityHandler is not configured

Definition at line 140 of file NonlinearityHandler.cxx.

◆ getNonlinName()

const char * NonlinearityHandler::getNonlinName ( NonlinearityHandler::NonlinType_t  nonlin)
static

Get name of the nonlinearity function from the function type.

Parameters
nonlinType of the nonlinearity function
Returns
Name of the nonlinearity function

Definition at line 271 of file NonlinearityHandler.cxx.

◆ getNonlinType()

NonlinearityHandler::NonlinType_t NonlinearityHandler::getNonlinType ( const std::string_view  name)
static

Get type of a nonlinearity function from its name.

Parameters
nameName of the nonlinearity function
Returns
Nonlinearity function type

Definition at line 229 of file NonlinearityHandler.cxx.

◆ printStream()

void NonlinearityHandler::printStream ( std::ostream &  stream) const

Print information about the nonlinearity function.

Parameters
streamStream to print the information on

Definition at line 213 of file NonlinearityHandler.cxx.

◆ setNonlinType()

void o2::emcal::NonlinearityHandler::setNonlinType ( NonlinType_t  nonlintype)
inline

Set type of nonlinearity function.

Parameters
nonlintypeType of nonlinearity function

Updating also function parameters

Definition at line 114 of file NonlinearityHandler.h.


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