ATLAS Offline Software
CaloSwPhimod_v2.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 */
37 #ifndef CALOCLUSTERCORRECTION_CALOSWPHIMOD_V2_H
38 #define CALOCLUSTERCORRECTION_CALOSWPHIMOD_V2_H
39 
40 
42 #include "CaloConditions/Array.h"
43 
44 
90 {
91 public:
94 
115  virtual void makeTheCorrection (const Context& myctx,
116  xAOD::CaloCluster* cluster,
117  const CaloDetDescrElement* elt,
118  float eta,
119  float adj_eta,
120  float phi,
121  float adj_phi,
122  CaloSampling::CaloSample samp) const override;
123 
124 
125 private:
130  class Builder
131  : public TableBuilder
132  {
133  public:
139  const CxxUtils::Array<1>& interp_barriers,
140  int degree,
141  float correction_coef,
142  float aeta, float phi, int nabs);
143 
145  virtual float calculate (int energy_ndx, bool& good) const;
146 
147  private:
150 
153 
155  int m_degree;
156 
159 
162  float m_aeta;
163 
165  float m_phi;
166 
168  int m_nabs;
169  };
170 
173  { this, "correction", "Tabulated arrays of function parameters." };
174 
178  { this, "interp_barriers", "Allow breaking up the interpolation into independent regions." };
179 
182  { this, "degree", "Degree of the polynomial interpolation." };
183 
187  { this, "correction_coef", "Coefficient by which to scale the entire correction." };
188 
189  // Calibration constant: Correction factors for crude containment
190  // correction used internally for the energy interpolation.
192  { this, "rfac", "Correction factors for crude containment correction used internally for the energy interpolation." };
193 
194  // Calibration constant: Interpolation degree for crude containment
195  // correction used internally for the energy interpolation.
197  { this, "rfac_degree", "Interpolation degree for crude containment correction used internally for the energy interpolation." };
198 
202  { this, "energies", "Table of energies at which the correction was tabulated." };
203 
206  { this, "energy_degree", "Degree of the polynomial interpolation in energy." };
207 
211  { this, "use_raw_eta", "If true, tabulated values are in terms of raw (local) eta." };
212 };
213 
214 
215 #endif // not CALOCLUSTERCORRECTION_CALOSWPHIMOD_V2_H
CaloSwPhimod_v2::Builder
Helper class for calculating the energy interpolation table.
Definition: CaloSwPhimod_v2.h:132
phi
Scalar phi() const
phi method
Definition: AmgMatrixBasePlugin.h:64
eta
Scalar eta() const
pseudorapidity method
Definition: AmgMatrixBasePlugin.h:79
CaloSwPhimod_v2::Builder::m_aeta
float m_aeta
The abs(eta) at which the correction is being evaluated (in cal-local coordinates).
Definition: CaloSwPhimod_v2.h:162
CaloDetDescrElement
This class groups all DetDescr information related to a CaloCell. Provides a generic interface for al...
Definition: Calorimeter/CaloDetDescr/CaloDetDescr/CaloDetDescrElement.h:66
CaloSwPhimod_v2::Builder::calculate
virtual float calculate(int energy_ndx, bool &good) const
Calculate the correction for tabulated energy ENERGY_NDX.
Definition: CaloSwPhimod_v2.cxx:162
CaloSwPhimod_v2::Builder::m_correction
const CxxUtils::Array< 3 > m_correction
The correction table.
Definition: CaloSwPhimod_v2.h:149
CaloSwPhimod_v2::Builder::m_interp_barriers
const CxxUtils::Array< 1 > m_interp_barriers
Allow breaking up the interpolation into independent regions.
Definition: CaloSwPhimod_v2.h:152
Array.h
Simple multidimensional arrays.
CaloSwPhimod_v2::Builder::m_phi
float m_phi
The cluster phi.
Definition: CaloSwPhimod_v2.h:165
CaloSwPhimod_v2::m_interp_barriers
Constant< CxxUtils::Array< 1 > > m_interp_barriers
Calibration constant: allow breaking up the interpolation into independent regions.
Definition: CaloSwPhimod_v2.h:178
tools.zlumi_mc_cf.correction
def correction(mu, runmode, campaign, run=None)
Definition: zlumi_mc_cf.py:4
CaloClusterCorrectionCommon::TableBuilder
Helper, used to calculate the values of the energy interpolation table.
Definition: CaloClusterCorrectionCommon.h:127
xAOD::CaloCluster_v1
Description of a calorimeter cluster.
Definition: CaloCluster_v1.h:59
CaloSampling::CaloSample
CaloSample
Definition: Calorimeter/CaloGeoHelpers/CaloGeoHelpers/CaloSampling.h:22
CaloClusterCorrectionCommon::CaloClusterCorrectionCommon
CaloClusterCorrectionCommon(const std::string &type, const std::string &name, const IInterface *parent)
Inherit constructor.
Definition: CaloClusterCorrectionCommon.cxx:408
CxxUtils::Array< 3 >
CaloSwPhimod_v2
Definition: CaloSwPhimod_v2.py:1
CaloClusterCorrectionCommon.h
CaloSwPhimod_v2::m_rfac_degree
Constant< int > m_rfac_degree
Definition: CaloSwPhimod_v2.h:197
CaloSwPhimod_v2::m_rfac
Constant< CxxUtils::Array< 2 > > m_rfac
Definition: CaloSwPhimod_v2.h:192
CaloSwPhimod_v2::Builder::m_nabs
int m_nabs
Number of absorbers in .
Definition: CaloSwPhimod_v2.h:168
CaloSwPhimod_v2::m_energy_degree
Constant< int > m_energy_degree
Calibration constant: degree of the polynomial interpolation in energy.
Definition: CaloSwPhimod_v2.h:206
ReadBchFromCool.good
good
Definition: ReadBchFromCool.py:433
CaloSwPhimod_v2::Builder::m_correction_coef
float m_correction_coef
Coefficient by which to scale the entire correction.
Definition: CaloSwPhimod_v2.h:158
CaloSwPhimod_v2::m_use_raw_eta
Constant< bool > m_use_raw_eta
Calibration constant: If true, tabulated values are in terms of raw (local) eta.
Definition: CaloSwPhimod_v2.h:211
CaloSwPhimod_v2::m_energies
Constant< CxxUtils::Array< 1 > > m_energies
Calibration constant: table of energies at which the correction was tabulated.
Definition: CaloSwPhimod_v2.h:202
CaloUtils::ToolConstantsContext
Context object for retrieving ToolConstant values.
Definition: ToolWithConstants.h:61
CaloSwPhimod_v2::Builder::Builder
Builder(const CxxUtils::Array< 3 > &correction, const CxxUtils::Array< 1 > &interp_barriers, int degree, float correction_coef, float aeta, float phi, int nabs)
Constructor.
Definition: CaloSwPhimod_v2.cxx:138
CaloSwPhimod_v2::Builder::m_degree
int m_degree
Interpolation degree.
Definition: CaloSwPhimod_v2.h:155
CaloSwPhimod_v2::m_degree
Constant< int > m_degree
Calibration constant: degree of the polynomial interpolation.
Definition: CaloSwPhimod_v2.h:182
CaloSwPhimod_v2::m_correction
Constant< CxxUtils::Array< 3 > > m_correction
Calibration constant: tabulated arrays of function parameters.
Definition: CaloSwPhimod_v2.h:173
CaloClusterCorrectionCommon
Code common to cluster corrections.
Definition: CaloClusterCorrectionCommon.h:42
CaloSwPhimod_v2::makeTheCorrection
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.
Definition: CaloSwPhimod_v2.cxx:69
CaloUtils::ToolConstant
Constant of a ToolWithConstants.
Definition: ToolWithConstants.h:202
python.SystemOfUnits.degree
tuple degree
Definition: SystemOfUnits.py:106
CaloSwPhimod_v2::m_correction_coef
Constant< float > m_correction_coef
Calibration constant: coefficient by which to scale the entire correction.
Definition: CaloSwPhimod_v2.h:187