14#include "CLHEP/Units/PhysicalConstants.h"
26using std::numbers::pi;
32inline constexpr double twopi = 2*
pi;
33inline constexpr double deta = 0.2;
34inline constexpr double dphi =
twopi / 64. ;
47 return StatusCode::SUCCESS;
85 the_aeta = std::abs (adj_eta);
87 the_aeta = std::abs (
eta);
103 for ( ; f_cell!=l_cell; ++f_cell)
107 if (CaloCell_ID::TileGap3 == cell->caloDDE()->getSampling()) {
108 double phic = cell->phi();
109 double etac = cell->eta();
112 if (etac >=
eta-deta && etac <=
eta+deta) {
113 if (phic >=
phi-dphi && phic <=
phi+dphi) {
114 eh_scint += cell->e();
122 const int degree =
m_degree (myctx);
125 float par0 = interpolate (correction, the_aeta, degree, 1);
126 float par1 = interpolate (correction, the_aeta, degree, 2);
127 float par2 = interpolate (correction, the_aeta, degree, 3);
128 float par3 = interpolate (correction, the_aeta, degree, 4);
131 float ec = cluster->
e();
140 cluster->
setE (par1*(ec +
a + par2*eh_scint + par3));
Scalar eta() const
pseudorapidity method
Scalar phi() const
phi method
#define ATH_CHECK
Evaluate an expression and check for errors.
Handle class for reading from StoreGate.
Data object for each calorimeter readout cell.
virtual void setenergy(xAOD::CaloCluster *cluster, float energy) const
virtual StatusCode initialize() override
Principal data class for CaloCell clusters.
virtual double e() const
Retrieve energy independent of signal state.
virtual void setE(double e)
Set energy.
This class groups all DetDescr information related to a CaloCell.
SG::ReadHandleKey< CaloCellContainer > m_cells
Constant< int > m_degree
Calibration constant: The interpolation degree.
virtual StatusCode initialize() override
Standard Gaudi initialize method.
Constant< bool > m_use_raw_eta
Calibration constant: If true, tabulated values are in terms of raw (local) eta.
Constant< float > m_etamax_crack
Constant< float > m_etamin_crack
Calibration constants: The range over which this correction is defined.
virtual void makeTheCorrection(const Context &myctx, xAOD::CaloCluster *cluster, const CaloDetDescrElement *elt, float eta, float adj_eta, float phi, float adj_phi, CaloSampling::CaloSample samp) const override
Virtual function for the correction-specific code.
Constant< CxxUtils::Array< 2 > > m_correction
Calibration constant: The tabulated array of correction weights, A and alpha.
Read-only multidimensional array.
DataModel_detail::const_iterator< DataVector > const_iterator
Polynomial interpolation in a table.
float interpolate(const CaloRec::Array< 2 > &a, float x, unsigned int degree, unsigned int ycol=1, const CaloRec::Array< 1 > ®ions=CaloRec::Array< 1 >(), int n_points=-1, bool fixZero=false)
Polynomial interpolation in a table.
CaloCluster_v1 CaloCluster
Define the latest version of the calorimeter cluster class.