ATLAS Offline Software
Loading...
Searching...
No Matches
TauEleOverlapChecker.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2026 CERN for the benefit of the ATLAS collaboration
3*/
4
6
8 TauRecToolBase(name) {
9}
10
13 ATH_CHECK( m_removedTracksContainer.initialize() );
14 return StatusCode::SUCCESS;
15}
16
18 const EventContext& ctx) const {
19 // Checking if the seed jet is valid
20 auto jet_seed = tau.jet();
21 if (jet_seed == nullptr) {
22 ATH_MSG_ERROR("Tau jet link is invalid.");
23 return StatusCode::FAILURE;
24 }
25 // retrieve the input removed tracks and clusters containers
28 if (!removedClustersHandle.isValid() || !removedTracksHandle.isValid()) {
30 "Could not retrieve HiveDataObj with key " <<
31 (!removedClustersHandle.isValid() ? removedClustersHandle.key() : "") <<
32 (!removedTracksHandle.isValid() ? removedTracksHandle.key() : "")
33 );
34 return StatusCode::FAILURE;
35 }
36 const xAOD::CaloClusterContainer *removed_clusters_cont = removedClustersHandle.cptr();
37 const xAOD::TrackParticleContainer *removed_tracks_cont = removedTracksHandle.cptr();
38
39 for (const auto* removal_direction : *removed_tracks_cont) {
40 if (removal_direction->p4().DeltaR(jet_seed->p4()) < m_checkingCone) {
41 return StatusCode::SUCCESS;
42 }
43 }
44 for (const auto* removal_direction : *removed_clusters_cont) {
45 if (removal_direction->p4().DeltaR(jet_seed->p4()) < m_checkingCone) {
46 return StatusCode::SUCCESS;
47 }
48 }
49 ATH_MSG_DEBUG("TauJet do not overlap with removal direction, skipping...");
50 return StatusCode::FAILURE;
51}
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_DEBUG(x,...)
#define ATH_MSG_ERROR(x,...)
virtual bool isValid() override final
Can the handle be successfully dereferenced?
const_pointer_type cptr()
Dereference the pointer.
virtual const std::string & key() const override final
Return the StoreGate ID for the referenced object.
virtual StatusCode initialize() override
Initialization of the tool.
Gaudi::Property< double > m_checkingCone
SG::ReadHandleKey< xAOD::CaloClusterContainer > m_removedClustersContainer
SG::ReadHandleKey< xAOD::TrackParticleContainer > m_removedTracksContainer
virtual StatusCode executeTool(xAOD::TauJet &tau, const EventContext &ctx) const override
Execute - called for each tau candidate.
TauEleOverlapChecker(const std::string &name)
Constructor.
TauRecToolBase(const std::string &name)
TauJet_v3 TauJet
Definition of the current "tau version".
Definition TauJet.h:17
TrackParticleContainer_v1 TrackParticleContainer
Definition of the current "TrackParticle container version".
CaloClusterContainer_v1 CaloClusterContainer
Define the latest version of the calorimeter cluster container.