ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
PhysicsAnalysis
Algorithms
TrackingAnalysisAlgorithms
TrackingAnalysisAlgorithms
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):
9
#include "
AnaAlgorithm/AnaAlgorithm.h
"
10
#include "
AsgTools/ToolHandle.h
"
11
12
// SG includes
13
#include "
xAODTracking/VertexContainer.h
"
14
#include "
xAODTracking/TrackParticleContainer.h
"
15
#include "
xAODTruth/TruthVertexContainer.h
"
16
17
// Local include(s):
18
#include "
InDetSecVtxTruthMatchTool/IInDetSecVtxTruthMatchTool.h
"
19
20
// Asg includes
21
#include <
AsgTools/PropertyWrapper.h
>
22
#include <
AsgDataHandles/ReadHandleKey.h
>
23
#include <
AsgDataHandles/ReadHandle.h
>
24
25
#include <string>
26
#include <unordered_map>
27
#include <vector>
28
29
class
TH1;
30
31
namespace
CP
{
32
37
class
SecVertexTruthMatchAlg
final :
public
EL::AnaAlgorithm
{
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
65
struct
RecoVertexHists
{
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)
74
TH1*
positionRes_R
{}; TH1*
positionRes_Z
{}; TH1*
matchScore_weight
{};
75
TH1*
matchScore_pt
{};
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
AnaAlgorithm.h
ReadHandleKey.h
Property holding a SG store/key/clid from which a ReadHandle is made.
ReadHandle.h
Handle class for reading from StoreGate.
TrackParticleContainer.h
IInDetSecVtxTruthMatchTool.h
PropertyWrapper.h
ToolHandle.h
TruthVertexContainer.h
y
#define y
z
#define z
VertexContainer.h
CP::SecVertexTruthMatchAlg::m_doMuSA
Gaudi::Property< bool > m_doMuSA
Definition
SecVertexTruthMatchAlg.h:61
CP::SecVertexTruthMatchAlg::m_writeHistograms
Gaudi::Property< bool > m_writeHistograms
Definition
SecVertexTruthMatchAlg.h:58
CP::SecVertexTruthMatchAlg::m_targetPDGIDs
Gaudi::Property< std::vector< int > > m_targetPDGIDs
Definition
SecVertexTruthMatchAlg.h:56
CP::SecVertexTruthMatchAlg::m_doSMOrigin
Gaudi::Property< bool > m_doSMOrigin
Definition
SecVertexTruthMatchAlg.h:62
CP::SecVertexTruthMatchAlg::initialize
virtual StatusCode initialize() override
Definition
SecVertexTruthMatchAlg.cxx:25
CP::SecVertexTruthMatchAlg::m_trackParticleContainerKey
SG::ReadHandleKey< xAOD::TrackParticleContainer > m_trackParticleContainerKey
Definition
SecVertexTruthMatchAlg.h:53
CP::SecVertexTruthMatchAlg::m_secVtxContainerKey
SG::ReadHandleKey< xAOD::VertexContainer > m_secVtxContainerKey
Definition
SecVertexTruthMatchAlg.h:47
CP::SecVertexTruthMatchAlg::m_matchTool
ToolHandle< IInDetSecVtxTruthMatchTool > m_matchTool
Definition
SecVertexTruthMatchAlg.h:60
CP::SecVertexTruthMatchAlg::SecVertexTruthMatchAlg
SecVertexTruthMatchAlg(const std::string &name, ISvcLocator *svcLoc)
Regular Algorithm constructor.
Definition
SecVertexTruthMatchAlg.cxx:22
CP::SecVertexTruthMatchAlg::fillTruthHistograms
void fillTruthHistograms(const xAOD::TruthVertex *truthVtx, const std::string &truthType)
Definition
SecVertexTruthMatchAlg.cxx:496
CP::SecVertexTruthMatchAlg::m_truthVtxContainerKey
SG::ReadHandleKey< xAOD::TruthVertexContainer > m_truthVtxContainerKey
Definition
SecVertexTruthMatchAlg.h:50
CP::SecVertexTruthMatchAlg::m_recoHists
std::unordered_map< std::string, RecoVertexHists > m_recoHists
Definition
SecVertexTruthMatchAlg.h:77
CP::SecVertexTruthMatchAlg::fillRecoHistograms
void fillRecoHistograms(const xAOD::Vertex *secVtx, const std::vector< const RecoVertexHists * > &categories)
Definition
SecVertexTruthMatchAlg.cxx:332
EL::AnaAlgorithm
the (new) base class for EventLoop algorithms
Definition
AnaAlgorithm.h:74
EL::AnaAlgorithm::execute
virtual::StatusCode execute()
execute this algorithm
Definition
AnaAlgorithm.cxx:315
SG::ReadHandleKey
Property holding a SG store/key/clid from which a ReadHandle is made.
Definition
StoreGate/StoreGate/ReadHandleKey.h:40
chi2
double chi2(TH1 *h0, TH1 *h1)
Definition
comparitor.cxx:790
CP
Select isolated Photons, Electrons and Muons.
Definition
Control/xAODRootAccess/xAODRootAccess/TEvent.h:27
xAOD::name
name
Definition
TriggerMenuJson_v1.cxx:29
xAOD::TruthVertex
TruthVertex_v1 TruthVertex
Typedef to implementation.
Definition
TruthVertex.h:15
xAOD::Vertex
Vertex_v1 Vertex
Define the latest version of the vertex class.
Definition
Event/xAOD/xAODTracking/xAODTracking/Vertex.h:16
CP::SecVertexTruthMatchAlg::RecoVertexHists
cached pointers to the histograms of one reco vertex category
Definition
SecVertexTruthMatchAlg.h:65
CP::SecVertexTruthMatchAlg::RecoVertexHists::ntrk
TH1 * ntrk
Definition
SecVertexTruthMatchAlg.h:68
CP::SecVertexTruthMatchAlg::RecoVertexHists::mind0
TH1 * mind0
Definition
SecVertexTruthMatchAlg.h:68
CP::SecVertexTruthMatchAlg::RecoVertexHists::matchScore_weight
TH1 * matchScore_weight
Definition
SecVertexTruthMatchAlg.h:74
CP::SecVertexTruthMatchAlg::RecoVertexHists::x
TH1 * x
Definition
SecVertexTruthMatchAlg.h:66
CP::SecVertexTruthMatchAlg::RecoVertexHists::Trk_Px
TH1 * Trk_Px
Definition
SecVertexTruthMatchAlg.h:70
CP::SecVertexTruthMatchAlg::RecoVertexHists::charge
TH1 * charge
Definition
SecVertexTruthMatchAlg.h:67
CP::SecVertexTruthMatchAlg::RecoVertexHists::Trk_Phi
TH1 * Trk_Phi
Definition
SecVertexTruthMatchAlg.h:70
CP::SecVertexTruthMatchAlg::RecoVertexHists::positionRes_Z
TH1 * positionRes_Z
Definition
SecVertexTruthMatchAlg.h:74
CP::SecVertexTruthMatchAlg::RecoVertexHists::positionRes_R
TH1 * positionRes_R
Definition
SecVertexTruthMatchAlg.h:74
CP::SecVertexTruthMatchAlg::RecoVertexHists::phi
TH1 * phi
Definition
SecVertexTruthMatchAlg.h:66
CP::SecVertexTruthMatchAlg::RecoVertexHists::Trk_Pt
TH1 * Trk_Pt
Definition
SecVertexTruthMatchAlg.h:69
CP::SecVertexTruthMatchAlg::RecoVertexHists::Trk_Py
TH1 * Trk_Py
Definition
SecVertexTruthMatchAlg.h:70
CP::SecVertexTruthMatchAlg::RecoVertexHists::Trk_nDoF
TH1 * Trk_nDoF
Definition
SecVertexTruthMatchAlg.h:72
CP::SecVertexTruthMatchAlg::RecoVertexHists::Trk_Chi2
TH1 * Trk_Chi2
Definition
SecVertexTruthMatchAlg.h:71
CP::SecVertexTruthMatchAlg::RecoVertexHists::Lxy
TH1 * Lxy
Definition
SecVertexTruthMatchAlg.h:66
CP::SecVertexTruthMatchAlg::RecoVertexHists::pT
TH1 * pT
Definition
SecVertexTruthMatchAlg.h:66
CP::SecVertexTruthMatchAlg::RecoVertexHists::maxdR
TH1 * maxdR
Definition
SecVertexTruthMatchAlg.h:68
CP::SecVertexTruthMatchAlg::RecoVertexHists::Trk_charge
TH1 * Trk_charge
Definition
SecVertexTruthMatchAlg.h:72
CP::SecVertexTruthMatchAlg::RecoVertexHists::maxOpAng
TH1 * maxOpAng
Definition
SecVertexTruthMatchAlg.h:68
CP::SecVertexTruthMatchAlg::RecoVertexHists::minOpAng
TH1 * minOpAng
Definition
SecVertexTruthMatchAlg.h:68
CP::SecVertexTruthMatchAlg::RecoVertexHists::Trk_errZ0
TH1 * Trk_errZ0
Definition
SecVertexTruthMatchAlg.h:71
CP::SecVertexTruthMatchAlg::RecoVertexHists::Trk_M
TH1 * Trk_M
Definition
SecVertexTruthMatchAlg.h:69
CP::SecVertexTruthMatchAlg::RecoVertexHists::Trk_D0
TH1 * Trk_D0
Definition
SecVertexTruthMatchAlg.h:71
CP::SecVertexTruthMatchAlg::RecoVertexHists::Trk_theta
TH1 * Trk_theta
Definition
SecVertexTruthMatchAlg.h:69
CP::SecVertexTruthMatchAlg::RecoVertexHists::dir
TH1 * dir
Definition
SecVertexTruthMatchAlg.h:67
CP::SecVertexTruthMatchAlg::RecoVertexHists::Trk_errD0
TH1 * Trk_errD0
Definition
SecVertexTruthMatchAlg.h:71
CP::SecVertexTruthMatchAlg::RecoVertexHists::Trk_Pz
TH1 * Trk_Pz
Definition
SecVertexTruthMatchAlg.h:70
CP::SecVertexTruthMatchAlg::RecoVertexHists::maxd0
TH1 * maxd0
Definition
SecVertexTruthMatchAlg.h:68
CP::SecVertexTruthMatchAlg::RecoVertexHists::eta
TH1 * eta
Definition
SecVertexTruthMatchAlg.h:66
CP::SecVertexTruthMatchAlg::RecoVertexHists::mass
TH1 * mass
Definition
SecVertexTruthMatchAlg.h:67
CP::SecVertexTruthMatchAlg::RecoVertexHists::HT
TH1 * HT
Definition
SecVertexTruthMatchAlg.h:67
CP::SecVertexTruthMatchAlg::RecoVertexHists::Trk_E
TH1 * Trk_E
Definition
SecVertexTruthMatchAlg.h:69
CP::SecVertexTruthMatchAlg::RecoVertexHists::Trk_Eta
TH1 * Trk_Eta
Definition
SecVertexTruthMatchAlg.h:70
CP::SecVertexTruthMatchAlg::RecoVertexHists::Trk_qOverP
TH1 * Trk_qOverP
Definition
SecVertexTruthMatchAlg.h:69
CP::SecVertexTruthMatchAlg::RecoVertexHists::mu
TH1 * mu
Definition
SecVertexTruthMatchAlg.h:67
CP::SecVertexTruthMatchAlg::RecoVertexHists::matchScore_pt
TH1 * matchScore_pt
Definition
SecVertexTruthMatchAlg.h:75
CP::SecVertexTruthMatchAlg::RecoVertexHists::Trk_Z0
TH1 * Trk_Z0
Definition
SecVertexTruthMatchAlg.h:71
CP::SecVertexTruthMatchAlg::RecoVertexHists::H
TH1 * H
Definition
SecVertexTruthMatchAlg.h:67
Generated on
for ATLAS Offline Software by
1.17.0