ATLAS Offline Software
Loading...
Searching...
No Matches
CaloFillRectangularCluster.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/*
4 Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
5*/
6
7// $Id: CaloFillRectangularCluster.h,v 1.7 2009-04-25 17:57:00 ssnyder Exp $
34
35
36#ifndef CALOCLUSTERCORRECTION_CALOFILLRECTANGULARCLUSTER_H
37#define CALOCLUSTERCORRECTION_CALOFILLRECTANGULARCLUSTER_H
38
39
42#include <string>
44#include "GaudiKernel/ThreadLocalContext.h"
47
48
49
50// Helper object used for the per-sampling calculations.
51namespace CaloClusterCorr {
52class SamplingHelper;
53}
54//class CaloCluster;
55class CaloCell;
57
58
60 : public CaloClusterCorrection,
62{
63public:
70 CaloFillRectangularCluster(const std::string& type,
71 const std::string& name,
72 const IInterface* parent);
73
79 virtual StatusCode initialize() override;
80
86 virtual void makeCorrection (const Context& myctx,
87 xAOD::CaloCluster* cluster) const override;
88
89
90 // Alternate version that takes an EventContext.
91 void makeCorrection (const EventContext& ctx,
92 xAOD::CaloCluster* cluster) const
93 {
94 return makeCorrection (context(ctx), cluster);
95 }
96
97
98 /*
99 * @brief Return the seed position of a cluster.
100 * @param helper Sampling calculation helper object.
101 * @param cluster The cluster on which to operate.
102 * @param[out] eta The @f$\eta@f$ location of the cluster seed.
103 * @param[out] phi The @f$\phi@f$ location of the cluster seed.
104 *
105 * The cluster seed is the center of rectangular cluster windows.
106 * This may be overridden by derived classes to change the seed definition.
107 */
108 virtual void get_seed (CaloClusterCorr::SamplingHelper& helper,
109 const xAOD::CaloCluster* cluster,
110 double& eta, double& phi) const;
111
112
117 virtual StatusCode setCaloCellContainerName (const std::string& name) override;
118
119
121 typedef std::array<std::pair<double, double>, 4> WindowArray_t;
122
123
133 virtual
134 WindowArray_t initWindows (const int neta,
135 const int nphi,
136 const double detas2,
137 const double dphis2) const;
138
139
140
141private:
142
145
146
147 /*
148 * @brief Actually make the correction for one region (barrel or endcap).
149 * @param ctx The event context.
150 * @param helper Sampling calculation helper object.
151 * @param eta The @f$\eta@f$ seed of the cluster.
152 * @param phi The @f$\phi@f$ seed of the cluster.
153 * @param samplings List of samplings for this region.
154 */
155 void makeCorrection1 (const EventContext& ctx,
156 const CaloDetDescrManager& dd_man,
158 double eta,
159 double phi,
160 const CaloSampling::CaloSample samplings[4]) const;
161
162
163 /*
164 * @brief Execute the correction, given a helper object.
165 * @param ctx The event context.
166 * @param helper Sampling calculation helper object.
167 */
168 void makeCorrection2 (const EventContext& ctx,
169 const CaloDetDescrManager& dd_man,
170 CaloClusterCorr::SamplingHelper& helper) const;
171
172
173protected:
175 double m_deta0 = 0.0, m_deta1 = 0.0, m_deta2 = 0.0, m_deta3 = 0.0;
176 double m_dphi0 = 0.0, m_dphi1 = 0.0, m_dphi2 = 0.0, m_dphi3 = 0.0;
177
180
185
186
190
191private:
195
196
197};
198
199#endif // not CALOCLUSTERCORRECTION_CALOFILLRECTANGULARCLUSTER_H
Scalar eta() const
pseudorapidity method
Scalar phi() const
phi method
Definition of CaloDetDescrManager.
Property holding a SG store/key/clid from which a ReadHandle is made.
Container class for CaloCell.
Data object for each calorimeter readout cell.
Definition CaloCell.h:57
Sampling calculator helper class.
This class provides the client interface for accessing the detector description information common to...
SG::ReadHandleKey< CaloCellContainer > m_cellsName
The StoreGate key for the container of our input cells.
bool m_setRawState
Property to tell if the raw energy, eta0 and phi0 should be saved as uncalibrated signal state.
virtual void get_seed(CaloClusterCorr::SamplingHelper &helper, const xAOD::CaloCluster *cluster, double &eta, double &phi) const
std::array< std::pair< double, double >, 4 > WindowArray_t
Holds the per-layer window sizes.
void makeCorrection2(const EventContext &ctx, const CaloDetDescrManager &dd_man, CaloClusterCorr::SamplingHelper &helper) const
CaloFillRectangularCluster()=delete
This isn't allowed.
virtual void makeCorrection(const Context &myctx, xAOD::CaloCluster *cluster) const override
CaloClusterCorrection virtual method.
void makeCorrection1(const EventContext &ctx, const CaloDetDescrManager &dd_man, CaloClusterCorr::SamplingHelper &helper, double eta, double phi, const CaloSampling::CaloSample samplings[4]) const
virtual WindowArray_t initWindows(const int neta, const int nphi, const double detas2, const double dphis2) const
Set up layer-by-layer cluster window sizes.
virtual StatusCode initialize() override
Standard Gaudi initialize method.
double m_deta0
Cell window sizes in each sampling.
virtual StatusCode setCaloCellContainerName(const std::string &name) override
Change the name of the CaloCellContainer used by this tool.
int m_neta
cluster size. These are properties.
void makeCorrection(const EventContext &ctx, xAOD::CaloCluster *cluster) const
CaloFillRectangularCluster(const std::string &type, const std::string &name, const IInterface *parent)
Standard Gaudi constructor.
Context context(const EventContext &ctx) const
Allow changing the name of the CaloCellContainer used by a tool.
Property holding a SG store/key/clid from which a ReadHandle is made.
CaloCluster_v1 CaloCluster
Define the latest version of the calorimeter cluster class.