Commit 4cca5653 authored by Christos Anastopoulos's avatar Christos Anastopoulos
Browse files

Egamma : Pass EventContext down the call chain (2nd pass)

parent 4cda231e
/* /*
Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
*/ */
/*************************************************************************** /***************************************************************************
...@@ -63,7 +63,7 @@ StatusCode EMVertexBuilder::execute(const EventContext& ctx) const ...@@ -63,7 +63,7 @@ StatusCode EMVertexBuilder::execute(const EventContext& ctx) const
} }
std::pair<xAOD::VertexContainer*, xAOD::VertexAuxContainer*> verticesPair = std::pair<xAOD::VertexContainer*, xAOD::VertexAuxContainer*> verticesPair =
m_vertexFinderTool->findVertex(TPCol.cptr()); m_vertexFinderTool->findVertex(ctx,TPCol.cptr());
if (!verticesPair.first || !verticesPair.second){ if (!verticesPair.first || !verticesPair.second){
ATH_MSG_ERROR("Null pointer to conversion container"); ATH_MSG_ERROR("Null pointer to conversion container");
......
/* /*
Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
*/ */
#include "egammaRecBuilder.h" #include "egammaRecBuilder.h"
...@@ -104,7 +104,7 @@ egammaRecBuilder::execute(const EventContext& ctx) const ...@@ -104,7 +104,7 @@ egammaRecBuilder::execute(const EventContext& ctx) const
const size_t nTopo = topoclusters->size(); const size_t nTopo = topoclusters->size();
egammaRecs->reserve(nTopo); egammaRecs->reserve(nTopo);
for (size_t i(0); i < nTopo; i++) { for (size_t i(0); i < nTopo; i++) {
const ElementLink<xAOD::CaloClusterContainer> clusterLink(*topoclusters, i); const ElementLink<xAOD::CaloClusterContainer> clusterLink(*topoclusters, i, ctx);
const std::vector<ElementLink<xAOD::CaloClusterContainer>> ClusterLink{ const std::vector<ElementLink<xAOD::CaloClusterContainer>> ClusterLink{
clusterLink clusterLink
}; };
......
/* /*
Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
*/ */
#include "EMClusterTool.h" #include "EMClusterTool.h"
...@@ -192,7 +192,7 @@ EMClusterTool::setNewCluster(const EventContext& ctx, ...@@ -192,7 +192,7 @@ EMClusterTool::setNewCluster(const EventContext& ctx,
outputClusterContainer->push_back(cluster); outputClusterContainer->push_back(cluster);
// Set the link to the new cluster // Set the link to the new cluster
ClusterLink_t clusterLink(cluster, *outputClusterContainer); ClusterLink_t clusterLink(cluster, *outputClusterContainer, ctx);
const std::vector<ClusterLink_t> clusterLinks{ clusterLink }; const std::vector<ClusterLink_t> clusterLinks{ clusterLink };
eg->setCaloClusterLinks(clusterLinks); eg->setCaloClusterLinks(clusterLinks);
} }
......
/* /*
Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
*/ */
// INCLUDE HEADER FILES: // INCLUDE HEADER FILES:
...@@ -137,7 +137,7 @@ EMTrackMatchBuilder::trackExecute( ...@@ -137,7 +137,7 @@ EMTrackMatchBuilder::trackExecute(
using EL = ElementLink<xAOD::TrackParticleContainer>; using EL = ElementLink<xAOD::TrackParticleContainer>;
std::vector<EL> trackParticleLinks; std::vector<EL> trackParticleLinks;
trackParticleLinks.reserve(trkMatches.size()); trackParticleLinks.reserve(trkMatches.size());
const std::string key = EL(*trackPC, 0).dataID(); const std::string key = EL(*trackPC, 0, ctx).dataID();
for (const TrackMatch& m : trkMatches) { for (const TrackMatch& m : trkMatches) {
ATH_MSG_DEBUG("Match dR: " << m.dR << " second dR: " << m.seconddR ATH_MSG_DEBUG("Match dR: " << m.dR << " second dR: " << m.seconddR
<< " hasPix: " << m.hasPix << " hasPix: " << m.hasPix
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment