31 ATH_MSG_ERROR(
"JetPtAssociationTool needs to have its input jet container configured!");
32 return StatusCode::FAILURE;
42 return StatusCode::SUCCESS;
58 if ( !
jet->getAssociatedObjects(
m_aname, apins) ) {
60 return StatusCode::FAILURE;
68 return StatusCode::FAILURE;
71 const auto *pjets = handle.
cptr();
75 if (
ptfrac(apins, *pjets, ptfs) ) {
77 return StatusCode::FAILURE;
81 unsigned int ijet_matched = ptfs.size();
82 for (
unsigned int ijet=0; ijet<ptfs.size(); ++ijet ) {
84 if ( ptfs[ijet] > frac ) {
90 if ( ijet_matched < ptfs.size() ) {
93 string sfrac =
m_aname +
"AssociationFraction";
94 string slink =
m_aname +
"AssociationLink";
96 assocFracHandle(*
jet) = frac;
98 << el.dataID() <<
"[" << el.index() <<
"]");
99 assocLinkHandle(*
jet) = el;
101 return StatusCode::SUCCESS;
109 ptfs.resize(jets.size(), 0.0);
111 for (
unsigned int ijet=0; ijet<jets.size(); ++ijet ) {
112 const Jet* pjet = jets[ijet];
113 if ( pjet ==
nullptr )
return -3;
115 double ptsum_target = 0.;
116 match(apins, *pjet, apouts, ptsum_target);
119 if ( ppar ==
nullptr )
return -4;
122 ptfs[ijet] = ptsum/ptsum_target;
131 ptsum_constituents = 0.;
135 const IParticle* pparcon = pcon->rawConstituent();
136 ptsum_constituents+=pparcon->
pt();
138 if ( pparap == pparcon ) {
139 apvs.push_back(pparcon);
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_VERBOSE(x)
#define ATH_MSG_WARNING(x)
ElementLink implementation for ROOT usage.
virtual double pt() const =0
transverse momentum
virtual bool isValid() override final
Can the handle be successfully dereferenced?
const_pointer_type cptr()
Dereference the pointer.
Handle class for adding a decoration to an object.
Class providing the definition of the 4-vector interface.
A vector of jet constituents at the scale used during jet finding.
4-vector of jet constituent at the scale used during jet finding.
Jet_v1 Jet
Definition of the current "jet version".
JetContainer_v1 JetContainer
Definition of the current "jet container version".