ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Calorimeter
CaloClusterCorrection
src
CaloTopoEMphimod.cxx
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2026 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
/********************************************************************
6
7
NAME: CaloTopoEMphimod.cxx
8
PACKAGE: offline/Calorimeter/CaloClusterCorrection
9
10
AUTHORS: M.Boonekamp & N.Kerschen
11
CREATED: March 2005
12
13
PURPOSE: correction for the phi offset due to accordion structure
14
base class: CaloClusterCorrection (Algorithm)
15
16
Updated: March 12, 2005 (MB)
17
corrections for the TopoCluster
18
********************************************************************/
19
20
#include "
CaloTopoEMphimod.h
"
21
#include "CLHEP/Units/PhysicalConstants.h"
22
#include "
CaloDetDescr/CaloDetDescrManager.h
"
23
#include "
CaloGeoHelpers/CaloPhiRange.h
"
24
#include <cmath>
25
#include <numbers>
26
27
using
std::numbers::pi;
28
29
30
// make correction to one cluster
31
void
CaloTopoEMphimod::makeTheCorrection
(
const
Context& myctx,
32
xAOD::CaloCluster
* cluster,
33
const
CaloDetDescrElement
* elt,
34
float
/*eta*/
,
35
float
adj_eta,
36
float
phi
,
37
float
/*adj_phi*/
,
38
CaloSampling::CaloSample
/*samp*/
)
const
39
{
40
float
qphimod = 0.;
41
float
aeta = fabs(adj_eta);
42
int
iEtaBin;
43
// u is the normalized coordinate along phi (within a cell)
44
// 0 < u < 1
45
float
u = (
phi
- elt->
phi
()) / elt->
dphi
() + 0.5;
46
47
ATH_MSG_DEBUG
(
" ... phi-mod BEGIN"
<<
endmsg
);
48
ATH_MSG_DEBUG
(
" ... e, eta, phi "
<< cluster->
e
() <<
" "
<< cluster->
eta
() <<
" "
<< cluster->
phi
() <<
" "
<<
endmsg
);
49
50
const
CxxUtils::Array<1>
EtaFrontier =
m_EtaFrontier
(myctx);
51
52
// Compute the correction
53
if
(aeta < EtaFrontier[0])
54
{
55
iEtaBin = (int)(aeta /
m_BarrelGranularity
(myctx));
56
qphimod = 1 -
m_P1b
(myctx)[iEtaBin]*std::cos(8*
pi
*u)
57
-
m_P2b
(myctx)[iEtaBin]*std::cos(16*
pi
*u)
58
-
m_P3b
(myctx)[iEtaBin]*std::sin(8*
pi
*u)
59
-
m_P4b
(myctx)[iEtaBin]*std::sin(16*
pi
*u);
60
}
61
else
if
(aeta > EtaFrontier[1] && aeta < EtaFrontier[2])
62
{
63
iEtaBin = (int)((aeta - EtaFrontier[1]) /
m_EndcapGranularity
(myctx));
64
qphimod = 1 -
m_P1e
(myctx)[iEtaBin]*std::cos(6*
pi
*u)
65
-
m_P2e
(myctx)[iEtaBin]*std::cos(12*
pi
*u)
66
-
m_P3e
(myctx)[iEtaBin]*std::sin(6*
pi
*u)
67
-
m_P4e
(myctx)[iEtaBin]*std::sin(12*
pi
*u);
68
}
69
else
// wrong eta value
70
{
71
return
;
72
}
73
74
// Print out the function for debugging
75
ATH_MSG_DEBUG
(
" ... Phi mod "
<< qphimod <<
" "
<< u <<
" "
<<
phi
<<
" "
<< elt->
phi
()
76
<<
" "
<< adj_eta <<
" "
<< aeta <<
" "
<< iEtaBin <<
endmsg
);
77
78
// Apply the correction
79
setenergy
(cluster, cluster->
e
() * qphimod);
80
81
ATH_MSG_DEBUG
(
" ... phi-mod END"
<<
endmsg
);
82
ATH_MSG_DEBUG
(
" ... e, eta, phi "
<< cluster->
e
() <<
" "
<< cluster->
eta
() <<
" "
<< cluster->
phi
() <<
" "
<<
endmsg
);
83
}
phi
Scalar phi() const
phi method
Definition
AmgMatrixBasePlugin.h:67
endmsg
#define endmsg
Definition
AnalysisConfig_Ntuple.cxx:61
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition
AthMsgStreamMacros.h:29
CaloDetDescrManager.h
Definition of CaloDetDescrManager.
CaloPhiRange.h
CaloPhiRange class declaration.
CaloTopoEMphimod.h
pi
#define pi
Definition
TileMuonFitter.cxx:65
CaloClusterCorrection::setenergy
virtual void setenergy(xAOD::CaloCluster *cluster, float energy) const
Definition
CaloClusterCorrection.cxx:93
CaloDetDescrElement
This class groups all DetDescr information related to a CaloCell.
Definition
Calorimeter/CaloDetDescr/CaloDetDescr/CaloDetDescrElement.h:66
CaloDetDescrElement::dphi
float dphi() const
cell dphi
Definition
Calorimeter/CaloDetDescr/CaloDetDescr/CaloDetDescrElement.h:358
CaloDetDescrElement::phi
float phi() const
cell phi
Definition
Calorimeter/CaloDetDescr/CaloDetDescr/CaloDetDescrElement.h:346
CaloSampling::CaloSample
CaloSample
Definition
Calorimeter/CaloGeoHelpers/CaloGeoHelpers/CaloSampling.h:22
CaloTopoEMphimod::m_P3b
Constant< CxxUtils::Array< 1 > > m_P3b
Definition
CaloTopoEMphimod.h:52
CaloTopoEMphimod::m_P2e
Constant< CxxUtils::Array< 1 > > m_P2e
Definition
CaloTopoEMphimod.h:55
CaloTopoEMphimod::m_P1e
Constant< CxxUtils::Array< 1 > > m_P1e
Definition
CaloTopoEMphimod.h:54
CaloTopoEMphimod::m_P2b
Constant< CxxUtils::Array< 1 > > m_P2b
Definition
CaloTopoEMphimod.h:51
CaloTopoEMphimod::m_P4b
Constant< CxxUtils::Array< 1 > > m_P4b
Definition
CaloTopoEMphimod.h:53
CaloTopoEMphimod::m_EndcapGranularity
Constant< float > m_EndcapGranularity
Definition
CaloTopoEMphimod.h:60
CaloTopoEMphimod::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
Virtual function for the correction-specific code.
Definition
CaloTopoEMphimod.cxx:31
CaloTopoEMphimod::m_P4e
Constant< CxxUtils::Array< 1 > > m_P4e
Definition
CaloTopoEMphimod.h:57
CaloTopoEMphimod::m_P3e
Constant< CxxUtils::Array< 1 > > m_P3e
Definition
CaloTopoEMphimod.h:56
CaloTopoEMphimod::m_BarrelGranularity
Constant< float > m_BarrelGranularity
Definition
CaloTopoEMphimod.h:59
CaloTopoEMphimod::m_P1b
Constant< CxxUtils::Array< 1 > > m_P1b
Definition
CaloTopoEMphimod.h:50
CaloTopoEMphimod::m_EtaFrontier
Constant< CxxUtils::Array< 1 > > m_EtaFrontier
Definition
CaloTopoEMphimod.h:58
CxxUtils::Array
Read-only multidimensional array.
Definition
Control/CxxUtils/CxxUtils/Array.h:135
xAOD::CaloCluster_v1::eta
virtual double eta() const
The pseudorapidity ( ) of the particle.
Definition
CaloCluster_v1.cxx:251
xAOD::CaloCluster_v1::e
virtual double e() const
The total energy of the particle.
Definition
CaloCluster_v1.cxx:265
xAOD::CaloCluster_v1::phi
virtual double phi() const
The azimuthal angle ( ) of the particle.
Definition
CaloCluster_v1.cxx:256
xAOD::CaloCluster
CaloCluster_v1 CaloCluster
Define the latest version of the calorimeter cluster class.
Definition
Event/xAOD/xAODCaloEvent/xAODCaloEvent/CaloCluster.h:19
Generated on
for ATLAS Offline Software by
1.17.0