ATLAS Offline Software
Public Member Functions | Private Attributes | List of all members
EgammaGapCalibration Class Reference

General Interface for calibrations at the LVL2 Egamma Calo Fex algo. More...

#include <EgammaGapCalibration.h>

Inheritance diagram for EgammaGapCalibration:
Collaboration diagram for EgammaGapCalibration:

Public Member Functions

virtual StatusCode initialize () override
 Initialization of the tool. More...
 
virtual StatusCode finalize () override
 Finalization of the tool. More...
 
virtual void makeCorrection (xAOD::TrigEMCluster *, const void *v=nullptr) const override
 method to perform the correction. More...
 

Private Attributes

Constant< CxxUtils::Array< 2 > > m_correction { this, "correction" }
 
Constant< float > m_eta_start_crack { this, "eta_start_crack" }
 
Constant< float > m_eta_end_crack { this, "eta_end_crack" }
 
Constant< int > m_degree { this, "degree" }
 
Constant< bool > m_use_raw_eta { this, "use_raw_eta" }
 
BooleanProperty m_interpolate { this, "UseInterpolation", true }
 

Detailed Description

General Interface for calibrations at the LVL2 Egamma Calo Fex algo.

Definition at line 24 of file EgammaGapCalibration.h.

Member Function Documentation

◆ finalize()

StatusCode EgammaGapCalibration::finalize ( )
overridevirtual

Finalization of the tool.

Definition at line 37 of file EgammaGapCalibration.cxx.

37  {
38 
39  ATH_MSG_DEBUG( "Finalize Tool : " << name() );
40 
41  return StatusCode::SUCCESS;
42 
43 }

◆ initialize()

StatusCode EgammaGapCalibration::initialize ( )
overridevirtual

Initialization of the tool.

Definition at line 26 of file EgammaGapCalibration.cxx.

26  {
27 
29 
30  ATH_MSG_DEBUG( "Initialize Tool : " << name() );
31 
32  return StatusCode::SUCCESS;
33 
34 }

◆ makeCorrection()

void EgammaGapCalibration::makeCorrection ( xAOD::TrigEMCluster clus,
const void *  v = nullptr 
) const
overridevirtual

method to perform the correction.

The correction type is defined by the tool which also uses this interface. In some cases, the tool needs more than the cluster to perform the calibration. This can be passed via the void pointer

Definition at line 45 of file EgammaGapCalibration.cxx.

46  {
47 
48 #ifndef NDEBUG
49  ATH_MSG_DEBUG( "makeCorrection for tool : " << name() );
50  ATH_MSG_DEBUG( "Cluster E input : " << clus->energy() );
51 #endif
52  float the_aeta=(clus->eta());
53  if (the_aeta<0) the_aeta=-the_aeta;
54  // If far from the crack, nothing to do
55  if (the_aeta < m_eta_start_crack() || the_aeta > m_eta_end_crack()) return;
56 
58  int degree = m_degree();
59  float a = interpolate(correction, the_aeta, degree,1);
60  float alpha = interpolate(correction, the_aeta, degree,2);
61  float offset = interpolate(correction, the_aeta, degree,3);
62  float eh_scint = clus->energy(CaloSampling::TileGap3);
63  float ec = clus->energy();
64  clus->setEnergy(a*(ec+alpha*eh_scint + offset));
65  clus->setEt(clus->energy()/cosh(clus->eta()));
66 #ifndef NDEBUG
67  ATH_MSG_DEBUG( "Cluster E output : " << clus->energy() );
68 #endif
69 
70 }

Member Data Documentation

◆ m_correction

Constant<CxxUtils::Array<2> > EgammaGapCalibration::m_correction { this, "correction" }
private

Definition at line 48 of file EgammaGapCalibration.h.

◆ m_degree

Constant<int> EgammaGapCalibration::m_degree { this, "degree" }
private

Definition at line 51 of file EgammaGapCalibration.h.

◆ m_eta_end_crack

Constant<float> EgammaGapCalibration::m_eta_end_crack { this, "eta_end_crack" }
private

Definition at line 50 of file EgammaGapCalibration.h.

◆ m_eta_start_crack

Constant<float> EgammaGapCalibration::m_eta_start_crack { this, "eta_start_crack" }
private

Definition at line 49 of file EgammaGapCalibration.h.

◆ m_interpolate

BooleanProperty EgammaGapCalibration::m_interpolate { this, "UseInterpolation", true }
private

Definition at line 53 of file EgammaGapCalibration.h.

◆ m_use_raw_eta

Constant<bool> EgammaGapCalibration::m_use_raw_eta { this, "use_raw_eta" }
private

Definition at line 52 of file EgammaGapCalibration.h.


The documentation for this class was generated from the following files:
xAOD::TrigEMCluster_v1::eta
float eta() const
get Eta (calibrated)
xAOD::TrigEMCluster_v1::setEnergy
void setEnergy(float energy)
set Energy (calibrated)
initialize
void initialize()
Definition: run_EoverP.cxx:894
EgammaGapCalibration::m_eta_end_crack
Constant< float > m_eta_end_crack
Definition: EgammaGapCalibration.h:50
CaloCell_ID_FCS::TileGap3
@ TileGap3
Definition: FastCaloSim_CaloCell_ID.h:36
tools.zlumi_mc_cf.correction
def correction(mu, runmode, campaign, run=None)
Definition: zlumi_mc_cf.py:4
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
CxxUtils::Array< 2 >
CHECK
#define CHECK(...)
Evaluate an expression and check for errors.
Definition: Control/AthenaKernel/AthenaKernel/errorcheck.h:422
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:221
a
TList * a
Definition: liststreamerinfos.cxx:10
CaloClusterCorr::interpolate
float interpolate(const CaloRec::Array< 2 > &a, float x, unsigned int degree, unsigned int ycol=1, const CaloRec::Array< 1 > &regions=CaloRec::Array< 1 >(), int n_points=-1, bool fixZero=false)
Polynomial interpolation in a table.
Definition: interpolate.cxx:75
EgammaGapCalibration::m_degree
Constant< int > m_degree
Definition: EgammaGapCalibration.h:51
convertTimingResiduals.offset
offset
Definition: convertTimingResiduals.py:71
xAOD::TrigEMCluster_v1::setEt
void setEt(float)
set Et (calibrated)
EgammaGapCalibration::m_eta_start_crack
Constant< float > m_eta_start_crack
Definition: EgammaGapCalibration.h:49
python.SystemOfUnits.degree
tuple degree
Definition: SystemOfUnits.py:106
xAOD::TrigEMCluster_v1::energy
float energy() const
get Energy (calibrated)
EgammaGapCalibration::m_correction
Constant< CxxUtils::Array< 2 > > m_correction
Definition: EgammaGapCalibration.h:48