ATLAS Offline Software
Loading...
Searching...
No Matches
TauTruthMatchingTool.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3*/
4
5#ifndef TAUANALYSISTOOLS_TAUTRUTHMATCHINGTOOL_H
6#define TAUANALYSISTOOLS_TAUTRUTHMATCHINGTOOL_H
7
8/*
9 author: Dirk Duschinger
10 mail: dirk.duschinger@cern.ch
11 documentation in: ../README.rst
12*/
13
14// Local include(s):
19
20namespace TauAnalysisTools
21{
22
26{
31
32public: // Interface functions
33
34 TauTruthMatchingTool( const std::string& name );
35
36 virtual ~TauTruthMatchingTool() = default;
37
38 // initialize the tool
39 virtual StatusCode initialize() override final;
40
41 virtual std::unique_ptr<ITruthTausEvent> getEvent() const override final;
42
43 // get pointer to the truth matched particle, if no truth particle was found a null pointer is returned
44 virtual const xAOD::TruthParticle* getTruth(const xAOD::TauJet& xTau) override final;
46 ITruthTausEvent& truthTausEVent) const override final;
47 virtual std::vector<const xAOD::TruthParticle*> getTruth(const std::vector<const xAOD::TauJet*>& vTaus) override final;
48
49public: // Wrapper functions
50
51 // wrapper function to get truth tau visible TLorentzvector
52 virtual TLorentzVector getTruthTauP4Vis(const xAOD::TauJet& xTau) override final;
53 virtual TLorentzVector getTruthTauP4Vis(const xAOD::TruthParticle& xTruthTau) const override final;
54
55 // wrapper function to get truth tau invisible TLorentzvector
56 virtual TLorentzVector getTruthTauP4Invis(const xAOD::TauJet& xTau) override final;
57 virtual TLorentzVector getTruthTauP4Invis(const xAOD::TruthParticle& xTruthTau) const override final;
58
59 // get type of truth match particle (hadronic tau, leptonic tau, electron, muon, jet)
61
62 // wrapper function to count number of decay particles of given pdg id
63 virtual int getNTauDecayParticles(const xAOD::TauJet& xTau, int iPdgId, bool bCompareAbsoluteValues = false) override final;
64 virtual int getNTauDecayParticles(const xAOD::TruthParticle& xTruthTau, int iPdgId, bool bCompareAbsoluteValues = false) const override final;
65
66 // wrapper function to obtain truth verion of xAOD::TauJetParameters::DecayMode
67 virtual xAOD::TauJetParameters::DecayMode getDecayMode(const xAOD::TauJet& xTau) override final;
68 virtual xAOD::TauJetParameters::DecayMode getDecayMode(const xAOD::TruthParticle& xTruthTau) const override final;
69
75 virtual StatusCode lockDecorations (const xAOD::TauJetContainer& taus) const override final;
76
77private: // private helper functions
78
79 StatusCode findTruthTau(const xAOD::TauJet& xTau,
80 TruthTausEvent& truthTausEvent) const;
81 StatusCode checkTruthMatch (const xAOD::TauJet& xTau, const xAOD::TruthParticleContainer& xTauContainer, const TruthTausEvent& truthTausEvent) const;
82
83private: // steering variables
84
85 Gaudi::Property<double> m_dMaxDeltaR{this, "MaxDeltaR", 0.2};
86
89
90private: // private helper variables
91
96
97}; // class TauTruthMatchingTool
98
99}
100#endif // TAUANALYSISTOOLS_TAUTRUTHMATCHINGTOOL_H
#define ASG_TOOL_CLASS2(CLASSNAME, INT1, INT2)
Cached value with atomic update.
static Double_t taus
@ TauJet
Cached value with atomic update.
Definition CachedValue.h:55
Support class for PropertyMgr.
Definition Property.h:23
Helper class to provide constant type-safe access to aux data.
Declare the interface that the class provides.
virtual StatusCode lockDecorations(const xAOD::TauJetContainer &taus) const override final
Decorations produced by an algorithm need to be locked; otherwise, they will be ignored by deep copie...
virtual TLorentzVector getTruthTauP4Vis(const xAOD::TauJet &xTau) override final
StatusCode findTruthTau(const xAOD::TauJet &xTau, TruthTausEvent &truthTausEvent) const
CxxUtils::CachedValue< bool > m_bIsTruthParticleLinkAvailable
virtual std::unique_ptr< ITruthTausEvent > getEvent() const override final
virtual TauAnalysisTools::TruthMatchedParticleType getTruthParticleType(const xAOD::TauJet &xTau) override final
virtual StatusCode initialize() override final
virtual ASG_TOOL_CLASS2(TauTruthMatchingTool, TauAnalysisTools::IBuildTruthTaus, TauAnalysisTools::ITauTruthMatchingTool) public ~TauTruthMatchingTool()=default
Create a proper constructor for Athena.
virtual xAOD::TauJetParameters::DecayMode getDecayMode(const xAOD::TauJet &xTau) override final
virtual int getNTauDecayParticles(const xAOD::TauJet &xTau, int iPdgId, bool bCompareAbsoluteValues=false) override final
virtual TLorentzVector getTruthTauP4Invis(const xAOD::TauJet &xTau) override final
virtual const xAOD::TruthParticle * getTruth(const xAOD::TauJet &xTau) override final
CxxUtils::CachedValue< bool > m_bIsTruthMatchedAvailable
StatusCode checkTruthMatch(const xAOD::TauJet &xTau, const xAOD::TruthParticleContainer &xTauContainer, const TruthTausEvent &truthTausEvent) const
STL class.
=============================================================================
STL namespace.
ICaloAffectedTool is abstract interface for tools checking if 4 mom is in calo affected region.
#define private