ATLAS Offline Software
Loading...
Searching...
No Matches
SecVertexTruthMatchAlg.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2026 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#include <string>
26#include <unordered_map>
27#include <vector>
28
29class TH1;
30
31namespace CP {
32
38
39 public:
41 SecVertexTruthMatchAlg( const std::string& name, ISvcLocator* svcLoc );
42 virtual StatusCode initialize() override;
43 virtual StatusCode execute(const EventContext& ctx) override;
44
45 private:
46 // Input (reco) Secondary Vertices
47 SG::ReadHandleKey<xAOD::VertexContainer> m_secVtxContainerKey{this, "SecondaryVertexContainer", "VrtSecInclusive_SecondaryVertices",
48 "Secondary vertex container"};
49 // Input Truth Vertices
50 SG::ReadHandleKey<xAOD::TruthVertexContainer> m_truthVtxContainerKey{this, "TruthVertexContainer", "TruthVertices",
51 "Truth vertex container"};
52 // Input Tracks
53 SG::ReadHandleKey<xAOD::TrackParticleContainer> m_trackParticleContainerKey{this, "TrackParticleContainer", "InDetTrackParticles",
54 "Track container"};
55
56 Gaudi::Property<std::vector<int>> m_targetPDGIDs{this, "TargetPDGIDs", {}, "List of PDGIDs to select for matching"};
57
58 Gaudi::Property<bool> m_writeHistograms{this, "WriteHistograms", true, "Write histograms"};
59
60 ToolHandle<IInDetSecVtxTruthMatchTool> m_matchTool{this, "MatchTool", "InDetSecVtxTruthMatchTool"};
61 Gaudi::Property<bool> m_doMuSA{this, "doMuSA", false, "MuSA mode for wider histogram ranges"};
62 Gaudi::Property<bool> m_doSMOrigin{this, "doSMOrigin", false, "Enable SM origin categorization"};
63
66 TH1* x{}; TH1* y{}; TH1* z{}; TH1* Lxy{}; TH1* pT{}; TH1* eta{}; TH1* phi{};
67 TH1* mass{}; TH1* mu{}; TH1* chi2{}; TH1* dir{}; TH1* charge{}; TH1* H{}; TH1* HT{};
68 TH1* minOpAng{}; TH1* maxOpAng{}; TH1* maxdR{}; TH1* mind0{}; TH1* maxd0{}; TH1* ntrk{};
69 TH1* Trk_qOverP{}; TH1* Trk_theta{}; TH1* Trk_E{}; TH1* Trk_M{}; TH1* Trk_Pt{};
70 TH1* Trk_Px{}; TH1* Trk_Py{}; TH1* Trk_Pz{}; TH1* Trk_Eta{}; TH1* Trk_Phi{};
71 TH1* Trk_D0{}; TH1* Trk_Z0{}; TH1* Trk_errD0{}; TH1* Trk_errZ0{}; TH1* Trk_Chi2{};
72 TH1* Trk_nDoF{}; TH1* Trk_charge{};
73 // truth matching, only booked for matched categories (nullptr otherwise)
76 };
77 std::unordered_map<std::string, RecoVertexHists> m_recoHists;
78
79 void fillRecoHistograms(const xAOD::Vertex* secVtx, const std::vector<const RecoVertexHists*>& categories);
80 void fillTruthHistograms(const xAOD::TruthVertex* truthVtx, const std::string& truthType);
81 };
82} // namespace CP
83#endif
Property holding a SG store/key/clid from which a ReadHandle is made.
Handle class for reading from StoreGate.
#define y
#define z
Gaudi::Property< bool > m_doMuSA
Gaudi::Property< bool > m_writeHistograms
Gaudi::Property< std::vector< int > > m_targetPDGIDs
Gaudi::Property< bool > m_doSMOrigin
virtual StatusCode initialize() override
SG::ReadHandleKey< xAOD::TrackParticleContainer > m_trackParticleContainerKey
SG::ReadHandleKey< xAOD::VertexContainer > m_secVtxContainerKey
ToolHandle< IInDetSecVtxTruthMatchTool > m_matchTool
SecVertexTruthMatchAlg(const std::string &name, ISvcLocator *svcLoc)
Regular Algorithm constructor.
void fillTruthHistograms(const xAOD::TruthVertex *truthVtx, const std::string &truthType)
SG::ReadHandleKey< xAOD::TruthVertexContainer > m_truthVtxContainerKey
std::unordered_map< std::string, RecoVertexHists > m_recoHists
void fillRecoHistograms(const xAOD::Vertex *secVtx, const std::vector< const RecoVertexHists * > &categories)
the (new) base class for EventLoop algorithms
virtual::StatusCode execute()
execute this algorithm
Property holding a SG store/key/clid from which a ReadHandle is made.
double chi2(TH1 *h0, TH1 *h1)
Select isolated Photons, Electrons and Muons.
TruthVertex_v1 TruthVertex
Typedef to implementation.
Definition TruthVertex.h:15
Vertex_v1 Vertex
Define the latest version of the vertex class.
cached pointers to the histograms of one reco vertex category