ATLAS Offline Software
Loading...
Searching...
No Matches
TauAODMuonRemovalTool.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2026 CERN for the benefit of the ATLAS collaboration
3*/
4
8
9#ifndef TAURECTOOLS_TAUAODMUONREMOVALTOOL_H
10#define TAURECTOOLS_TAUAODMUONREMOVALTOOL_H
11
13#include "xAODTau/TauJet.h"
19
21{
22 public:
24 TauAODMuonRemovalTool(const std::string& type);
25 virtual StatusCode initialize() override;
26
28 virtual StatusCode executeTool(xAOD::TauJet& tau,
29 const EventContext& ctx) const override;
30
31 private:
32 const std::map<std::string, uint> m_mapMuonIdWp = {{"Tight", 0}, {"Medium", 1}, {"Loose", 2}, {"VeryLoose",3}};
34 SG::ReadHandleKey<xAOD::MuonContainer> m_muonInputContainer{this, "Key_MuonInputContainer", "Muons", "input xAOD muons"};
35 //properties
36 Gaudi::Property<bool> m_doMuonTrkRm {this, "doMuonTrkRm", false, "Whether to remove the muon tracks from the tau candidate" };
37 Gaudi::Property<bool> m_doMuonClsRm {this, "doMuonClsRm", false, "Whether to remove the muon clusters from the tau candidate" };
38 Gaudi::Property<std::string> m_strMinMuonIdWp {this, "muonIDWP", "Medium", "minimum muon identification WP, [VeryLoose, Loose, Medium, Tight]" };
39 Gaudi::Property<double> m_lepRemovalConeSize{this, "lepRemovalConeSize", 0.6, "The maximum dR between the lepton and the tau" };
40 //helpers
41 std::vector<const xAOD::CaloCluster*> getOriginalTopoClusters (const xAOD::CaloCluster *cluster) const;
42 std::vector<std::pair<const xAOD::TrackParticle*, const xAOD::Muon*>> getMuonAndTrk(const xAOD::TauJet& tau, const xAOD::MuonContainer& muon_cont) const;
43 std::vector<std::pair<const xAOD::CaloCluster*, const xAOD::Muon*>> getMuonAndCls(const xAOD::TauJet& tau, const xAOD::MuonContainer& muon_cont) const;
44 template<typename Tlep, typename Tlinks> std::vector<Tlep> removeTrks(Tlinks& tau_trk_links, std::vector<std::pair<const xAOD::TrackParticle*, Tlep>>& removings) const;
45 template<typename Tlep, typename Tlinks> std::vector<Tlep> removeClss(Tlinks& tau_cls_links, std::vector<std::pair<const xAOD::CaloCluster*, Tlep>>& clusters_and_leps) const;
46};
47
48#endif// TAURECTOOLS_TAUAODMUONREMOVALTOOL_H
#define ASG_TOOL_CLASS2(CLASSNAME, INT1, INT2)
Property holding a SG store/key/clid from which a ReadHandle is made.
Handle class for reading from StoreGate.
unsigned int uint
The base class for all tau tools.
Property holding a SG store/key/clid from which a ReadHandle is made.
Gaudi::Property< std::string > m_strMinMuonIdWp
virtual StatusCode executeTool(xAOD::TauJet &tau, const EventContext &ctx) const override
Execute - called for each tau candidate.
std::vector< const xAOD::CaloCluster * > getOriginalTopoClusters(const xAOD::CaloCluster *cluster) const
SG::ReadHandleKey< xAOD::MuonContainer > m_muonInputContainer
std::vector< std::pair< const xAOD::TrackParticle *, const xAOD::Muon * > > getMuonAndTrk(const xAOD::TauJet &tau, const xAOD::MuonContainer &muon_cont) const
std::vector< Tlep > removeClss(Tlinks &tau_cls_links, std::vector< std::pair< const xAOD::CaloCluster *, Tlep > > &clusters_and_leps) const
TauAODMuonRemovalTool(const std::string &type)
const std::map< std::string, uint > m_mapMuonIdWp
std::vector< Tlep > removeTrks(Tlinks &tau_trk_links, std::vector< std::pair< const xAOD::TrackParticle *, Tlep > > &removings) const
Gaudi::Property< double > m_lepRemovalConeSize
Gaudi::Property< bool > m_doMuonClsRm
virtual StatusCode initialize() override
Tool initializer.
std::vector< std::pair< const xAOD::CaloCluster *, const xAOD::Muon * > > getMuonAndCls(const xAOD::TauJet &tau, const xAOD::MuonContainer &muon_cont) const
Gaudi::Property< bool > m_doMuonTrkRm
TauRecToolBase(const std::string &name)
virtual StatusCode executeTool(xAOD::TauJet &, const EventContext &) const override
Execute - called for each tau candidate.
CaloCluster_v1 CaloCluster
Define the latest version of the calorimeter cluster class.
TauJet_v3 TauJet
Definition of the current "tau version".
Definition TauJet.h:17
MuonContainer_v1 MuonContainer
Definition of the current "Muon container version".