ATLAS Offline Software
CaloSwPhioff_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 */
33 #ifndef CALOCLUSTERCORRECTION_CALOSWPHIOFF_V2_H
34 #define CALOCLUSTERCORRECTION_CALOSWPHIOFF_V2_H
35 
36 
38 #include "CaloConditions/Array.h"
39 
40 
56 {
57 public:
60 
61 
82  virtual void makeTheCorrection (const Context& myctx,
83  xAOD::CaloCluster* cluster,
84  const CaloDetDescrElement* elt,
85  float eta,
86  float adj_eta,
87  float phi,
88  float adj_phi,
89  CaloSampling::CaloSample samp) const override;
90 
91 
92 private:
97  class Builder
98  : public TableBuilder
99  {
100  public:
105  const CxxUtils::Array<1>& interp_barriers,
106  int degree,
107  float aeta);
108 
110  virtual float calculate (int energy_ndx, bool& good) const;
111 
112  private:
115 
118 
120  int m_degree;
121 
124  float m_aeta;
125  };
126 
129  { this, "correction", "Tabulated arrays of function parameters." };
130 
134  { this, "interp_barriers", "Allow breaking up the interpolation into independent regions." };
135 
138  { this, "degree", "Degree of the polynomial interpolation." };
139 
143  { this, "correction_coef", "Coefficient by which to scale the entire correction." };
144 
148  { this, "flip_phi", "If true, the correction gets an opposite sign if eta < 0." };
149 
153  { this, "energies", "Table of energies at which the correction was tabulated." };
154 
157  { this, "energy_degree", "Degree of the polynomial interpolation in energy." };
158 };
159 
160 
161 #endif // not CALOCLUSTERCORRECTION_CALOSWPHIOFF_V2_H
CaloSwPhioff_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: CaloSwPhioff_v2.cxx:72
CaloSwPhioff_v2::Builder::m_aeta
float m_aeta
The abs(eta) at which the correction is being evaluated (in cal-local coordinates).
Definition: CaloSwPhioff_v2.h:124
CaloSwPhioff_v2::Builder::calculate
virtual float calculate(int energy_ndx, bool &good) const
Calculate the correction for tabulated energy ENERGY_NDX.
Definition: CaloSwPhioff_v2.cxx:126
CaloDetDescrElement
This class groups all DetDescr information related to a CaloCell. Provides a generic interface for al...
Definition: Calorimeter/CaloDetDescr/CaloDetDescr/CaloDetDescrElement.h:66
CaloSwPhioff_v2::m_energies
Constant< CxxUtils::Array< 1 > > m_energies
Calibration constant: table of energies at which the correction was tabulated.
Definition: CaloSwPhioff_v2.h:153
CaloSwPhioff_v2::m_energy_degree
Constant< int > m_energy_degree
Calibration constant: degree of the polynomial interpolation in energy.
Definition: CaloSwPhioff_v2.h:157
Array.h
Simple multidimensional arrays.
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
CaloSwPhioff_v2::Builder
Helper class for calculating the energy interpolation table.
Definition: CaloSwPhioff_v2.h:99
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 >
CaloClusterCorrectionCommon.h
CaloSwPhioff_v2::Builder::m_correction
const CxxUtils::Array< 3 > m_correction
Tabulated arrays of function parameters.
Definition: CaloSwPhioff_v2.h:114
CaloSwPhioff_v2::m_degree
Constant< int > m_degree
Calibration constant: degree of the polynomial interpolation.
Definition: CaloSwPhioff_v2.h:138
CaloSwPhioff_v2::m_correction_coef
Constant< float > m_correction_coef
Calibration constant: coefficient by which to scale the entire correction.
Definition: CaloSwPhioff_v2.h:143
CaloSwPhioff_v2::m_correction
Constant< CaloRec::Array< 3 > > m_correction
Calibration constant: tabulated arrays of function parameters.
Definition: CaloSwPhioff_v2.h:129
ReadBchFromCool.good
good
Definition: ReadBchFromCool.py:433
CaloSwPhioff_v2
Definition: CaloSwPhioff_v2.py:1
CaloUtils::ToolConstantsContext
Context object for retrieving ToolConstant values.
Definition: ToolWithConstants.h:61
CaloSwPhioff_v2::m_flip_phi
Constant< bool > m_flip_phi
Calibration constant: if true, the correction gets an opposite sign if eta < 0.
Definition: CaloSwPhioff_v2.h:148
CaloSwPhioff_v2::Builder::Builder
Builder(const CxxUtils::Array< 3 > &correction, const CxxUtils::Array< 1 > &interp_barriers, int degree, float aeta)
Constructor.
Definition: CaloSwPhioff_v2.cxx:108
CaloClusterCorrectionCommon
Code common to cluster corrections.
Definition: CaloClusterCorrectionCommon.h:42
CaloSwPhioff_v2::m_interp_barriers
Constant< CxxUtils::Array< 1 > > m_interp_barriers
Calibration constant: allow breaking up the interpolation into independent regions.
Definition: CaloSwPhioff_v2.h:134
CaloSwPhioff_v2::Builder::m_interp_barriers
const CxxUtils::Array< 1 > m_interp_barriers
Allow breaking up the interpolation into independent regions.
Definition: CaloSwPhioff_v2.h:117
CaloUtils::ToolConstant
Constant of a ToolWithConstants.
Definition: ToolWithConstants.h:202
python.SystemOfUnits.degree
tuple degree
Definition: SystemOfUnits.py:106
CaloSwPhioff_v2::Builder::m_degree
int m_degree
Degree of the polynomial interpolation.
Definition: CaloSwPhioff_v2.h:120