ATLAS Offline Software
Loading...
Searching...
No Matches
CaloClusterCorrectionCommon.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*/
5/* @file CaloClusterCorrectionCommon.h
6 * @author scott snyder <snyder@bnl.gov>
7 * @date December, 2004
8 * @brief Code common to cluster corrections.
9 */
10
11#ifndef CALOCLUSTERCORRECTIONCOMMON_H
12#define CALOCLUSTERCORRECTIONCOMMON_H
13
14
17#include "GaudiKernel/EventContext.h"
18#include <vector>
20
21
22namespace CaloClusterCorr {
23class DDHelper;
24}
25
26
42{
43public:
45 //using CaloClusterCorrection::CaloClusterCorrection;
46 CaloClusterCorrectionCommon (const std::string& type,
47 const std::string& name,
48 const IInterface* parent);
49
50
53
54
61 virtual void makeCorrection (const Context& myctx,
62 xAOD::CaloCluster* cluster) const override;
63
64
87 virtual void makeTheCorrection (const Context& myctx,
88 xAOD::CaloCluster* cluster,
89 const CaloDetDescrElement* elt,
90 float eta,
91 float adj_eta,
92 float phi,
93 float adj_phi,
94 CaloSampling::CaloSample samp) const = 0;
95
96
100 enum {
101 // Barrel, sampling 1.
102 EMB1 = 0,
103
104 // Barrel, sampling 2.
105 EMB2 = 1,
106
107 // Endcap, sampling 1.
108 EME1 = 2,
109
110 // Endcap, sampling 2.
111 EME2 = 3,
112
113 // Average of barrel and endcap in sampling 2.
115
116 // Overall cluster position.
118
119 // Number of different region codes.
121 };
122
123
127 {
128 public:
129 virtual ~TableBuilder() {}
130
133 virtual float calculate (int energy_ndx, bool& good) const = 0;
134 };
135
136
145 static float energy_interpolation (float energy,
146 const TableBuilder& builder,
147 const CaloRec::Array<1>& energies,
148 int energy_degree) ;
149
150
151
152private:
155 const CaloClusterCorr::DDHelper& ddhelper(const CaloDetDescrManager* dd_man) const;
156
162 { this, "region", "Calorimeter region" };
163
166};
167
168
169#endif // not CALOCLUSTERCORRECTIONCOMMON_H
Scalar eta() const
pseudorapidity method
Scalar phi() const
phi method
Cached unique_ptr with atomic update.
Helper, used to calculate the values of the energy interpolation table.
virtual float calculate(int energy_ndx, bool &good) const =0
Calculate the correction for tabulated energy energy_ndx.
static float energy_interpolation(float energy, const TableBuilder &builder, const CaloRec::Array< 1 > &energies, int energy_degree)
Many of the corrections use the same method for doing the final interpolation in energy.
virtual ~CaloClusterCorrectionCommon()
Destructor.
CaloClusterCorrectionCommon(const std::string &type, const std::string &name, const IInterface *parent)
Inherit constructor.
CxxUtils::CachedUniquePtr< const CaloClusterCorr::DDHelper > m_ddhelper
Helper for detector description lookup.
const CaloClusterCorr::DDHelper & ddhelper(const CaloDetDescrManager *dd_man) const
Retrieve the detector description helper, creating it if needed.
virtual void makeCorrection(const Context &myctx, xAOD::CaloCluster *cluster) const override
Perform the correction.
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 =0
Virtual function for the correction-specific code.
Constant< int > m_region
Calibration constant: The calorimeter region for which this correction is intended.
This class groups all DetDescr information related to a CaloCell.
This class provides the client interface for accessing the detector description information common to...
Read-only multidimensional array.
CachedUniquePtrT< const T > CachedUniquePtr
CaloCluster_v1 CaloCluster
Define the latest version of the calorimeter cluster class.