 |
ATLAS Offline Software
|
Go to the documentation of this file.
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;
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;
97 bool isRetrieved = cluster->retrieveMoment(momentType, moment);
98 if (isRetrieved)
return (
float) moment;
@ SECOND_R
Second Moment in .
@ CENTER_LAMBDA
Shower depth at Cluster Centroid.
const std::string & key() const
Return the StoreGate ID for the referenced object.
bool empty() const
Test if the key is blank.
CaloCluster_v1 CaloCluster
Define the latest version of the calorimeter cluster class.
@ SECOND_LAMBDA
Second Moment in .
MomentType
Enums to identify different moments.
Description of a calorimeter cluster.
::StatusCode StatusCode
StatusCode definition for legacy code.
Handle class for adding a decoration to an object.
virtual double pt() const
The transverse momentum ( ) of the particle (negative for negative-energy clusters)
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.
#define ATH_MSG_WARNING(x)
Jet_v1 Jet
Definition of the current "jet version".