31 return StatusCode::SUCCESS;
36 return StatusCode::SUCCESS;
45 return StatusCode::FAILURE;
48 std::vector< SG::WriteDecorHandle<xAOD::TruthParticleContainer,int> >
54 if (not
decorateTruth(*truth_particle, int_decor) )
return StatusCode::FAILURE;
59 if (not
decorateTruth(*truth_particle, int_decor) )
return StatusCode::FAILURE;
62 return StatusCode::SUCCESS;
72 int type =
static_cast<int>(truthClass.first);
73 int origin =
static_cast<int>(truthClass.second);
#define ATH_CHECK
Evaluate an expression and check for errors.
An algorithm that can be simultaneously executed in multiple threads.
virtual bool isValid() override final
Can the handle be successfully dereferenced?
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
void createDecoratorKeys(T_Parent &parent, const SG::ReadHandleKey< T_Cont > &container_key, const std::string &prefix, const std::vector< std::string > &decor_names, std::vector< SG::WriteDecorHandleKey< T_Cont > > &decor_out)
std::vector< SG::WriteDecorHandle< T_Cont, T > > createDecorators(const std::vector< SG::WriteDecorHandleKey< T_Cont > > &keys, const EventContext &ctx)
TruthParticle_v1 TruthParticle
Typedef to implementation.
implementation file for function of same name