ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
MuonSpectrometer
MuonTruthAlgs
src
TruthMuonMakerAlg.h
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2026 CERN for the benefit of the ATLAS collaboration
3
4
* @brief This algorithm retrieves the container of all the truth particles coming from the MC generator and copies
5
* the truth muons in a new container. Muons'properties include PDG, MC BARCODE, status, momentum components,
6
* charge and mass. The link to the production vertex, if present, is also attached.
7
* Then, truth muons are decorated with type and origin.
8
9
*/
10
11
#ifndef MUONTRUTHALGS_TruthMuonMakerAlg_H
12
#define MUONTRUTHALGS_TruthMuonMakerAlg_H
13
14
15
#include "
AthenaBaseComps/AthReentrantAlgorithm.h
"
16
#include "
MCTruthClassifier/IMCTruthClassifier.h
"
17
#include "
MuonIdHelpers/IMuonIdHelperSvc.h
"
18
#include "
StoreGate/ReadHandleKey.h
"
19
#include "
StoreGate/WriteHandleKey.h
"
20
#include "
xAODTruth/TruthParticleContainer.h
"
21
#include "
StoreGate/WriteDecorHandleKey.h
"
22
#include "
StoreGate/ReadHandleKeyArray.h
"
23
namespace
Muon
{
24
25
class
TruthMuonMakerAlg
:
public
AthReentrantAlgorithm
{
26
public
:
27
28
// Constructor with parameters:
29
using
AthReentrantAlgorithm::AthReentrantAlgorithm;
30
31
// Basic algorithm methods:
32
virtual
StatusCode
initialize
()
override
;
33
virtual
StatusCode
execute
(
const
EventContext& ctx)
const override
;
34
35
private
:
36
// ReadHandleKey for the truth particles'container and WriteHandleKeys for the truth muons'container and muon origin decorators
37
SG::ReadHandleKeyArray<xAOD::TruthParticleContainer>
m_truthRecordKeys
{
this
,
"InContainers"
, {
"TruthParticles"
}};
38
39
SG::WriteHandleKey<xAOD::TruthParticleContainer>
m_writeKey
{
this
,
"OutContainer"
,
"MuonTruthParticles"
};
44
SG::WriteDecorHandleKey<xAOD::TruthParticleContainer>
m_truthOriginKey
{
this
,
"truthOriginKey"
,
m_writeKey
,
"truthOrigin"
};
45
SG::WriteDecorHandleKey<xAOD::TruthParticleContainer>
m_truthTypeKey
{
this
,
"truthTypeKey"
,
m_writeKey
,
"truthType"
};
46
SG::WriteDecorHandleKey<xAOD::TruthParticleContainer>
m_truthClassificationKey
{
this
,
"truthClassificationKey"
,
m_writeKey
,
"truthClassification"
};
47
SG:: WriteDecorHandleKey<xAOD::TruthParticleContainer>
m_truthLinkKey
{
this
,
"truthLinkKey"
,
m_writeKey
,
"truthParticleLink"
};
48
Gaudi::Property<float>
m_pt
{
this
,
"ptCut"
, 1000.};
49
50
Gaudi::Property<std::set<int>>
m_pdgIds
{
this
,
"pdgIds"
, {13,}};
51
52
//IdHelper service handle
53
ServiceHandle<Muon::IMuonIdHelperSvc>
m_idHelperSvc
{
this
,
"MuonIdHelperSvc"
,
"Muon::MuonIdHelperSvc/MuonIdHelperSvc"
};
54
55
//TruthClassifier tool handle
56
ToolHandle<IMCTruthClassifier>
m_truthClassifier
{
this
,
"MCTruthClassifier"
,
"MCTruthClassifier/MCTruthClassifier"
};
57
58
};
59
60
}
// namespace Muon
61
#endif
AthReentrantAlgorithm.h
TruthParticleContainer.h
IMCTruthClassifier.h
IMuonIdHelperSvc.h
ReadHandleKeyArray.h
ReadHandleKey.h
Property holding a SG store/key/clid from which a ReadHandle is made.
WriteDecorHandleKey.h
Property holding a SG store/key/clid/attr name from which a WriteDecorHandle is made.
WriteHandleKey.h
Property holding a SG store/key/clid from which a WriteHandle is made.
AthReentrantAlgorithm
An algorithm that can be simultaneously executed in multiple threads.
Definition
AthReentrantAlgorithm.h:74
Muon::TruthMuonMakerAlg
Definition
TruthMuonMakerAlg.h:25
Muon::TruthMuonMakerAlg::m_truthOriginKey
SG::WriteDecorHandleKey< xAOD::TruthParticleContainer > m_truthOriginKey
FIXME WriteDecorHandle should not be used for additional dynamic variables applied by the same algori...
Definition
TruthMuonMakerAlg.h:44
Muon::TruthMuonMakerAlg::m_pt
Gaudi::Property< float > m_pt
Definition
TruthMuonMakerAlg.h:48
Muon::TruthMuonMakerAlg::m_truthClassificationKey
SG::WriteDecorHandleKey< xAOD::TruthParticleContainer > m_truthClassificationKey
Definition
TruthMuonMakerAlg.h:46
Muon::TruthMuonMakerAlg::m_idHelperSvc
ServiceHandle< Muon::IMuonIdHelperSvc > m_idHelperSvc
Definition
TruthMuonMakerAlg.h:53
Muon::TruthMuonMakerAlg::m_truthRecordKeys
SG::ReadHandleKeyArray< xAOD::TruthParticleContainer > m_truthRecordKeys
Definition
TruthMuonMakerAlg.h:37
Muon::TruthMuonMakerAlg::m_truthClassifier
ToolHandle< IMCTruthClassifier > m_truthClassifier
Definition
TruthMuonMakerAlg.h:56
Muon::TruthMuonMakerAlg::m_truthLinkKey
SG::WriteDecorHandleKey< xAOD::TruthParticleContainer > m_truthLinkKey
Definition
TruthMuonMakerAlg.h:47
Muon::TruthMuonMakerAlg::execute
virtual StatusCode execute(const EventContext &ctx) const override
Definition
TruthMuonMakerAlg.cxx:36
Muon::TruthMuonMakerAlg::m_pdgIds
Gaudi::Property< std::set< int > > m_pdgIds
Definition
TruthMuonMakerAlg.h:50
Muon::TruthMuonMakerAlg::initialize
virtual StatusCode initialize() override
Definition
TruthMuonMakerAlg.cxx:19
Muon::TruthMuonMakerAlg::m_writeKey
SG::WriteHandleKey< xAOD::TruthParticleContainer > m_writeKey
Definition
TruthMuonMakerAlg.h:39
Muon::TruthMuonMakerAlg::m_truthTypeKey
SG::WriteDecorHandleKey< xAOD::TruthParticleContainer > m_truthTypeKey
Definition
TruthMuonMakerAlg.h:45
SG::WriteDecorHandleKey
Property holding a SG store/key/clid/attr name from which a WriteDecorHandle is made.
Definition
StoreGate/StoreGate/WriteDecorHandleKey.h:90
SG::WriteHandleKey
Property holding a SG store/key/clid from which a WriteHandle is made.
Definition
StoreGate/StoreGate/WriteHandleKey.h:40
ServiceHandle
Definition
ClusterMakerTool.h:36
Muon
NRpcCablingAlg reads raw condition data and writes derived condition data to the condition store.
Definition
TrackSystemController.h:46
SG::ReadHandleKeyArray
HandleKeyArray< ReadHandle< T >, ReadHandleKey< T >, Gaudi::DataHandle::Reader > ReadHandleKeyArray
Definition
StoreGate/StoreGate/ReadHandleKeyArray.h:32
Generated on
for ATLAS Offline Software by
1.17.0