ATLAS Offline Software
Loading...
Searching...
No Matches
CaloSwEtaoff_v3.h
Go to the documentation of this file.
1// This file's extension implies that it's C, but it's really -*- C++ -*-.
2/*
3 Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
4*/
14
15#ifndef CALOCLUSTERCORRECTION_CALOSWETAOFF_V3_H
16#define CALOCLUSTERCORRECTION_CALOSWETAOFF_V3_H
17
20
21
23
24
132{
133public:
136
137
158 virtual void makeTheCorrection (const Context& myctx,
159 xAOD::CaloCluster* cluster,
160 const CaloDetDescrElement* elt,
161 float eta,
162 float adj_eta,
163 float phi,
164 float adj_phi,
165 CaloSampling::CaloSample samp) const override;
166
167private:
173 : public TableBuilder
174 {
175 public:
181 Builder (const CxxUtils::Array<4>& correction,
183 const CxxUtils::Array<2>& forms,
184 float aeta,
185 float u,
186 int region_ndx);
187
189 virtual float calculate (int energy_ndx, bool& good) const;
190
191 private:
193 static float calc0 (float aeta, float u, const CaloRec::Array<2>& coef) ;
194
196 static float calc3 (float aeta, float u, const CaloRec::Array<2>& coef) ;
197
199 static float calc4 (float aeta, float u, const CaloRec::Array<2>& coef) ;
200
202 static float calc5 (float aeta, float u, const CaloRec::Array<2>& coef) ;
203
205 static float calc10 (float aeta, float u, const CaloRec::Array<2>& coef) ;
206
208 static float calc11 (float aeta, float u, const CaloRec::Array<2>& coef) ;
209
211 static float calc13 (float aeta, float u, const CaloRec::Array<2>& coef, float xlo, float xhi) ;
212
213 // Tabulated arrays of function parameters.
215
218
221
224
227 float m_aeta;
228
230 float m_u;
231
234 };
235 friend class Builder;
236
238 static int find_region (const CxxUtils::Array<2>& regions,
239 float aeta) ;
240
252 { this, "correction", "Tabulated arrays of function parameters." };
253
265 { this, "regions", "Table of regions." };
266
267 enum {
273 REG_ENTRIES = 5 // Number of entries expected.
274 };
275
279 { this, "energies", "Table of energies at which the correction was tabulated." };
280
283 { this, "energy_degree", "Degree of the polynomial interpolation in energy." };
284
289 { this, "forms", "Functional form to use per region per energy." };
290};
291
292
293#endif // not CALOCLUSTERCORRECTION_CALOSWETAOFF_V3_H
Scalar eta() const
pseudorapidity method
Scalar phi() const
phi method
Simple multidimensional arrays.
static const std::vector< std::string > regions
CaloClusterCorrectionCommon(const std::string &type, const std::string &name, const IInterface *parent)
Inherit constructor.
This class groups all DetDescr information related to a CaloCell.
int m_form
The index of the functional form we're evaluating.
const CxxUtils::Array< 2 > & m_forms
Functional form per region.
static float calc10(float aeta, float u, const CaloRec::Array< 2 > &coef)
Evaluate the function Form 10.
static float calc0(float aeta, float u, const CaloRec::Array< 2 > &coef)
Evaluate the function Form 0.
float m_u
The fractional offset in the cell of this cluster.
Builder(const CxxUtils::Array< 4 > &correction, const CxxUtils::Array< 2 > &regions, const CxxUtils::Array< 2 > &forms, float aeta, float u, int region_ndx)
Constructor.
const CxxUtils::Array< 2 > & m_regions
Table of regions.
static float calc4(float aeta, float u, const CaloRec::Array< 2 > &coef)
Evaluate the function Form 4.
float m_aeta
The abs(eta) at which the correction is being evaluated (in cal-local coordinates).
static float calc11(float aeta, float u, const CaloRec::Array< 2 > &coef)
Evaluate the function Form 11.
static float calc3(float aeta, float u, const CaloRec::Array< 2 > &coef)
Evaluate the function Form 3.
int m_region_ndx
The index of the region in which we're evaluating the correction.
const CxxUtils::Array< 4 > & m_correction
virtual float calculate(int energy_ndx, bool &good) const
Calculate the correction for tabulated energy ENERGY_NDX.
static float calc13(float aeta, float u, const CaloRec::Array< 2 > &coef, float xlo, float xhi)
Evaluate the function Form 13.
static float calc5(float aeta, float u, const CaloRec::Array< 2 > &coef)
Evaluate the function Form 5.
static int find_region(const CxxUtils::Array< 2 > &regions, float aeta)
Find the index of the region containing a given value.
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< 4 > > m_correction
Calibration constant: tabulated arrays of function parameters.
Constant< CxxUtils::Array< 2 > > m_forms
Calibration constant: Functional form to use per region per energy.
Constant< CxxUtils::Array< 2 > > m_regions
Calibration constant: table of regions.
CaloClusterCorrectionCommon(const std::string &type, const std::string &name, const IInterface *parent)
Inherit constructor.
Constant< CxxUtils::Array< 1 > > m_energies
Calibration constant: table of energies at which the correction was tabulated.
friend class Builder
Constant< int > m_energy_degree
Calibration constant: degree of the polynomial interpolation in energy.
Read-only multidimensional array.
CaloCluster_v1 CaloCluster
Define the latest version of the calorimeter cluster class.