ATLAS Offline Software
SecVertexTruthMatchAlg.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef TRACKINGANALYSISALGORITHMS_SECVERTEXTRUTHMATCHALG_H
6 #define TRACKINGANALYSISALGORITHMS_SECVERTEXTRUTHMATCHALG_H
7 
8 // Gaudi/Athena include(s):
10 #include "AsgTools/ToolHandle.h"
11 
12 // SG includes
16 
17 // Local include(s):
19 
20 // Asg includes
24 
25 namespace CP {
26 
32 
33  public:
35  SecVertexTruthMatchAlg( const std::string& name, ISvcLocator* svcLoc );
36  virtual StatusCode initialize() override;
37  virtual StatusCode execute() override;
38 
39  private:
40  // Input (reco) Secondary Vertices
41  SG::ReadHandleKey<xAOD::VertexContainer> m_secVtxContainerKey{this, "SecondaryVertexContainer", "VrtSecInclusive_SecondaryVertices",
42  "Secondary vertex container"};
43  // Input Truth Vertices
44  SG::ReadHandleKey<xAOD::TruthVertexContainer> m_truthVtxContainerKey{this, "TruthVertexContainer", "TruthVertices",
45  "Truth vertex container"};
46  // Input Tracks
47  SG::ReadHandleKey<xAOD::TrackParticleContainer> m_trackParticleContainerKey{this, "TrackParticleContainer", "InDetTrackParticles",
48  "Track container"};
49 
50  Gaudi::Property<std::vector<int>> m_targetPDGIDs{this, "TargetPDGIDs", {}, "List of PDGIDs to select for matching"};
51 
52  Gaudi::Property<bool> m_writeHistograms{this, "WriteHistograms", true, "Write histograms"};
53 
54  ToolHandle<IInDetSecVtxTruthMatchTool> m_matchTool{this, "MatchTool", "InDetSecVtxTruthMatchTool"};
55 
56  void fillRecoHistograms(const xAOD::Vertex* secVtx, const std::string& matchType);
57  void fillTruthHistograms(const xAOD::TruthVertex* truthVtx, const std::string& truthType);
58 
59  };
60 } // namespace CP
61 #endif
PropertyWrapper.h
TruthVertexContainer.h
IInDetSecVtxTruthMatchTool.h
SG::ReadHandleKey
Property holding a SG store/key/clid from which a ReadHandle is made.
Definition: StoreGate/StoreGate/ReadHandleKey.h:39
CP
Select isolated Photons, Electrons and Muons.
Definition: Control/xAODRootAccess/xAODRootAccess/TEvent.h:48
IDTPM::truthType
int truthType(const U &p)
Definition: TrackParametersHelper.h:274
CP::SecVertexTruthMatchAlg::m_matchTool
ToolHandle< IInDetSecVtxTruthMatchTool > m_matchTool
Definition: SecVertexTruthMatchAlg.h:54
AnaAlgorithm.h
CP::SecVertexTruthMatchAlg::fillTruthHistograms
void fillTruthHistograms(const xAOD::TruthVertex *truthVtx, const std::string &truthType)
Definition: SecVertexTruthMatchAlg.cxx:364
CP::SecVertexTruthMatchAlg::m_writeHistograms
Gaudi::Property< bool > m_writeHistograms
Definition: SecVertexTruthMatchAlg.h:52
EL::AnaAlgorithm
the (new) base class for EventLoop algorithms
Definition: AnaAlgorithm.h:73
CP::SecVertexTruthMatchAlg::initialize
virtual StatusCode initialize() override
Definition: SecVertexTruthMatchAlg.cxx:20
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.
CP::SecVertexTruthMatchAlg::m_secVtxContainerKey
SG::ReadHandleKey< xAOD::VertexContainer > m_secVtxContainerKey
Definition: SecVertexTruthMatchAlg.h:41
CP::SecVertexTruthMatchAlg::m_targetPDGIDs
Gaudi::Property< std::vector< int > > m_targetPDGIDs
Definition: SecVertexTruthMatchAlg.h:50
CP::SecVertexTruthMatchAlg::execute
virtual StatusCode execute() override
Definition: SecVertexTruthMatchAlg.cxx:121
xAOD::TruthVertex_v1
Class describing a truth vertex in the MC record.
Definition: TruthVertex_v1.h:37
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:228
ReadHandle.h
Handle class for reading from StoreGate.
CP::SecVertexTruthMatchAlg::fillRecoHistograms
void fillRecoHistograms(const xAOD::Vertex *secVtx, const std::string &matchType)
Definition: SecVertexTruthMatchAlg.cxx:217
CP::SecVertexTruthMatchAlg::SecVertexTruthMatchAlg
SecVertexTruthMatchAlg(const std::string &name, ISvcLocator *svcLoc)
Regular Algorithm constructor.
Definition: SecVertexTruthMatchAlg.cxx:17
VertexContainer.h
xAOD::Vertex_v1
Class describing a Vertex.
Definition: Vertex_v1.h:42
CP::SecVertexTruthMatchAlg
Algorithm to perform truth matching on secondary vertices.
Definition: SecVertexTruthMatchAlg.h:31
CP::SecVertexTruthMatchAlg::m_truthVtxContainerKey
SG::ReadHandleKey< xAOD::TruthVertexContainer > m_truthVtxContainerKey
Definition: SecVertexTruthMatchAlg.h:44
ToolHandle.h
CP::SecVertexTruthMatchAlg::m_trackParticleContainerKey
SG::ReadHandleKey< xAOD::TrackParticleContainer > m_trackParticleContainerKey
Definition: SecVertexTruthMatchAlg.h:47
TrackParticleContainer.h