ATLAS Offline Software
Loading...
Searching...
No Matches
TruthClassDecoratorAlg.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 INDETPHYSVALMONITORING_TruthClassDecoratorAlg_H
6#define INDETPHYSVALMONITORING_TruthClassDecoratorAlg_H
12
13// STL includes
14#include <string>
17#include "GaudiKernel/ToolHandle.h"
18#include "GaudiKernel/EventContext.h"
24
25// class to decorate xAOD::TruthParticles with type and origin, required by validation
27public:
28 TruthClassDecoratorAlg(const std::string& name, ISvcLocator* pSvcLocator);
29 virtual ~TruthClassDecoratorAlg () {/*nop*/
30 };
31 virtual StatusCode initialize() override;
32 virtual StatusCode finalize() override;
33
34 virtual StatusCode execute(const EventContext &ctx) const override;
35
36private:
37 bool decorateTruth(const xAOD::TruthParticle& particle,
38 std::vector< SG::WriteDecorHandle<xAOD::TruthParticleContainer,int> > &int_decor) const;
39
40 PublicToolHandle<IMCTruthClassifier> m_truthClassifier
41 {this,"MCTruthClassifier","MCTruthClassifier/MCTruthClassifier",""};
42 PublicToolHandle<IAthSelectionTool> m_truthSelectionTool
43 {this,"TruthSelectionTool","",""};
44
47 {this, "TruthParticleContainerName", "TruthParticles", ""};
48
49 Gaudi::Property<std::string> m_prefix
50 {this, "Prefix", "", "Decoration prefix to avoid clashes."};
51
57 std::vector<SG::WriteDecorHandleKey<xAOD::TruthParticleContainer> > m_decor;
58};
59
60
61#endif
header file for interface of selection tools in this package
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.
Handle class for adding a decoration to an object.
An algorithm that can be simultaneously executed in multiple threads.
Property holding a SG store/key/clid from which a ReadHandle is made.
Handle class for adding a decoration to an object.
TruthClassDecoratorAlg(const std::string &name, ISvcLocator *pSvcLocator)
bool decorateTruth(const xAOD::TruthParticle &particle, std::vector< SG::WriteDecorHandle< xAOD::TruthParticleContainer, int > > &int_decor) const
virtual StatusCode finalize() override
PublicToolHandle< IMCTruthClassifier > m_truthClassifier
virtual StatusCode execute(const EventContext &ctx) const override
PublicToolHandle< IAthSelectionTool > m_truthSelectionTool
SG::ReadHandleKey< xAOD::TruthParticleContainer > m_truthParticleName
TruthParticle container's name needed to create decorators.
virtual StatusCode initialize() override
Gaudi::Property< std::string > m_prefix
std::vector< SG::WriteDecorHandleKey< xAOD::TruthParticleContainer > > m_decor
TruthParticle_v1 TruthParticle
Typedef to implementation.