 |
ATLAS Offline Software
|
Go to the documentation of this file.
12 return StatusCode::SUCCESS;
22 ATH_MSG_WARNING(
"NeutralPFOClusterMLCorrectionTool: Charged FlowElement found in neutral FlowElementContainer with index " +
std::to_string(pfo->index()));
38 const double clusterEMEnergy =
cls.rawE();
42 <<
"' found for cluster with index " <<
cls.index()
43 <<
". PFO energy will not be scaled.");
45 const double clusterDecorEnergy = clusterMLCorrectedEnergyAccessor.
isAvailable(
cls) ? clusterMLCorrectedEnergyAccessor(
cls) : clusterEMEnergy;
46 const double scaleFactor = clusterEMEnergy > FLT_MIN ? clusterDecorEnergy / clusterEMEnergy : 1.0;
48 ATH_MSG_DEBUG(
"NeutralPFOClusterMLCorrectionTool: Scaling PFO with index " << pfo.
index()
49 <<
" energy from " << pfo.
e() <<
" to " << (pfo.
e() * scaleFactor)
50 <<
" using cluster index " <<
cls.index()
51 <<
" EM energy " << clusterEMEnergy
52 <<
" Decor energy " << clusterDecorEnergy
53 <<
" scale factor " << scaleFactor);
55 pfo.
setP4(pfo.
pt() * scaleFactor, pfo.
eta(), pfo.
phi(), pfo.
m() * scaleFactor);
63 const std::vector<ElementLink<xAOD::IParticleContainer>> &otherObjectLinks = pfo.
otherObjectLinks();
64 if (otherObjectLinks.size() > 1)
67 bool hasValidLink = !otherObjectLinks.empty() && otherObjectLinks[0].isValid();
virtual double m() const override
The invariant mass of the particle.
Helper class to provide type-safe access to aux data.
const std::vector< ElementLink< IParticleContainer > > & otherObjectLinks() const
virtual double phi() const override
The azimuthal angle ( ) of the particle.
virtual double pt() const override
std::string to_string(const SectorProjector proj)
CaloCluster_v1 CaloCluster
Define the latest version of the calorimeter cluster class.
Description of a calorimeter cluster.
::StatusCode StatusCode
StatusCode definition for legacy code.
size_t index() const
Return the index of this element within its container.
virtual double e() const override
The total energy of the particle.
virtual double eta() const override
The pseudorapidity ( ) of the particle.
#define ATH_MSG_WARNING(x)
void setP4(float pt, float eta, float phi, float m)
bool isAvailable(const ELT &e) const
Test to see if this variable exists in the store.
A detector object made of other lower level object(s)