ATLAS Offline Software
Loading...
Searching...
No Matches
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
15#include "CxxUtils/sincos.h"
16#include "CxxUtils/phihelper.h"
17#include <cmath>
18
19using std::cosh;
20using std::tanh;
21
22
23namespace 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
66void
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
Base class to evaluate cluster kinematics with a different vertex / signal state.
static Double_t sc
State
enum of possible signal states.
CaloVertexedClusterBase(const CaloCluster &cl)
Constructor.
virtual FourMom_t p4() const final
The full 4-momentum of the particle.
virtual double phi() const final
The azimuthal angle ( ) of the particle.
virtual double eta() const final
The pseudorapidity ( ) of the particle.
void computeVertexCorr(const Amg::Vector3D &vx, double radius)
Calculate cluster kinematics for a given vertex.
virtual double pt() const final
The transverse momentum ( ) of the particle.
Eigen::Matrix< double, 3, 1 > Vector3D
T wrapToPi(T phi)
Wrap angle in radians to [-pi, pi].
Definition phihelper.h:24
ICaloAffectedTool is abstract interface for tools checking if 4 mom is in calo affected region.
CaloCluster_v1 CaloCluster
Define the latest version of the calorimeter cluster class.
Helper for azimuthal angle calculations.
Helper to simultaneously calculate sin and cos of the same angle.
Helper to simultaneously calculate sin and cos of the same angle.
Definition sincos.h:39