71 {
72
73
74
75 SG::ReadHandle<xAOD::TruthParticleContainer> truthParticlesHandle(
m_truthParticlesKey, ctx);
76 if (!truthParticlesHandle.isValid()) {
77 ATH_MSG_ERROR (
"Could not retrieve TruthParticleContainer " << truthParticlesHandle.key());
78 return StatusCode::FAILURE;
79 }
81
82
84 if (!jetInputHandle.isValid()) {
85 ATH_MSG_ERROR (
"Could not retrieve JetContainer " << jetInputHandle.key());
86 return StatusCode::FAILURE;
87 }
89
90
91 std::map<const xAOD::TruthParticle*, DerivationFramework::HadronOriginClassifier::HF_id> hadronMap =
m_HadronOriginClassifier_Tool->GetOriginMap();
92
93
94 std::map<const xAOD::Jet*, std::vector<xAOD::TruthParticleContainer::const_iterator>> particleMatch =
m_JetMatchingTool_Tool->matchHadronsToJets(xTruthParticleContainer,
JetCollection);
95
96
98
99
102
103
104 SG::ReadHandle<xAOD::EventInfo> eventInfoHandle(
m_eventInfoKey, ctx);
105 if (!eventInfoHandle.isValid()) {
106 ATH_MSG_ERROR (
"Could not retrieve EventInfo " << eventInfoHandle.key());
107 return StatusCode::FAILURE;
108 }
110
111
112 SG::WriteDecorHandle<xAOD::EventInfo, int> decorator_HFClassification(
m_hfDecorKey, ctx);
113 decorator_HFClassification(*EventInfo) = hfclassif;
114
115 SG::WriteDecorHandle<xAOD::EventInfo, int> decorator_SimpleHFClassification(
m_SimplehfDecorKey, ctx);
116 decorator_SimpleHFClassification(*EventInfo) = simpleclassif;
117
118
121 int id = -999;
123 if(hfidAcc.isAvailable(*jet)){
124 id = hfidAcc(*jet);
125 }
126 jetIdDecorator(*jet) =
id;
127 }
128
129 return StatusCode::SUCCESS;
130 }
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
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.