ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
MuonSpectrometer
MuonTruthAlgs
src
RecoToTruthAssociationAlg.h
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
#ifndef TRUTHPARTICLEALGS_RecoToTruthAssociationAlg_H
6
#define TRUTHPARTICLEALGS_RecoToTruthAssociationAlg_H
7
8
#include "
AthenaBaseComps/AthReentrantAlgorithm.h
"
9
#include "GaudiKernel/ServiceHandle.h"
10
#include "
MuonIdHelpers/IMuonIdHelperSvc.h
"
11
#include "
StoreGate/ReadDecorHandleKeyArray.h
"
12
#include "
StoreGate/WriteDecorHandleKey.h
"
13
#include "
xAODMuon/MuonContainer.h
"
14
#include "
xAODTruth/TruthParticleContainer.h
"
15
16
17
namespace
Muon
{
18
class
RecoToTruthAssociationAlg
:
public
AthReentrantAlgorithm
{
19
public
:
20
// Constructor with parameters:
21
using
AthReentrantAlgorithm::AthReentrantAlgorithm;
22
23
// Basic algorithm methods:
24
StatusCode
initialize
()
override
;
25
StatusCode
execute
(
const
EventContext& ctx)
const override
;
26
27
private
:
29
SG::ReadHandleKey<xAOD::TruthParticleContainer>
m_truthMuKey
{
30
this
,
"MuonTruthParticleContainerName"
,
"MuonTruthParticles"
};
31
33
SG::WriteDecorHandleKey<xAOD::TruthParticleContainer>
m_muonTruthRecoLink
{
34
this
,
"MuonTruthParticleRecoLink"
,
m_truthMuKey
,
""
,
35
"container name for muon truth particles; the full handle name, including the reco muon link auxdata, is set in initialize()"
};
36
37
SG::ReadHandleKey<xAOD::MuonContainer>
m_recoMuKey
{
38
this
,
"MuonContainerName"
,
"Muons"
,
39
"container name for reco muon particles; the full handle name, including the reco muon link auxdata, is set in initialize()"
};
40
42
SG::WriteDecorHandleKey<xAOD::MuonContainer>
m_muonTruthParticleLink
{
43
this
,
"MuonTruthParticleLink"
,
m_recoMuKey
,
"truthParticleLink"
,
44
"muon truth particle link auxdata name; name will be reset in initialize() based on m_muonName"
};
45
SG::WriteDecorHandleKey<xAOD::MuonContainer>
m_muonTruthParticleType
{
46
this
,
"MuonTruthParticleType"
,
m_recoMuKey
,
"truthType"
,
47
"muon truth type auxdata name; name will be reset in initialize() based on m_muonName"
};
48
SG::WriteDecorHandleKey<xAOD::MuonContainer>
m_muonTruthParticleOrigin
{
49
this
,
"MuonTruthParticleOrigin"
,
m_recoMuKey
,
"truthOrigin"
,
50
"muon truth origin auxdata name; name will be reset in initialize() based on m_muonName"
};
51
SG::WriteDecorHandleKey<xAOD::MuonContainer>
m_muonTruthParticleClassification
{
52
this
,
"MuonTruthParticleClassification"
,
m_recoMuKey
,
"truthClassification"
,
53
"muon truth classification auxdata name; name will be reset in initialize() based on m_muonName"
};
54
SG::WriteDecorHandleKey<xAOD::MuonContainer>
m_muonTruthParticleNPrecMatched
{
55
this
,
"MuonTruthParticleNPrecMatched"
,
m_recoMuKey
,
"nprecMatchedHitsPerChamberLayer"
,
56
"muon vector of number of precision matched hits per chamber layer auxdata name; name will be reset in initialize() based on "
57
"m_muonName"
};
58
SG::WriteDecorHandleKey<xAOD::MuonContainer>
m_muonTruthParticleNPhiMatched
{
59
this
,
"MuonTruthParticleNPhiMatched"
,
m_recoMuKey
,
"nphiMatchedHitsPerChamberLayer"
,
60
"muon vector of number of phi matched hits per chamber layer auxdata name; name will be reset in initialize() based on m_muonName"
};
61
SG::WriteDecorHandleKey<xAOD::MuonContainer>
m_muonTruthParticleNTrigEtaMatched
{
62
this
,
"MuonTruthParticleNTrigEtaMatched"
,
m_recoMuKey
,
"ntrigEtaMatchedHitsPerChamberLayer"
,
63
"muon vector of number of phi matched hits per chamber layer auxdata name; name will be reset in initialize() based on m_muonName"
};
64
65
66
SG::ReadDecorHandleKeyArray<xAOD::IParticleContainer>
m_inputDecorKey
{
67
this
,
"TrkTruthLinkKeys"
, {},
68
"Declare the decoration dependencies of this algorithm. Steer via TrackContainers property"
};
69
Gaudi::Property<std::vector<std::string>>
m_assocTrkContainers
{
this
,
"TrackContainers"
, {
"CombinedMuonTrackParticles"
,
70
"ExtrapolatedMuonTrackParticles"
,
71
"MSOnlyExtrapolatedMuonTrackParticles"
},
72
"Collection of track containers to be decorated before this alg can be scheduled. truthLink decoration exploited "
};
73
Gaudi::Property<std::string>
m_recoLink
{
this
,
"RecoLinkName"
,
"recoMuonLink"
,
"Decoration to the truth particle pointing to the muon"
};
74
Gaudi::Property<bool>
m_associateWithInDetTP
{
this
,
"AssociateWithInDetTP"
,
false
,
"force use of ID track particles for association"
};
75
76
ServiceHandle<Muon::IMuonIdHelperSvc>
m_idHelperSvc
{
this
,
"MuonIdHelperSvc"
,
"Muon::MuonIdHelperSvc/MuonIdHelperSvc"
};
77
78
void
count_chamber_layers
(
const
xAOD::IParticle
* truth_particle,
const
Trk::Track
* ptrk,
79
std::vector<unsigned int>& nprecHitsPerChamberLayer, std::vector<unsigned int>& nphiHitsPerChamberLayer,
80
std::vector<unsigned int>& ntrigEtaHitsPerChamberLayer)
const
;
81
void
clear_dummys
(
const
std::vector<unsigned long long>& identifiers, std::vector<unsigned int>&
vec
)
const
;
82
83
};
84
}
85
#endif
// TRUTHPARTICLEALGS_MUONTRUTHDECORATIONALG_H
AthReentrantAlgorithm.h
vec
std::vector< size_t > vec
Definition
CombinationsGeneratorTest.cxx:9
MuonContainer.h
TruthParticleContainer.h
IMuonIdHelperSvc.h
ReadDecorHandleKeyArray.h
WriteDecorHandleKey.h
Property holding a SG store/key/clid/attr name from which a WriteDecorHandle is made.
AthReentrantAlgorithm
An algorithm that can be simultaneously executed in multiple threads.
Definition
AthReentrantAlgorithm.h:74
Muon::RecoToTruthAssociationAlg
Definition
RecoToTruthAssociationAlg.h:18
Muon::RecoToTruthAssociationAlg::m_recoMuKey
SG::ReadHandleKey< xAOD::MuonContainer > m_recoMuKey
Definition
RecoToTruthAssociationAlg.h:37
Muon::RecoToTruthAssociationAlg::m_inputDecorKey
SG::ReadDecorHandleKeyArray< xAOD::IParticleContainer > m_inputDecorKey
Definition
RecoToTruthAssociationAlg.h:66
Muon::RecoToTruthAssociationAlg::m_muonTruthParticleOrigin
SG::WriteDecorHandleKey< xAOD::MuonContainer > m_muonTruthParticleOrigin
Definition
RecoToTruthAssociationAlg.h:48
Muon::RecoToTruthAssociationAlg::m_muonTruthParticleNPhiMatched
SG::WriteDecorHandleKey< xAOD::MuonContainer > m_muonTruthParticleNPhiMatched
Definition
RecoToTruthAssociationAlg.h:58
Muon::RecoToTruthAssociationAlg::m_associateWithInDetTP
Gaudi::Property< bool > m_associateWithInDetTP
Definition
RecoToTruthAssociationAlg.h:74
Muon::RecoToTruthAssociationAlg::initialize
StatusCode initialize() override
Definition
RecoToTruthAssociationAlg.cxx:48
Muon::RecoToTruthAssociationAlg::m_muonTruthRecoLink
SG::WriteDecorHandleKey< xAOD::TruthParticleContainer > m_muonTruthRecoLink
Decorations for the filtered muon truth particles.
Definition
RecoToTruthAssociationAlg.h:33
Muon::RecoToTruthAssociationAlg::m_assocTrkContainers
Gaudi::Property< std::vector< std::string > > m_assocTrkContainers
Definition
RecoToTruthAssociationAlg.h:69
Muon::RecoToTruthAssociationAlg::m_muonTruthParticleClassification
SG::WriteDecorHandleKey< xAOD::MuonContainer > m_muonTruthParticleClassification
Definition
RecoToTruthAssociationAlg.h:51
Muon::RecoToTruthAssociationAlg::m_muonTruthParticleType
SG::WriteDecorHandleKey< xAOD::MuonContainer > m_muonTruthParticleType
Definition
RecoToTruthAssociationAlg.h:45
Muon::RecoToTruthAssociationAlg::m_muonTruthParticleLink
SG::WriteDecorHandleKey< xAOD::MuonContainer > m_muonTruthParticleLink
Decorations for the reconstructed muon particles.
Definition
RecoToTruthAssociationAlg.h:42
Muon::RecoToTruthAssociationAlg::m_muonTruthParticleNTrigEtaMatched
SG::WriteDecorHandleKey< xAOD::MuonContainer > m_muonTruthParticleNTrigEtaMatched
Definition
RecoToTruthAssociationAlg.h:61
Muon::RecoToTruthAssociationAlg::count_chamber_layers
void count_chamber_layers(const xAOD::IParticle *truth_particle, const Trk::Track *ptrk, std::vector< unsigned int > &nprecHitsPerChamberLayer, std::vector< unsigned int > &nphiHitsPerChamberLayer, std::vector< unsigned int > &ntrigEtaHitsPerChamberLayer) const
Definition
RecoToTruthAssociationAlg.cxx:266
Muon::RecoToTruthAssociationAlg::clear_dummys
void clear_dummys(const std::vector< unsigned long long > &identifiers, std::vector< unsigned int > &vec) const
Definition
RecoToTruthAssociationAlg.cxx:366
Muon::RecoToTruthAssociationAlg::m_idHelperSvc
ServiceHandle< Muon::IMuonIdHelperSvc > m_idHelperSvc
Definition
RecoToTruthAssociationAlg.h:76
Muon::RecoToTruthAssociationAlg::m_recoLink
Gaudi::Property< std::string > m_recoLink
Definition
RecoToTruthAssociationAlg.h:73
Muon::RecoToTruthAssociationAlg::m_truthMuKey
SG::ReadHandleKey< xAOD::TruthParticleContainer > m_truthMuKey
Key to the filtered muon truth particles.
Definition
RecoToTruthAssociationAlg.h:29
Muon::RecoToTruthAssociationAlg::execute
StatusCode execute(const EventContext &ctx) const override
Definition
RecoToTruthAssociationAlg.cxx:91
Muon::RecoToTruthAssociationAlg::m_muonTruthParticleNPrecMatched
SG::WriteDecorHandleKey< xAOD::MuonContainer > m_muonTruthParticleNPrecMatched
Definition
RecoToTruthAssociationAlg.h:54
SG::ReadHandleKey
Property holding a SG store/key/clid from which a ReadHandle is made.
Definition
StoreGate/StoreGate/ReadHandleKey.h:40
SG::WriteDecorHandleKey
Property holding a SG store/key/clid/attr name from which a WriteDecorHandle is made.
Definition
StoreGate/StoreGate/WriteDecorHandleKey.h:90
ServiceHandle
Definition
ClusterMakerTool.h:36
Trk::Track
The ATLAS Track class.
Definition
Tracking/TrkEvent/TrkTrack/TrkTrack/Track.h:73
xAOD::IParticle
Class providing the definition of the 4-vector interface.
Definition
Event/xAOD/xAODBase/xAODBase/IParticle.h:41
Muon
NRpcCablingAlg reads raw condition data and writes derived condition data to the condition store.
Definition
TrackSystemController.h:46
SG::ReadDecorHandleKeyArray
DecorHandleKeyArray< ReadDecorHandle< T, S >, ReadDecorHandleKey< T >, Gaudi::DataHandle::Reader > ReadDecorHandleKeyArray
Definition
StoreGate/StoreGate/ReadDecorHandleKeyArray.h:35
Generated on
for ATLAS Offline Software by
1.17.0