ATLAS Offline Software
Loading...
Searching...
No Matches
TauAODMuonRemovalTool.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2024 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 virtual StatusCode execute(xAOD::TauJet&) const override;
27 private:
28 const std::map<std::string, uint> m_mapMuonIdWp = {{"Tight", 0}, {"Medium", 1}, {"Loose", 2}, {"VeryLoose",3}};
30 SG::ReadHandleKey<xAOD::MuonContainer> m_muonInputContainer{this, "Key_MuonInputContainer", "Muons", "input xAOD muons"};
31 //properties
32 Gaudi::Property<bool> m_doMuonTrkRm {this, "doMuonTrkRm", false, "Whether to remove the muon tracks from the tau candidate" };
33 Gaudi::Property<bool> m_doMuonClsRm {this, "doMuonClsRm", false, "Whether to remove the muon clusters from the tau candidate" };
34 Gaudi::Property<std::string> m_strMinMuonIdWp {this, "muonIDWP", "Medium", "minimum muon identification WP, [VeryLoose, Loose, Medium, Tight]" };
35 Gaudi::Property<double> m_lepRemovalConeSize{this, "lepRemovalConeSize", 0.6, "The maximum dR between the lepton and the tau" };
36 //helpers
37 std::vector<const xAOD::CaloCluster*> getOriginalTopoClusters (const xAOD::CaloCluster *cluster) const;
38 std::vector<std::pair<const xAOD::TrackParticle*, const xAOD::Muon*>> getMuonAndTrk(const xAOD::TauJet& tau, const xAOD::MuonContainer& muon_cont) const;
39 std::vector<std::pair<const xAOD::CaloCluster*, const xAOD::Muon*>> getMuonAndCls(const xAOD::TauJet& tau, const xAOD::MuonContainer& muon_cont) const;
40 template<typename Tlep, typename Tlinks> std::vector<Tlep> removeTrks(Tlinks& tau_trk_links, std::vector<std::pair<const xAOD::TrackParticle*, Tlep>>& removings) const;
41 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;
42};
43
44#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
std::vector< const xAOD::CaloCluster * > getOriginalTopoClusters(const xAOD::CaloCluster *cluster) const
virtual StatusCode execute(xAOD::TauJet &) const override
Execute - called for each tau candidate.
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)
CaloCluster_v1 CaloCluster
Define the latest version of the calorimeter cluster class.
TauJet_v3 TauJet
Definition of the current "tau version".
MuonContainer_v1 MuonContainer
Definition of the current "Muon container version".