|
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;
58 const float jetEta =
jet.eta();
59 const float jetPhi =
jet.phi();
60 float weightedWidth = 0;
61 float weightedWidthEta = 0;
62 float weightedWidthPhi = 0;
66 for (
const auto *
const constituent : constituents) {
68 const float dEta = std::abs(
jet.eta()-constituent->eta());
70 const float pt = constituent->pt();
72 weightedWidth += dR *
pt;
73 weightedWidthEta +=
dEta *
pt;
74 weightedWidthPhi +=
dPhi *
pt;
79 widthEta = ptSum > 0 ? weightedWidthEta/ptSum : -1;
80 widthPhi = ptSum > 0 ? weightedWidthPhi/ptSum : -1;
82 return ptSum > 0 ? weightedWidth/ptSum : -1;
double deltaPhi(double phiA, double phiB)
delta Phi in range [-pi,pi[
This file defines helper classes to deal with jet constituents.
double deltaR(double rapidity1, double phi1, double rapidity2, double phi2)
from bare bare rapidity,phi
::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)