Skip to content
Snippets Groups Projects
Commit 463c0fe2 authored by Xiaozhong Huang's avatar Xiaozhong Huang
Browse files

METReconstruction: calculate dR directly

The MET reconstruction need to retrieve the clusters around 0.2 cone of
the tau candidate. Since the vertex of the tau candidate could be
different from PV0, a vertex correction is needed. The corrected
clusters are decorated onto the tau candidate, but is transient only.
This break the MET reconstruction from ESD/AOD. After recent
development of tau reconstruction, the correction is now much simple,
and we could do it directly in METReconstruction.

This should fix ATLASRECTS-5793.
parent 76a798aa
No related branches found
No related tags found
No related merge requests found
......@@ -12,7 +12,7 @@ include_directories(src)
atlas_add_component( METReconstruction
Root/*.cxx src/*.cxx src/components/*.cxx
INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
LINK_LIBRARIES ${ROOT_LIBRARIES} AsgTools FourMomUtils xAODCaloEvent xAODEgamma xAODJet xAODMissingET xAODMuon xAODPFlow xAODTracking xAODTruth GaudiKernel RecoToolInterfaces CaloEvent CaloConditions AthContainers AthenaBaseComps EventPrimitives xAODTau TruthUtils METRecoInterface PFlowUtilsLib StoreGateLib InDetTrackSelectionToolLib TrackVertexAssociationToolLib )
LINK_LIBRARIES ${ROOT_LIBRARIES} AsgTools FourMomUtils xAODCaloEvent xAODEgamma xAODJet xAODMissingET xAODMuon xAODPFlow xAODTracking xAODTruth GaudiKernel RecoToolInterfaces CaloEvent CaloConditions AthContainers AthenaBaseComps EventPrimitives xAODTau TruthUtils METRecoInterface PFlowUtilsLib StoreGateLib InDetTrackSelectionToolLib TrackVertexAssociationToolLib tauRecToolsLib)
# Install files from the package:
atlas_install_python_modules( python/*.py python/LegacyRunII/*.py POST_BUILD_CMD ${ATLAS_FLAKE8} )
......
......@@ -29,6 +29,8 @@
// DeltaR calculation
#include "FourMomUtils/xAODP4Helpers.h"
#include "tauRecTools/HelperFunctions.h"
#include "xAODCaloEvent/CaloVertexedTopoCluster.h"
#include "PFlowUtils/IWeightPFOTool.h"
namespace met {
......@@ -108,8 +110,26 @@ namespace met {
const met::METAssociator::ConstitHolder& /*tcCont*/) const
{
const TauJet* tau = static_cast<const TauJet*>(obj);
tclist = xAOD::TauHelpers::clusters(*tau, 0.2);
TLorentzVector tauAxis = tauRecTools::getTauAxis(*tau);
const xAOD::Vertex* tauVertex = tauRecTools::getTauVertex(*tau);
auto clusterList = tau->clusters();
for (const xAOD::IParticle* particle : clusterList) {
const xAOD::CaloCluster* cluster = static_cast<const xAOD::CaloCluster*>(particle);
TLorentzVector clusterP4 = cluster->p4();
// Correct the four momentum to point at the tau vertex
if (tauVertex) {
xAOD::CaloVertexedTopoCluster vertexedCluster(*cluster, tauVertex->position());
clusterP4 = vertexedCluster.p4();
}
if (clusterP4.DeltaR(tauAxis) > 0.2) continue;
tclist.push_back(particle);
}
return StatusCode::SUCCESS;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment