14 return StatusCode::SUCCESS;
19 auto jet_seed = tau.
jet();
20 if (jet_seed ==
nullptr) {
22 return StatusCode::FAILURE;
27 if (!removedClustersHandle.
isValid() || !removedTracksHandle.
isValid()) {
29 "Could not retrieve HiveDataObj with key " <<
30 (!removedClustersHandle.
isValid() ? removedClustersHandle.
key() :
"") <<
31 (!removedTracksHandle.
isValid() ? removedTracksHandle.
key() :
"")
33 return StatusCode::FAILURE;
39 for (
auto removal_direction : *removed_tracks_cont) {
40 if (removal_direction->p4().DeltaR(jet_seed->p4()) <
m_checkingCone) {
41 return StatusCode::SUCCESS;
44 for (
auto removal_direction : *removed_clusters_cont) {
45 if (removal_direction->p4().DeltaR(jet_seed->p4()) <
m_checkingCone) {
46 return StatusCode::SUCCESS;
49 ATH_MSG_DEBUG(
"TauJet do not overlap with removal direction, skipping...");
50 return StatusCode::FAILURE;
#define ATH_CHECK
Evaluate an expression and check for errors.
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 execute(xAOD::TauJet &tau) const override
Execution of this tool.
TauEleOverlapChecker(const std::string &name)
Constructor.
TauJet_v3 TauJet
Definition of the current "tau version".
TrackParticleContainer_v1 TrackParticleContainer
Definition of the current "TrackParticle container version".
CaloClusterContainer_v1 CaloClusterContainer
Define the latest version of the calorimeter cluster container.