ATLAS Offline Software
Loading...
Searching...
No Matches
TruthDecoratorAlg.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3*/
4
5#ifndef INDETTRACKPERFMON_TruthDECORATORALG_H
6#define INDETTRACKPERFMON_TruthDECORATORALG_H
7
15
19
22
23
25#include <string>
26#include <vector>
27
29#include "SafeDecorator.h"
30
31
32namespace IDTPM {
33
36
37 public:
38
39 TruthDecoratorAlg( const std::string& name, ISvcLocator* pSvcLocator );
40
41 virtual ~TruthDecoratorAlg() = default;
42
43 virtual StatusCode initialize() override;
44
45 virtual StatusCode execute( const EventContext& ctx ) const override;
46
47 private:
48
50 this, "TruthParticleContainerName", "TruthParticles", "Name of container of truth particles" };
51
52 StringProperty m_prefix { this, "Prefix", "Truth_", "Decoration prefix to avoid clashes" };
53
54 StatusCode decorateTruthParticle(
55 const xAOD::TruthParticle& truth,
57
58
64
65 const std::vector< std::string > m_decor_truth_names {
66 "truthType",
67 "truthOrigin"
68 };
69
71 int > > m_decor_truth{};
72
73
74 PublicToolHandle< IMCTruthClassifier > m_truthClassifier {
75 this, "MCTruthClassifier", "MCTruthClassifier/MCTruthClassifier", "Truth classification tool" };
76
77 };
78
79} // namespace IDTPM
80
81#endif // > ! INDETTRACKPERFMON_TruthDECORATORALG_H
header file for function of same name adapted from original IDPVM implementation
An algorithm that can be simultaneously executed in multiple threads.
virtual StatusCode initialize() override
TruthDecoratorAlg(const std::string &name, ISvcLocator *pSvcLocator)
Local includes.
virtual ~TruthDecoratorAlg()=default
std::vector< IDTPM::WriteKeyAccessorPair< xAOD::TruthParticleContainer, int > > m_decor_truth
StatusCode decorateTruthParticle(const xAOD::TruthParticle &truth, std::vector< IDTPM::OptionalDecoration< xAOD::TruthParticleContainer, int > > &truth_decor) const
PublicToolHandle< IMCTruthClassifier > m_truthClassifier
virtual StatusCode execute(const EventContext &ctx) const override
const std::vector< std::string > m_decor_truth_names
SG::ReadHandleKey< xAOD::TruthParticleContainer > m_truthParticlesName
Property holding a SG store/key/clid from which a ReadHandle is made.
Athena include(s).
std::pair< SG::WriteDecorHandle< ContainerType, VariableType >, bool > OptionalDecoration
std::pair< SG::WriteDecorHandleKey< ContainerType >, SG::AuxElement::ConstAccessor< VariableType > > WriteKeyAccessorPair
Useful declarations.
TruthParticle_v1 TruthParticle
Typedef to implementation.
TruthParticleContainer_v1 TruthParticleContainer
Declare the latest version of the truth particle container.