![Logo](../../ATLAS-Logo-Square-Blue-RGB.png) |
ATLAS Offline Software
|
Go to the documentation of this file.
16 :
asg::AsgTool(myname)
25 ATH_MSG_ERROR(
"JetWidthTool needs to have its input jet container name configured!");
26 return StatusCode::FAILURE;
35 return StatusCode::SUCCESS;
46 float widthEta = 0, widthPhi = 0;
48 widthPhiHandle(*
jet) = widthPhi;
50 return StatusCode::SUCCESS;
63 const float jetEta =
jet.eta();
64 const float jetPhi =
jet.phi();
65 float weightedWidth = 0;
66 float weightedWidthEta = 0;
67 float weightedWidthPhi = 0;
71 for (
const auto *
const constituent : constituents) {
72 const float dR = jet::JetDistances::deltaR(jetEta, jetPhi, constituent->eta(), constituent->phi() );
73 const float dEta = fabs(jet::JetDistances::deltaEta(jetEta, constituent->eta() ));
74 const float dPhi = fabs(jet::JetDistances::deltaPhi(jetPhi, constituent->phi() ));
75 const float pt = constituent->pt();
77 weightedWidth += dR *
pt;
78 weightedWidthEta +=
dEta *
pt;
79 weightedWidthPhi +=
dPhi *
pt;
84 widthEta = ptSum > 0 ? weightedWidthEta/ptSum : -1;
85 widthPhi = ptSum > 0 ? weightedWidthPhi/ptSum : -1;
87 return ptSum > 0 ? weightedWidth/ptSum : -1;
This file defines helper classes to deal with jet constituents.
::StatusCode StatusCode
StatusCode definition for legacy code.
bool dPhi(const xAOD::TauJet &tau, const xAOD::TauTrack &track, double &out)
Handle class for adding a decoration to an object.
A vector of jet constituents at the scale used during jet finding.
bool dEta(const xAOD::TauJet &tau, const xAOD::TauTrack &track, double &out)