ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Reconstruction
egamma
egammaUtils
Root
egPhotonWrtPoint.cxx
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
#include "
egammaUtils/egPhotonWrtPoint.h
"
6
7
#include "
egammaUtils/ShowerDepthUtil.h
"
8
#include "
xAODEgamma/Egamma.h
"
9
10
photonWrtPoint::PtEtaPhi
photonWrtPoint::PtEtaPhiWrtZ
(
const
xAOD::Egamma
& ph,
11
double
z
) {
12
std::pair<double, float> RZ1 = {0., 0.};
13
float
etaBE1 = ph.
caloCluster
()->
etaBE
(1);
14
if
(std::abs(etaBE1) < 10) RZ1 =
CP::ShowerDepthUtil::getRZ
(etaBE1, 1);
15
16
double
rCalo = RZ1.first;
17
double
zCalo = RZ1.second;
18
double
correctedZ = zCalo -
z
;
19
double
eta
= rCalo>0. ? std::asinh(correctedZ / rCalo) : ph.
eta
();
20
return
{ph.
e
() / std::cosh(
eta
),
eta
, ph.
phi
()};
21
}
22
23
void
photonWrtPoint::correctForZ
(
xAOD::Egamma
& ph,
double
z
) {
24
auto
corr =
photonWrtPoint::PtEtaPhiWrtZ
(ph,
z
);
25
ph.
setPtEtaPhi
(corr.pt, corr.eta, corr.phi);
26
}
27
eta
Scalar eta() const
pseudorapidity method
Definition
AmgMatrixBasePlugin.h:83
Egamma.h
ShowerDepthUtil.h
z
#define z
CP::ShowerDepthUtil::getRZ
static std::pair< float, float > getRZ(float eta, int sampling)
Shower depth in R,Z for the given sampling.
Definition
ShowerDepthUtil.cxx:111
xAOD::CaloCluster_v1::etaBE
float etaBE(const unsigned layer) const
Get the eta in one layer of the EM Calo.
Definition
CaloCluster_v1.cxx:628
xAOD::Egamma_v1::e
virtual double e() const override
The total energy of the particle.
Definition
Egamma_v1.cxx:86
xAOD::Egamma_v1::eta
virtual double eta() const override final
The pseudorapidity ( ) of the particle.
Definition
Egamma_v1.cxx:71
xAOD::Egamma_v1::setPtEtaPhi
void setPtEtaPhi(float pt, float eta, float phi)
set the 4-vec
Definition
Egamma_v1.cxx:100
xAOD::Egamma_v1::phi
virtual double phi() const override final
The azimuthal angle ( ) of the particle.
Definition
Egamma_v1.cxx:76
xAOD::Egamma_v1::caloCluster
const xAOD::CaloCluster * caloCluster(size_t index=0) const
Pointer to the xAOD::CaloCluster/s that define the electron candidate.
Definition
Egamma_v1.cxx:377
egPhotonWrtPoint.h
photonWrtPoint::PtEtaPhiWrtZ
PtEtaPhi PtEtaPhiWrtZ(const xAOD::Egamma &ph, double z)
Function to get the kinematics of a photon cluster wrt (0,0,z0).
Definition
egPhotonWrtPoint.cxx:10
photonWrtPoint::correctForZ
void correctForZ(xAOD::Egamma &ph, double z)
Function to modify in place the kinematics of a photon wrt (0,0,z0).
Definition
egPhotonWrtPoint.cxx:23
xAOD::Egamma
Egamma_v1 Egamma
Definition of the current "egamma version".
Definition
Egamma.h:17
photonWrtPoint::PtEtaPhi
egamma clusters kinematics are always wrt the ATLAS frame (0,0,0).
Definition
egPhotonWrtPoint.h:20
Generated on
for ATLAS Offline Software by
1.17.0