Skip to content
Snippets Groups Projects
Commit e5557a15 authored by Edward Moyse's avatar Edward Moyse
Browse files

Merge branch 'MET' into 'master'

METReconstruction: calculate dR directly

Closes ATLASRECTS-5793

See merge request atlas/athena!38909
parents 8246251f 463c0fe2
No related branches found
No related tags found
No related merge requests found
...@@ -12,7 +12,7 @@ include_directories(src) ...@@ -12,7 +12,7 @@ include_directories(src)
atlas_add_component( METReconstruction atlas_add_component( METReconstruction
Root/*.cxx src/*.cxx src/components/*.cxx Root/*.cxx src/*.cxx src/components/*.cxx
INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} 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: # Install files from the package:
atlas_install_python_modules( python/*.py python/LegacyRunII/*.py POST_BUILD_CMD ${ATLAS_FLAKE8} ) atlas_install_python_modules( python/*.py python/LegacyRunII/*.py POST_BUILD_CMD ${ATLAS_FLAKE8} )
......
...@@ -29,6 +29,8 @@ ...@@ -29,6 +29,8 @@
// DeltaR calculation // DeltaR calculation
#include "FourMomUtils/xAODP4Helpers.h" #include "FourMomUtils/xAODP4Helpers.h"
#include "tauRecTools/HelperFunctions.h"
#include "xAODCaloEvent/CaloVertexedTopoCluster.h"
#include "PFlowUtils/IWeightPFOTool.h" #include "PFlowUtils/IWeightPFOTool.h"
namespace met { namespace met {
...@@ -108,8 +110,26 @@ namespace met { ...@@ -108,8 +110,26 @@ namespace met {
const met::METAssociator::ConstitHolder& /*tcCont*/) const const met::METAssociator::ConstitHolder& /*tcCont*/) const
{ {
const TauJet* tau = static_cast<const TauJet*>(obj); 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; 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