Loading [MathJax]/extensions/tex2jax.js
ATLAS Offline Software
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
MuonTruthClassificationAlg.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 receives 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 #pragma once
12 
13 #include <string>
14 
22 
23 namespace 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 
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
Muon::MuonTruthClassificationAlg
Definition: MuonTruthClassificationAlg.h:25
ReadHandleKey.h
Property holding a SG store/key/clid from which a ReadHandle is made.
SG::WriteDecorHandleKey< xAOD::TruthParticleContainer >
Muon::MuonTruthClassificationAlg::m_pt
Gaudi::Property< float > m_pt
Definition: MuonTruthClassificationAlg.h:42
TruthParticleContainer.h
Muon::MuonTruthClassificationAlg::m_truthRecordKey
SG::ReadHandleKey< xAOD::TruthParticleContainer > m_truthRecordKey
Definition: MuonTruthClassificationAlg.h:37
SG::ReadHandleKey< xAOD::TruthParticleContainer >
Muon
NRpcCablingAlg reads raw condition data and writes derived condition data to the condition store.
Definition: TrackSystemController.h:45
AthReentrantAlgorithm
An algorithm that can be simultaneously executed in multiple threads.
Definition: AthReentrantAlgorithm.h:74
Muon::MuonTruthClassificationAlg::m_truthOriginKey
SG::WriteDecorHandleKey< xAOD::TruthParticleContainer > m_truthOriginKey
Definition: MuonTruthClassificationAlg.h:39
Muon::MuonTruthClassificationAlg::m_truthClassifier
ToolHandle< IMCTruthClassifier > m_truthClassifier
Definition: MuonTruthClassificationAlg.h:50
Muon::MuonTruthClassificationAlg::execute
virtual StatusCode execute(const EventContext &ctx) const override
Definition: MuonTruthClassificationAlg.cxx:25
IMCTruthClassifier.h
SG::WriteHandleKey< xAOD::TruthParticleContainer >
WriteDecorHandleKey.h
Property holding a SG store/key/clid/attr name from which a WriteDecorHandle is made.
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
AthReentrantAlgorithm.h
WriteHandleKey.h
Property holding a SG store/key/clid from which a WriteHandle is made.
Muon::MuonTruthClassificationAlg::m_outTruthMuonKey
SG::WriteHandleKey< xAOD::TruthParticleContainer > m_outTruthMuonKey
Definition: MuonTruthClassificationAlg.h:38
Muon::MuonTruthClassificationAlg::m_idHelperSvc
ServiceHandle< Muon::IMuonIdHelperSvc > m_idHelperSvc
Definition: MuonTruthClassificationAlg.h:47
Muon::MuonTruthClassificationAlg::m_pdgIds
Gaudi::Property< std::set< int > > m_pdgIds
Definition: MuonTruthClassificationAlg.h:44
Muon::MuonTruthClassificationAlg::initialize
virtual StatusCode initialize() override
Definition: MuonTruthClassificationAlg.cxx:14
Muon::MuonTruthClassificationAlg::m_truthTypeKey
SG::WriteDecorHandleKey< xAOD::TruthParticleContainer > m_truthTypeKey
Definition: MuonTruthClassificationAlg.h:40
IMuonIdHelperSvc.h
ServiceHandle< Muon::IMuonIdHelperSvc >