ATLAS Offline Software
TauTruthTrackMatchingTool.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef TAUANALYSISTOOLS_TAUTRUTHTRACKMATCHINGTOOL_H
6 #define TAUANALYSISTOOLS_TAUTRUTHTRACKMATCHINGTOOL_H
7 
8 /*
9  author: Dirk Duschinger
10  mail: dirk.duschinger@cern.ch
11  documentation in: ../README.rst
12 */
13 
14 // Framework include(s):
15 #include "AsgTools/AsgTool.h"
16 #include "AsgTools/AnaToolHandle.h"
17 #include "CxxUtils/CachedValue.h"
18 
19 // Local include(s)
21 
23 #include "xAODTau/TauTrack.h"
24 
25 namespace TauAnalysisTools
26 {
28 {
29  UnclassifiedTrack = 0, // Track is unclassified
30  TauTrack = 1, // Track is from direct tau decay
31  ConversionTrack = 2, // Track is from conversion
32  UnderlyingEventTrack = 3, // Track is from underlying event
33  SecondaryTrack = 4, // Track is a secondary track
34  PileupTrack = 5, // Track is from pileup
35  FakeTrack = 6 // Track is a fake
36 };
37 
38 
41  , public asg::AsgTool
42 {
46 
47 public:
48 
49  TauTruthTrackMatchingTool( const std::string& name );
50 
51  virtual ~TauTruthTrackMatchingTool();
52 
53  virtual StatusCode initialize() override;
54 
55  // classify vector of tracks
56  virtual StatusCode classifyTracks(std::vector<const xAOD::TauTrack*>& vTracks) const override;
57 
58  // classify a single track
59  virtual StatusCode classifyTrack(const xAOD::TauTrack& xTrackParticle) const override;
60 
61 private:
62 
63  StatusCode classifyConversion(const xAOD::TauTrack& xTrackParticle, const xAOD::TruthParticle& xTruthParticle) const;
64  StatusCode checkTrackType(const xAOD::TauTrack& xTrackParticle) const;
65  StatusCode checkTrackIsTauInheritant(const xAOD::TauTrack& xTrackParticle) const;
66  bool checkTruthParent(const xAOD::TruthParticle& xTruthParticle, int& iDepth, std::string& sHistory) const;
67  const xAOD::TruthParticle* getTruthParticle(const xAOD::TauTrack& xTrackParticle) const;
68 
69 private:
71 
72 }; // class TauTruthTrackMatchingTool
73 
74 }
75 #endif // TAUANALYSISTOOLS_TAUTRUTHTRACKMATCHINGTOOL_H
76 
TauAnalysisTools::TauTruthTrackMatchingTool::m_bIsHadronicTrackAvailable
CxxUtils::CachedValue< bool > m_bIsHadronicTrackAvailable
Definition: TauTruthTrackMatchingTool.h:70
TauAnalysisTools
Definition: TruthCollectionMakerTau.h:16
asg::AsgTool
Base class for the dual-use tool implementation classes.
Definition: AsgTool.h:47
ITauTruthTrackMatchingTool.h
TauAnalysisTools::TauTruthTrackMatchingTool
Definition: TauTruthTrackMatchingTool.h:42
TauAnalysisTools::TauTruthTrackMatchingTool::checkTruthParent
bool checkTruthParent(const xAOD::TruthParticle &xTruthParticle, int &iDepth, std::string &sHistory) const
Definition: TauTruthTrackMatchingTool.cxx:202
TauAnalysisTools::TauTruthTrackMatchingTool::classifyConversion
StatusCode classifyConversion(const xAOD::TauTrack &xTrackParticle, const xAOD::TruthParticle &xTruthParticle) const
Definition: TauTruthTrackMatchingTool.cxx:108
TauAnalysisTools::TauTruthTrackMatchingTool::classifyTrack
virtual StatusCode classifyTrack(const xAOD::TauTrack &xTrackParticle) const override
Definition: TauTruthTrackMatchingTool.cxx:34
TauAnalysisTools::TauTruthTrackMatchingTool::initialize
virtual StatusCode initialize() override
Dummy implementation of the initialisation function.
Definition: TauTruthTrackMatchingTool.cxx:28
TauAnalysisTools::UnderlyingEventTrack
@ UnderlyingEventTrack
Definition: TauTruthTrackMatchingTool.h:32
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
xAOD::TruthParticle_v1
Class describing a truth particle in the MC record.
Definition: TruthParticle_v1.h:37
CxxUtils::CachedValue< bool >
TauAnalysisTools::UnclassifiedTrack
@ UnclassifiedTrack
Definition: TauTruthTrackMatchingTool.h:29
TauAnalysisTools::TauTruthTrackMatchingTool::classifyTracks
virtual StatusCode classifyTracks(std::vector< const xAOD::TauTrack * > &vTracks) const override
Definition: TauTruthTrackMatchingTool.cxx:57
TauAnalysisTools::TauTruthTrackMatchingTool::checkTrackIsTauInheritant
StatusCode checkTrackIsTauInheritant(const xAOD::TauTrack &xTrackParticle) const
Definition: TauTruthTrackMatchingTool.cxx:178
AnaToolHandle.h
CachedValue.h
Cached value with atomic update.
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:228
TauTrack.h
TauAnalysisTools::SecondaryTrack
@ SecondaryTrack
Definition: TauTruthTrackMatchingTool.h:33
TauAnalysisTools::PileupTrack
@ PileupTrack
Definition: TauTruthTrackMatchingTool.h:34
TauAnalysisTools::TauTruthTrackMatchingTool::checkTrackType
StatusCode checkTrackType(const xAOD::TauTrack &xTrackParticle) const
Definition: TauTruthTrackMatchingTool.cxx:69
TauAnalysisTools::FakeTrack
@ FakeTrack
Definition: TauTruthTrackMatchingTool.h:35
TauAnalysisTools::TrackType_t
TrackType_t
Definition: TauTruthTrackMatchingTool.h:28
xAOD::TauTrack_v1
Definition: TauTrack_v1.h:27
ASG_TOOL_CLASS
#define ASG_TOOL_CLASS(CLASSNAME, INT1)
Definition: AsgToolMacros.h:68
AsgTool.h
TruthParticle.h
TauAnalysisTools::TauTruthTrackMatchingTool::getTruthParticle
const xAOD::TruthParticle * getTruthParticle(const xAOD::TauTrack &xTrackParticle) const
Definition: TauTruthTrackMatchingTool.cxx:167
TauAnalysisTools::ConversionTrack
@ ConversionTrack
Definition: TauTruthTrackMatchingTool.h:31
TauAnalysisTools::TauTrack
@ TauTrack
Definition: TauTruthTrackMatchingTool.h:30
TauAnalysisTools::ITauTruthTrackMatchingTool
Definition: ITauTruthTrackMatchingTool.h:26