|
ATLAS Offline Software
|
Go to the documentation of this file.
22 :
asg::AsgTool(myname) {
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";
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 ) {
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);
const_pointer_type cptr()
Dereference the pointer.
Basic data class defines behavior for all Jet objects The Jet class is the principal data class for...
#define ATH_MSG_VERBOSE(x)
Class providing the definition of the 4-vector interface.
virtual double pt() const =0
transverse momentum
::StatusCode StatusCode
StatusCode definition for legacy code.
Handle class for adding a decoration to an object.
virtual bool isValid() override final
Can the handle be successfully dereferenced?
ElementLink implementation for ROOT usage.
#define ATH_MSG_WARNING(x)
4-vector of jet constituent at the scale used during jet finding.
A vector of jet constituents at the scale used during jet finding.
JetContainer_v1 JetContainer
Definition of the current "jet container version".
Jet_v1 Jet
Definition of the current "jet version".