15 ATH_MSG_ERROR(
"JetClusterMomentsTool needs to have its input jet container name configured!");
16 return StatusCode::FAILURE;
29 return StatusCode::SUCCESS;
35 std::unique_ptr<SG::WriteDecorHandle<xAOD::JetContainer, float> > handlePt;
36 std::unique_ptr<SG::WriteDecorHandle<xAOD::JetContainer, float> > handleSecondLambda;
37 std::unique_ptr<SG::WriteDecorHandle<xAOD::JetContainer, float> > handleCenterLambda;
38 std::unique_ptr<SG::WriteDecorHandle<xAOD::JetContainer, float> > handleSecondR;
40 if(!
m_clsPtKey.empty()) handlePt = std::make_unique<SG::WriteDecorHandle<xAOD::JetContainer, float> >(
m_clsPtKey);
50 ATH_MSG_WARNING(
"Jet has no CaloCluster constituents, leading cluster not found");
51 return StatusCode::FAILURE;
54 if(handlePt.get() !=
nullptr) (*handlePt)(*jet) = leadingCluster->
pt();
59 return StatusCode::SUCCESS;
66 if (
jet.numConstituents() == 0 )
return nullptr;
70 switch(
jet.rawConstituent(0)->type() ) {
72 for (
size_t i_cl = 0; i_cl <
jet.numConstituents(); i_cl++){
74 if (!cl_leading || cl_leading->
pt() < cl_current->
pt() ) cl_leading = cl_current;
80 for (
size_t i_cl = 0; i_cl <
jet.numConstituents(); i_cl++){
82 if (!jet_constit)
continue;
84 if(cl_current)
if (!cl_leading || cl_leading->
pt() < cl_current->
pt() ) cl_leading = cl_current;
98 if (isRetrieved)
return (
float) moment;