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>
45#include "GaudiKernel/ThreadLocalContext.h"
48
49
50
51// Helper object used for the per-sampling calculations.
52namespace CaloClusterCorr {
53class SamplingHelper;
54}
55//class CaloCluster;
56class CaloCell;
58
59
61 : public CaloClusterCorrection,
63{
64public:
71 CaloFillRectangularCluster(const std::string& type,
72 const std::string& name,
73 const IInterface* parent);
74
80 virtual StatusCode initialize() override;
81
87 virtual void makeCorrection (const Context& myctx,
88 xAOD::CaloCluster* cluster) const override;
89
90
91 // Alternate version that takes an EventContext.
92 void makeCorrection (const EventContext& ctx,
93 xAOD::CaloCluster* cluster) const
94 {
95 return makeCorrection (context(ctx), cluster);
96 }
97
98
99 /*
100 * @brief Return the seed position of a cluster.
101 * @param helper Sampling calculation helper object.
102 * @param cluster The cluster on which to operate.
103 * @param[out] eta The @f$\eta@f$ location of the cluster seed.
104 * @param[out] phi The @f$\phi@f$ location of the cluster seed.
105 *
106 * The cluster seed is the center of rectangular cluster windows.
107 * This may be overridden by derived classes to change the seed definition.
108 */
109 virtual void get_seed (CaloClusterCorr::SamplingHelper& helper,
110 const xAOD::CaloCluster* cluster,
111 double& eta, double& phi) const;
112
113
118 virtual StatusCode setCaloCellContainerName (const std::string& name) override;
119
120
122 typedef std::array<std::pair<double, double>, 4> WindowArray_t;
123
124
134 virtual
135 WindowArray_t initWindows (const int neta,
136 const int nphi,
137 const double detas2,
138 const double dphis2) const;
139
140
141
142private:
143
146
147
148 /*
149 * @brief Actually make the correction for one region (barrel or endcap).
150 * @param ctx The event context.
151 * @param helper Sampling calculation helper object.
152 * @param eta The @f$\eta@f$ seed of the cluster.
153 * @param phi The @f$\phi@f$ seed of the cluster.
154 * @param samplings List of samplings for this region.
155 */
156 void makeCorrection1 (const EventContext& ctx,
157 const CaloDetDescrManager& dd_man,
159 double eta,
160 double phi,
161 const CaloSampling::CaloSample samplings[4]) const;
162
163
164 /*
165 * @brief Execute the correction, given a helper object.
166 * @param ctx The event context.
167 * @param helper Sampling calculation helper object.
168 */
169 void makeCorrection2 (const EventContext& ctx,
170 const CaloDetDescrManager& dd_man,
171 CaloClusterCorr::SamplingHelper& helper) const;
172
173
174protected:
176 double m_deta0 = 0.0, m_deta1 = 0.0, m_deta2 = 0.0, m_deta3 = 0.0;
177 double m_dphi0 = 0.0, m_dphi1 = 0.0, m_dphi2 = 0.0, m_dphi3 = 0.0;
178
181
186
187
191
192private:
196
197
198};
199
200#endif // not CALOCLUSTERCORRECTION_CALOFILLRECTANGULARCLUSTER_H
Scalar eta() const
pseudorapidity method
Scalar phi() const
phi method
Definition of CaloDetDescrManager.
defines and typedefs for IOVSvc
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.