ATLAS Offline Software
CaloVertexedClusterBase.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 // $Id$
15 #include "CxxUtils/sincos.h"
16 #include <cmath>
17 
18 using std::cosh;
19 using std::tanh;
20 
21 
22 namespace xAOD {
23 
24 
33  : m_cl (&cl),
34  m_eta (cl.eta()),
35  m_phi (cl.phi()),
36  m_p4 (cl.p4())
37 {
38 }
39 
40 
51  : m_cl (&cl),
52  m_eta (cl.eta(s)),
53  m_phi (cl.phi(s)),
54  m_p4 (cl.p4(s))
55 {
56 }
57 
58 
59 
60 
65 void
67 {
68 
69  if (radius<1.) return;
70 
71  double eta = m_eta;
72  double phi = m_phi;
73 
74  if (std::fabs(eta)>10. || std::fabs(phi)>10.) return;
75 
76 
77 
79  double iradius = 1 / radius;
80  m_eta += (-vx[2]/cosh(m_eta) + sc.apply (vx[1], vx[0])*tanh(m_eta)) * iradius;
81  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:66
eta
Scalar eta() const
pseudorapidity method
Definition: AmgMatrixBasePlugin.h:79
xAOD::CaloVertexedClusterBase::CaloVertexedClusterBase
CaloVertexedClusterBase(const CaloCluster &cl)
Constructor.
Definition: CaloVertexedClusterBase.cxx:32
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
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