ATLAS Offline Software
InDetVertexTruthMatchTool.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 InDetVertexTruthMatchTool_h
6 #define InDetVertexTruthMatchTool_h
7 
8 // Framework include(s):
9 #include "AsgTools/AsgTool.h"
10 
11 // EDM include(s):
15 
24  public asg::AsgTool {
25 
27 
28  public:
29 
30  InDetVertexTruthMatchTool( const std::string & name );
31 
32  virtual StatusCode initialize() override final;
33  virtual StatusCode finalize() override;
34 
35  //take const collection of vertices, match them, and decorate with matching info
36  virtual StatusCode matchVertices( const xAOD::VertexContainer & vxContainer ) const override;
37 
38  private:
39 
41 
42  //required MC match probability to consider track a good match
44  //relative weight threshold to consider vertex matched
46  //pt cut to use on tracks
47  float m_trkPtCut;
48 
49  mutable std::atomic<unsigned int> m_nVtx {};
50  mutable std::atomic<unsigned int> m_nVtxWithBadLinks {};
51  mutable std::atomic<unsigned int> m_nBadLinks {};
52  mutable std::atomic<unsigned int> m_nLinks {};
53 
54  //private methods to check if particles are good to use
55  bool pass( const xAOD::TruthParticle & truthPart ) const;
56  bool pass( const xAOD::TrackParticle & trackPart ) const;
57 
58 };
59 
60 #endif
asg::AsgTool
Base class for the dual-use tool implementation classes.
Definition: AsgTool.h:47
VertexContainerFwd.h
InDetVertexTruthMatchTool::InDetVertexTruthMatchTool
InDetVertexTruthMatchTool(const std::string &name)
Definition: InDetVertexTruthMatchTool.cxx:13
TruthParticleFwd.h
InDetVertexTruthMatchTool::m_nBadLinks
std::atomic< unsigned int > m_nBadLinks
Definition: InDetVertexTruthMatchTool.h:51
InDetVertexTruthMatchTool::m_trkMatchProb
float m_trkMatchProb
Definition: InDetVertexTruthMatchTool.h:43
InDetVertexTruthMatchTool::matchVertices
virtual StatusCode matchVertices(const xAOD::VertexContainer &vxContainer) const override
Definition: InDetVertexTruthMatchTool.cxx:136
InDetVertexTruthMatchTool::finalize
virtual StatusCode finalize() override
Definition: InDetVertexTruthMatchTool.cxx:25
InDetVertexTruthMatchTool
Class for vertex truth matching.
Definition: InDetVertexTruthMatchTool.h:24
InDetVertexTruthMatchTool::m_trkPtCut
float m_trkPtCut
Definition: InDetVertexTruthMatchTool.h:47
InDetVertexTruthMatchTool::m_nLinks
std::atomic< unsigned int > m_nLinks
Definition: InDetVertexTruthMatchTool.h:52
InDetVertexTruthMatchTool::pass
bool pass(const xAOD::TruthParticle &truthPart) const
Definition: InDetVertexTruthMatchTool.cxx:435
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:41
InDetVertexTruthMatchTool::pass
bool pass(const xAOD::TrackParticle &trackPart) const
InDetVertexTruthMatchTool::initialize
virtual StatusCode initialize() override final
Dummy implementation of the initialisation function.
Definition: InDetVertexTruthMatchTool.cxx:19
InDetVertexTruthMatchTool::m_nVtx
std::atomic< unsigned int > m_nVtx
Definition: InDetVertexTruthMatchTool.h:49
DataVector
Derived DataVector<T>.
Definition: DataVector.h:581
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:192
IInDetVertexTruthMatchTool
Class for vertex truth matching.
Definition: IInDetVertexTruthMatchTool.h:21
InDetVertexTruthMatchTool::findTrackParticleContainer
static const xAOD::TrackParticleContainer * findTrackParticleContainer(const xAOD::VertexContainer &vxContainer)
Definition: InDetVertexTruthMatchTool.cxx:121
ASG_TOOL_CLASS
#define ASG_TOOL_CLASS(CLASSNAME, INT1)
Definition: AsgToolMacros.h:68
InDetVertexTruthMatchTool::m_vxMatchWeight
float m_vxMatchWeight
Definition: InDetVertexTruthMatchTool.h:45
InDetVertexTruthMatchTool::m_nVtxWithBadLinks
std::atomic< unsigned int > m_nVtxWithBadLinks
Definition: InDetVertexTruthMatchTool.h:50
xAOD::TrackParticle_v1
Class describing a TrackParticle.
Definition: TrackParticle_v1.h:43
IInDetVertexTruthMatchTool.h
AsgTool.h