ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Event
xAOD
xAODCaloEvent
Root
CaloVertexedClusterBase.cxx
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
// $Id$
12
13
14
#include "
xAODCaloEvent/CaloVertexedClusterBase.h
"
15
#include "
CxxUtils/sincos.h
"
16
#include "
CxxUtils/phihelper.h
"
17
#include <cmath>
18
19
using
std::cosh;
20
using
std::tanh;
21
22
23
namespace
xAOD
{
24
25
33
CaloVertexedClusterBase::CaloVertexedClusterBase
(
const
CaloCluster
& cl)
34
:
m_cl
(&cl),
35
m_eta
(cl.
eta
()),
36
m_phi
(cl.
phi
()),
37
m_p4
(cl.
p4
())
38
{
39
}
40
41
50
CaloVertexedClusterBase::CaloVertexedClusterBase
(
const
CaloCluster
& cl,
51
CaloCluster::State
s)
52
:
m_cl
(&cl),
53
m_eta
(cl.
eta
(s)),
54
m_phi
(cl.
phi
(s)),
55
m_p4
(cl.
p4
(s))
56
{
57
}
58
59
60
61
66
void
67
CaloVertexedClusterBase::computeVertexCorr
(
const
Amg::Vector3D
& vx,
double
radius)
68
{
69
70
if
(radius<1.)
return
;
71
72
double
eta
=
m_eta
;
73
double
phi
=
m_phi
;
74
75
if
(std::fabs(
eta
)>10. || std::fabs(
phi
)>10.)
return
;
76
77
CxxUtils::sincos
sc
(
phi
);
78
double
iradius = 1 / radius;
79
m_eta
+= (-vx[2]/cosh(
m_eta
) +
sc
.apply (vx[1], vx[0])*tanh(
m_eta
)) * iradius;
80
m_phi
+=
sc
.apply (vx[0], -vx[1]) * iradius;
81
m_phi
=
CxxUtils::wrapToPi
(
m_phi
);
82
83
double
pt
=
m_p4
.P() / cosh (
m_eta
);
84
m_p4
.SetPtEtaPhiE (
pt
,
m_eta
,
m_phi
,
m_p4
.E());
85
}
86
87
88
}
// namespace xAOD
CaloVertexedClusterBase.h
Base class to evaluate cluster kinematics with a different vertex / signal state.
sc
static Double_t sc
Definition
LArPhysWaveHECTool.cxx:37
xAOD::CaloCluster_v1::State
State
enum of possible signal states.
Definition
CaloCluster_v1.h:307
xAOD::CaloVertexedClusterBase::CaloVertexedClusterBase
CaloVertexedClusterBase(const CaloCluster &cl)
Constructor.
Definition
CaloVertexedClusterBase.cxx:33
xAOD::CaloVertexedClusterBase::m_p4
FourMom_t m_p4
The recalculated cluster 4-momentum.
Definition
Event/xAOD/xAODCaloEvent/xAODCaloEvent/CaloVertexedClusterBase.h:117
xAOD::CaloVertexedClusterBase::p4
virtual FourMom_t p4() const final
The full 4-momentum of the particle.
Definition
Event/xAOD/xAODCaloEvent/xAODCaloEvent/CaloVertexedClusterBase.h:88
xAOD::CaloVertexedClusterBase::m_cl
const CaloCluster * m_cl
The cluster being proxied.
Definition
Event/xAOD/xAODCaloEvent/xAODCaloEvent/CaloVertexedClusterBase.h:105
xAOD::CaloVertexedClusterBase::phi
virtual double phi() const final
The azimuthal angle ( ) of the particle.
Definition
Event/xAOD/xAODCaloEvent/xAODCaloEvent/CaloVertexedClusterBase.h:79
xAOD::CaloVertexedClusterBase::eta
virtual double eta() const final
The pseudorapidity ( ) of the particle.
Definition
Event/xAOD/xAODCaloEvent/xAODCaloEvent/CaloVertexedClusterBase.h:77
xAOD::CaloVertexedClusterBase::computeVertexCorr
void computeVertexCorr(const Amg::Vector3D &vx, double radius)
Calculate cluster kinematics for a given vertex.
Definition
CaloVertexedClusterBase.cxx:67
xAOD::CaloVertexedClusterBase::m_phi
double m_phi
The recalculated cluster phi.
Definition
Event/xAOD/xAODCaloEvent/xAODCaloEvent/CaloVertexedClusterBase.h:113
xAOD::CaloVertexedClusterBase::pt
virtual double pt() const final
The transverse momentum ( ) of the particle.
Definition
Event/xAOD/xAODCaloEvent/xAODCaloEvent/CaloVertexedClusterBase.h:75
xAOD::CaloVertexedClusterBase::m_eta
double m_eta
The recalculated cluster eta.
Definition
Event/xAOD/xAODCaloEvent/xAODCaloEvent/CaloVertexedClusterBase.h:109
Amg::Vector3D
Eigen::Matrix< double, 3, 1 > Vector3D
Definition
GeoPrimitives.h:47
CxxUtils::wrapToPi
constexpr T wrapToPi(T phi)
Wrap angle in radians to [-pi, pi].
Definition
phihelper.h:31
xAOD
ICaloAffectedTool is abstract interface for tools checking if 4 mom is in calo affected region.
Definition
ICaloAffectedTool.h:24
xAOD::CaloCluster
CaloCluster_v1 CaloCluster
Define the latest version of the calorimeter cluster class.
Definition
Event/xAOD/xAODCaloEvent/xAODCaloEvent/CaloCluster.h:19
phihelper.h
Helper for azimuthal angle calculations.
sincos.h
Helper to simultaneously calculate sin and cos of the same angle.
CxxUtils::sincos
Helper to simultaneously calculate sin and cos of the same angle.
Definition
sincos.h:39
Generated on
for ATLAS Offline Software by
1.17.0