Loading [MathJax]/extensions/tex2jax.js
ATLAS Offline Software
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
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 
9 #ifndef TAURECTOOLS_TAUAODMUONREMOVALTOOL_H
10 #define TAURECTOOLS_TAUAODMUONREMOVALTOOL_H
11 
13 #include "xAODTau/TauJet.h"
14 #include "xAODMuon/MuonContainer.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
TauAODMuonRemovalTool::getMuonAndCls
std::vector< std::pair< const xAOD::CaloCluster *, const xAOD::Muon * > > getMuonAndCls(const xAOD::TauJet &tau, const xAOD::MuonContainer &muon_cont) const
Definition: TauAODMuonRemovalTool.cxx:92
PropertyWrapper.h
TauAODMuonRemovalTool::TauAODMuonRemovalTool
TauAODMuonRemovalTool(const std::string &type)
Definition: TauAODMuonRemovalTool.cxx:7
TauAODMuonRemovalTool::m_muonInputContainer
SG::ReadHandleKey< xAOD::MuonContainer > m_muonInputContainer
Definition: TauAODMuonRemovalTool.h:30
TauAODMuonRemovalTool::m_doMuonTrkRm
Gaudi::Property< bool > m_doMuonTrkRm
Definition: TauAODMuonRemovalTool.h:32
ASG_TOOL_CLASS2
#define ASG_TOOL_CLASS2(CLASSNAME, INT1, INT2)
Definition: AsgToolMacros.h:77
TauAODMuonRemovalTool::getOriginalTopoClusters
std::vector< const xAOD::CaloCluster * > getOriginalTopoClusters(const xAOD::CaloCluster *cluster) const
Definition: TauAODMuonRemovalTool.cxx:64
TauAODMuonRemovalTool::m_muonWpUi
uint m_muonWpUi
Definition: TauAODMuonRemovalTool.h:29
TauRecToolBase.h
TauRecToolBase
The base class for all tau tools.
Definition: TauRecToolBase.h:21
TauAODMuonRemovalTool::m_doMuonClsRm
Gaudi::Property< bool > m_doMuonClsRm
Definition: TauAODMuonRemovalTool.h:33
TauAODMuonRemovalTool::removeClss
std::vector< Tlep > removeClss(Tlinks &tau_cls_links, std::vector< std::pair< const xAOD::CaloCluster *, Tlep >> &clusters_and_leps) const
Definition: TauAODMuonRemovalTool.cxx:139
TauAODMuonRemovalTool::m_strMinMuonIdWp
Gaudi::Property< std::string > m_strMinMuonIdWp
Definition: TauAODMuonRemovalTool.h:34
SG::ReadHandleKey
Property holding a SG store/key/clid from which a ReadHandle is made.
Definition: StoreGate/StoreGate/ReadHandleKey.h:39
TauAODMuonRemovalTool::initialize
virtual StatusCode initialize() override
Tool initializer.
Definition: TauAODMuonRemovalTool.cxx:11
TauAODMuonRemovalTool::execute
virtual StatusCode execute(xAOD::TauJet &) const override
Execute - called for each tau candidate.
Definition: TauAODMuonRemovalTool.cxx:17
uint
unsigned int uint
Definition: LArOFPhaseFill.cxx:20
xAOD::CaloCluster_v1
Description of a calorimeter cluster.
Definition: CaloCluster_v1.h:59
ElectronContainer.h
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
ReadHandleKey.h
Property holding a SG store/key/clid from which a ReadHandle is made.
xAOD::TauJet_v3
Class describing a tau jet.
Definition: TauJet_v3.h:41
TauAODMuonRemovalTool::getMuonAndTrk
std::vector< std::pair< const xAOD::TrackParticle *, const xAOD::Muon * > > getMuonAndTrk(const xAOD::TauJet &tau, const xAOD::MuonContainer &muon_cont) const
Definition: TauAODMuonRemovalTool.cxx:79
DataVector
Derived DataVector<T>.
Definition: DataVector.h:794
ReadHandle.h
Handle class for reading from StoreGate.
ITauToolBase
The base class for all tau tools.
Definition: ITauToolBase.h:30
MuonContainer.h
TauAODMuonRemovalTool
the tool meant to run at AOD level, to remove the muon found inside the TauJet.
Definition: TauAODMuonRemovalTool.h:21
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
TauJet.h
TauAODMuonRemovalTool::removeTrks
std::vector< Tlep > removeTrks(Tlinks &tau_trk_links, std::vector< std::pair< const xAOD::TrackParticle *, Tlep >> &removings) const
Definition: TauAODMuonRemovalTool.cxx:115
TauAODMuonRemovalTool::m_lepRemovalConeSize
Gaudi::Property< double > m_lepRemovalConeSize
Definition: TauAODMuonRemovalTool.h:35
TauAODMuonRemovalTool::m_mapMuonIdWp
const std::map< std::string, uint > m_mapMuonIdWp
Definition: TauAODMuonRemovalTool.h:28