48 return StatusCode::FAILURE;
53 return StatusCode::FAILURE;
58 return StatusCode::FAILURE;
61 return StatusCode::SUCCESS;
76 if (!truthParticlesHandle.
isValid()) {
77 ATH_MSG_ERROR (
"Could not retrieve TruthParticleContainer " << truthParticlesHandle.
key());
78 return StatusCode::FAILURE;
84 if (!jetInputHandle.
isValid()) {
86 return StatusCode::FAILURE;
91 std::map<const xAOD::TruthParticle*, DerivationFramework::HadronOriginClassifier::HF_id> hadronMap =
m_HadronOriginClassifier_Tool->GetOriginMap();
94 std::map<const xAOD::Jet*, std::vector<xAOD::TruthParticleContainer::const_iterator>> particleMatch =
m_JetMatchingTool_Tool->matchHadronsToJets(xTruthParticleContainer,
JetCollection);
105 if (!eventInfoHandle.
isValid()) {
107 return StatusCode::FAILURE;
113 decorator_HFClassification(*
EventInfo) = hfclassif;
116 decorator_SimpleHFClassification(*
EventInfo) = simpleclassif;
126 jetIdDecorator(*
jet) = id;
129 return StatusCode::SUCCESS;
#define ATH_CHECK
Evaluate an expression and check for errors.
Handle class for reading from StoreGate.
Handle class for adding a decoration to an object.
virtual StatusCode initialize() override final
PublicToolHandle< DerivationFramework::ClassifyAndCalculateHFTool > m_HFClassification_tool
SG::WriteDecorHandleKey< xAOD::EventInfo > m_hfDecorKey
SG::ReadHandleKey< xAOD::EventInfo > m_eventInfoKey
SG::ReadHandleKey< xAOD::TruthParticleContainer > m_truthParticlesKey
SG::WriteDecorHandleKey< xAOD::JetContainer > m_jetIDDecorationKey
PublicToolHandle< DerivationFramework::HadronOriginClassifier > m_HadronOriginClassifier_Tool
SG::WriteDecorHandleKey< xAOD::EventInfo > m_SimplehfDecorKey
std::string m_hfDecorationName
PublicToolHandle< DerivationFramework::JetMatchingTool > m_JetMatchingTool_Tool
SG::ReadHandleKey< xAOD::JetContainer > m_jetCollectionKey
virtual StatusCode addBranches(const EventContext &ctx) const override final
Helper class to provide constant type-safe access to aux data.
bool isAvailable(const ELT &e) const
Test to see if this variable exists in the store.
virtual bool isValid() override final
Can the handle be successfully dereferenced?
const_pointer_type cptr()
Dereference the pointer.
virtual const std::string & key() const override final
Return the StoreGate ID for the referenced object.
Handle class for adding a decoration to an object.
EventInfo_v1 EventInfo
Definition of the latest event info version.
JetContainer_v1 JetContainer
Definition of the current "jet container version".
TruthParticleContainer_v1 TruthParticleContainer
Declare the latest version of the truth particle container.