ATLAS Offline Software
Loading...
Searching...
No Matches
CaloTopoEMlayers.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
3*/
4
5/********************************************************************
6
7NAME: CaloTopoEMLayers.cxx
8PACKAGE: offline/Calorimeter/CaloClusterCorrection
9
10AUTHORS: H. Ma, S. Rajagopalan
11CREATED: Dec. 15, 1999
12
13PURPOSE: Computer eta, phi, energy of each layers of a cluster
14 Base class: CaloClusterCorrection (Algorithm)
15
16
17Updated: May 10, 2000 (SR, HM)
18 Migrated to Athena Framework from PASO
19
20Updated: Jan 5, 2001 (HM)
21 QA.
22Updated: Apr 14, 2003 (MW)
23 small bug fix for barrel/endcap region
24
25Updated: May 5, 2004 (Sven Menke)
26 base class changed from algo to tool
27
28Updated: January, 2005 (MB)
29 Move to Calorimeter/CaloClusterCorrection.
30
31Updated: March, 2005 (MB)
32 Temporary : this should not be needed when TopoCluster fills
33 information as sliding window (in particular eta0, phi0 of
34 clusters)
35
36*********************************************************************/
37
38// include header files
39#include "CaloTopoEMlayers.h"
40#include "CaloEvent/CaloCluster.h"
41
42
43// -------------------------------------------------------------
44// Constructor
45// -------------------------------------------------------------
47 const std::string& name,
48 const IInterface* parent)
49 : CaloFillRectangularCluster(type, name, parent)
50{
51 m_fill_cluster = false;
52}
53
54
55// Algorithm initialization.
57{
59
60 return StatusCode::SUCCESS;
61}
62
63
65 const xAOD::CaloCluster* cluster,
66 double& eta,
67 double& phi) const
68{
69 eta = cluster->eta();
70 phi = cluster->phi();
71}
72
73
85 const int nphi,
86 const double detas2,
87 const double dphis2) const
88{
90
91 float f_neta = (float)neta;
92 float f_nphi = (float)nphi;
93
94 w[0].first = detas2*f_neta;
95 w[1].first = w[0].first;
96 w[2].first = w[0].first;
97 w[3].first = w[0].first;
98
99 w[0].second = dphis2*f_nphi;
100 w[1].second = w[0].second;
101 w[2].second = w[0].second;
102 w[3].second = w[0].second;
103
104 return w;
105}
Scalar eta() const
pseudorapidity method
Scalar phi() const
phi method
#define CHECK(...)
Evaluate an expression and check for errors.
Sampling calculator helper class.
std::array< std::pair< double, double >, 4 > WindowArray_t
Holds the per-layer window sizes.
virtual StatusCode initialize() override
Standard Gaudi initialize method.
CaloFillRectangularCluster(const std::string &type, const std::string &name, const IInterface *parent)
Standard Gaudi constructor.
virtual WindowArray_t initWindows(const int neta, const int nphi, const double detas2, const double dphis2) const override
Set up layer-by-layer cluster window sizes.
virtual StatusCode initialize() override
Standard Gaudi initialize method.
virtual void get_seed(CaloClusterCorr::SamplingHelper &helper, const xAOD::CaloCluster *cluster, double &eta, double &phi) const override
CaloTopoEMlayers(const std::string &type, const std::string &name, const IInterface *parent)
virtual double eta() const
The pseudorapidity ( ) of the particle.
virtual double phi() const
The azimuthal angle ( ) of the particle.
CaloCluster_v1 CaloCluster
Define the latest version of the calorimeter cluster class.