ATLAS Offline Software
Loading...
Searching...
No Matches
TruthMuonMakerAlg.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2025 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
22
23namespace Muon {
24
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 decorator
37 SG::ReadHandleKey<xAOD::TruthParticleContainer> m_truthRecordKey{this, "TruthParticleContainerName", "TruthParticles"};
38 SG::WriteHandleKey<xAOD::TruthParticleContainer> m_outTruthMuonKey{this, "MuonTruthParticleContainerName","MuonTruthParticles"};
41 SG:: WriteDecorHandleKey<xAOD::TruthParticleContainer> m_truthLinkKey{this, "truthLinkKey", m_outTruthMuonKey, "truthParticleLink"};
42 Gaudi::Property<float> m_pt{this, "ptCut", 1000.};
43
44 Gaudi::Property<std::set<int>> m_pdgIds{this, "pdgIds", {13,}};
45
46 //IdHelper service handle
47 ServiceHandle<Muon::IMuonIdHelperSvc> m_idHelperSvc{this, "MuonIdHelperSvc", "Muon::MuonIdHelperSvc/MuonIdHelperSvc"};
48
49 //TruthClassifier tool handle
50 ToolHandle<IMCTruthClassifier> m_truthClassifier{this, "MCTruthClassifier", "MCTruthClassifier/MCTruthClassifier"};
51
52 };
53
54} // namespace Muon
55#endif
Property holding a SG store/key/clid from which a ReadHandle is made.
Property holding a SG store/key/clid/attr name from which a WriteDecorHandle is made.
Property holding a SG store/key/clid from which a WriteHandle is made.
An algorithm that can be simultaneously executed in multiple threads.
SG::WriteDecorHandleKey< xAOD::TruthParticleContainer > m_truthOriginKey
Gaudi::Property< float > m_pt
ServiceHandle< Muon::IMuonIdHelperSvc > m_idHelperSvc
ToolHandle< IMCTruthClassifier > m_truthClassifier
SG::WriteDecorHandleKey< xAOD::TruthParticleContainer > m_truthLinkKey
virtual StatusCode execute(const EventContext &ctx) const override
Gaudi::Property< std::set< int > > m_pdgIds
SG::WriteHandleKey< xAOD::TruthParticleContainer > m_outTruthMuonKey
virtual StatusCode initialize() override
SG::ReadHandleKey< xAOD::TruthParticleContainer > m_truthRecordKey
SG::WriteDecorHandleKey< xAOD::TruthParticleContainer > m_truthTypeKey
Property holding a SG store/key/clid from which a ReadHandle is made.
Property holding a SG store/key/clid/attr name from which a WriteDecorHandle is made.
Property holding a SG store/key/clid from which a WriteHandle is made.
NRpcCablingAlg reads raw condition data and writes derived condition data to the condition store.