ATLAS Offline Software
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$
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 
34  : m_cl (&cl),
35  m_eta (cl.eta()),
36  m_phi (cl.phi()),
37  m_p4 (cl.p4())
38 {
39 }
40 
41 
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
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 
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;
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.
python.SystemOfUnits.s
int s
Definition: SystemOfUnits.py:131
xAOD::CaloVertexedClusterBase::computeVertexCorr
void computeVertexCorr(const Amg::Vector3D &vx, double radius)
Calculate cluster kinematics for a given vertex.
Definition: CaloVertexedClusterBase.cxx:67
xAOD::CaloVertexedClusterBase::CaloVertexedClusterBase
CaloVertexedClusterBase(const CaloCluster &cl)
Constructor.
Definition: CaloVertexedClusterBase.cxx:33
CxxUtils::wrapToPi
T wrapToPi(T phi)
Wrap angle in radians to [-pi, pi].
Definition: phihelper.h:24
xAOD::CaloVertexedClusterBase::m_eta
double m_eta
The recalculated cluster eta.
Definition: Event/xAOD/xAODCaloEvent/xAODCaloEvent/CaloVertexedClusterBase.h:109
xAOD::CaloCluster_v1::State
State
enum of possible signal states.
Definition: CaloCluster_v1.h:304
sincos.h
Helper to simultaneously calculate sin and cos of the same angle.
xAOD
ICaloAffectedTool is abstract interface for tools checking if 4 mom is in calo affected region.
Definition: ICaloAffectedTool.h:24
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
AthenaPoolTestRead.sc
sc
Definition: AthenaPoolTestRead.py:27
xAOD::phi
setEt phi
Definition: TrigEMCluster_v1.cxx:29
xAOD::CaloCluster_v1
Description of a calorimeter cluster.
Definition: CaloCluster_v1.h:59
xAOD::CaloVertexedClusterBase::m_phi
double m_phi
The recalculated cluster phi.
Definition: Event/xAOD/xAODCaloEvent/xAODCaloEvent/CaloVertexedClusterBase.h:113
xAOD::CaloVertexedClusterBase::m_p4
FourMom_t m_p4
The recalculated cluster 4-momentum.
Definition: Event/xAOD/xAODCaloEvent/xAODCaloEvent/CaloVertexedClusterBase.h:117
phihelper.h
Helper for azimuthal angle calculations.
Amg::Vector3D
Eigen::Matrix< double, 3, 1 > Vector3D
Definition: GeoPrimitives.h:47
ParticleGun_SamplingFraction.radius
radius
Definition: ParticleGun_SamplingFraction.py:96
CxxUtils::sincos
Helper to simultaneously calculate sin and cos of the same angle.
Definition: sincos.h:76
xAOD::CaloVertexedClusterBase::pt
virtual double pt() const final
The transverse momentum ( ) of the particle.
Definition: Event/xAOD/xAODCaloEvent/xAODCaloEvent/CaloVertexedClusterBase.h:75
dq_make_web_display.cl
cl
print [x.__class__ for x in toList(dqregion.getSubRegions()) ]
Definition: dq_make_web_display.py:26