ATLAS Offline Software
EgammaSshapeCalibration.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef TRIGT2CALOCALIBRATION_EGAMMASSHAPECALIBRATION
6 #define TRIGT2CALOCALIBRATION_EGAMMASSHAPECALIBRATION
7 
10 #include "GaudiKernel/MsgStream.h"
12 #include "CaloConditions/Array.h"
13 //#include "TrigT2CaloCommon/Calo_Def.h"
16 #include <string>
17 
18 //class TrigEMCluster;
19 
20 //--------------------------------------------
21 // class EgammaSshapeCalibration
22 //--------------------------------------------
24  public extends<CaloUtils::ToolWithConstants<AthAlgTool>,
25  IEgammaCalibration>
26 {
27  public:
28 
30  using base_class::base_class;
31 
33  virtual StatusCode initialize() override;
34 
36  virtual StatusCode finalize() override;
37 
39  virtual void makeCorrection(xAOD::TrigEMCluster*, const void*) const override;
40 
41  private:
42  void docalc(int,
44  const CxxUtils::Array<1>&,
46  int&) const;
47 
48  private:
49 
51  public:
57  Builder(const EgammaSshapeCalibration&,double, double, int);
58 
60  virtual float calculate (int energy_ndx, bool& good) const;
61 
62  private:
63  float calc0 (float, float, const CaloRec::Array<2>&) const;
64  float calc3 (float, float, const CaloRec::Array<2>&) const;
65  float calc4 (float, float, const CaloRec::Array<2>&) const;
66  float calc5 (float, float, const CaloRec::Array<2>&) const;
67  float calc10(float, float, const CaloRec::Array<2>&) const;
68  float calc11(float, float, const CaloRec::Array<2>&) const;
69 
70  private:
72  double m_aeta;
73  double m_u;
75  int m_form;
76  };
77  friend class Builder;
78 
79  private:
90  Constant<CxxUtils::Array<4> > m_correction { this, "correction" };
91 
102  Constant<CxxUtils::Array<2> > m_regions { this, "regions" };
103  enum {
104  REG_LO = 0,
105  REG_HI = 1,
106  REG_FORM = 2,
108  REG_PHASE = 4
109  };
110 
112  Constant<CxxUtils::Array<1> > m_energies { this, "energies" };
113 
115  Constant<int> m_energy_degree { this, "energy_degree", 3 };
116 
117  Constant<bool> m_isRange_barrel { this, "rangeBarrel" };
118 
122  Constant<CxxUtils::Array<2> > m_forms { this, "forms" };
123 };
124 
125 #endif
EgammaSshapeCalibration::Builder::calc0
float calc0(float, float, const CaloRec::Array< 2 > &) const
Definition: EgammaSshapeCalibration.cxx:301
EgammaSshapeCalibration::Builder::Builder
Builder(const EgammaSshapeCalibration &, double, double, int)
Constructor.
Definition: EgammaSshapeCalibration.cxx:234
EgammaSshapeCalibration::Builder::calc11
float calc11(float, float, const CaloRec::Array< 2 > &) const
Definition: EgammaSshapeCalibration.cxx:435
IEgammaCalibration.h
CxxUtils::WritableArray
Read-write multidimensional array.
Definition: Control/CxxUtils/CxxUtils/Array.h:53
EgammaSshapeCalibration::finalize
virtual StatusCode finalize() override
Finalization of the tool.
Definition: EgammaSshapeCalibration.cxx:26
EgammaSshapeCalibration::Builder::m_corr
const EgammaSshapeCalibration & m_corr
Definition: EgammaSshapeCalibration.h:71
EgammaSshapeCalibration::REG_CELLSIZE
@ REG_CELLSIZE
Definition: EgammaSshapeCalibration.h:107
EgammaSshapeCalibration
Definition: EgammaSshapeCalibration.h:26
EgammaSshapeCalibration::Builder::calculate
virtual float calculate(int energy_ndx, bool &good) const
Calculate the correction for tabulated energy ENERGY_NDX.
Definition: EgammaSshapeCalibration.cxx:248
TrigEMCluster.h
EgammaSshapeCalibration::Builder::calc3
float calc3(float, float, const CaloRec::Array< 2 > &) const
Definition: EgammaSshapeCalibration.cxx:324
ToolWithConstants.h
Hold constants for a tool.
EgammaSshapeCalibration::Builder::calc5
float calc5(float, float, const CaloRec::Array< 2 > &) const
Definition: EgammaSshapeCalibration.cxx:376
EgammaSshapeCalibration::docalc
void docalc(int, const CaloClusterCorrectionCommon::TableBuilder &, const CxxUtils::Array< 1 > &, CxxUtils::WritableArray< 2 > &, int &) const
Definition: EgammaSshapeCalibration.cxx:216
Array.h
Simple multidimensional arrays.
CaloClusterCorrectionCommon::TableBuilder
Helper, used to calculate the values of the energy interpolation table.
Definition: CaloClusterCorrectionCommon.h:127
EgammaSshapeCalibration::Builder::calc10
float calc10(float, float, const CaloRec::Array< 2 > &) const
Definition: EgammaSshapeCalibration.cxx:399
EgammaSshapeCalibration::m_correction
Constant< CxxUtils::Array< 4 > > m_correction
Calibration constant: tabulated arrays of function parameters.
Definition: EgammaSshapeCalibration.h:90
EgammaSshapeCalibration::REG_PHASE
@ REG_PHASE
Definition: EgammaSshapeCalibration.h:108
EgammaSshapeCalibration::initialize
virtual StatusCode initialize() override
Initialization of the tool.
Definition: EgammaSshapeCalibration.cxx:17
EgammaSshapeCalibration::m_energy_degree
Constant< int > m_energy_degree
Degree of the polynomial interpolation in energy.
Definition: EgammaSshapeCalibration.h:115
EgammaSshapeCalibration::m_forms
Constant< CxxUtils::Array< 2 > > m_forms
Calibration constant: Functional form to use per region per energy.
Definition: EgammaSshapeCalibration.h:122
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
AthAlgTool.h
CxxUtils::Array< 1 >
EgammaSshapeCalibration::Builder::m_u
double m_u
Definition: EgammaSshapeCalibration.h:73
EgammaSshapeCalibration::REG_LO
@ REG_LO
Definition: EgammaSshapeCalibration.h:104
CaloClusterCorrectionCommon.h
EgammaSshapeCalibration::m_regions
Constant< CxxUtils::Array< 2 > > m_regions
Calibration constant: table of regions.
Definition: EgammaSshapeCalibration.h:102
EgammaSshapeCalibration::m_isRange_barrel
Constant< bool > m_isRange_barrel
Definition: EgammaSshapeCalibration.h:117
EgammaSshapeCalibration::REG_HI
@ REG_HI
Definition: EgammaSshapeCalibration.h:105
EgammaSshapeCalibration::Builder
Definition: EgammaSshapeCalibration.h:50
ReadBchFromCool.good
good
Definition: ReadBchFromCool.py:433
EgammaSshapeCalibration::Builder::m_region_ndx
int m_region_ndx
Definition: EgammaSshapeCalibration.h:74
EgammaSshapeCalibration::Builder::m_form
int m_form
Definition: EgammaSshapeCalibration.h:75
EgammaSshapeCalibration::makeCorrection
virtual void makeCorrection(xAOD::TrigEMCluster *, const void *) const override
Virtual function from IEgammaCalibration.
Definition: EgammaSshapeCalibration.cxx:33
EgammaSshapeCalibration::m_energies
Constant< CxxUtils::Array< 1 > > m_energies
Table of energies at which the correction was tabulated.
Definition: EgammaSshapeCalibration.h:112
EgammaSshapeCalibration::REG_FORM
@ REG_FORM
Definition: EgammaSshapeCalibration.h:106
xAOD::TrigEMCluster_v1
Description of a trigger EM cluster.
Definition: TrigEMCluster_v1.h:28
EgammaSshapeCalibration::Builder::m_aeta
double m_aeta
Definition: EgammaSshapeCalibration.h:72
EgammaSshapeCalibration::Builder::calc4
float calc4(float, float, const CaloRec::Array< 2 > &) const
Definition: EgammaSshapeCalibration.cxx:349