Loading [MathJax]/extensions/tex2jax.js
 |
ATLAS Offline Software
|
Go to the documentation of this file.
24 ATH_MSG_ERROR(
"JetDRTrackAssocTool needs to have its input container name configured!");
25 return StatusCode::FAILURE;
33 return StatusCode::SUCCESS;
43 if (!handle_trk.isValid()){
44 ATH_MSG_ERROR(
"Could not retrieve the TrackParticleContainer: "
46 return StatusCode::FAILURE;
52 std::map<const xAOD::TrackParticle*, const xAOD::Jet*> closest_jet_to_track;
56 std::vector<std::vector<ElementLink<xAOD::IParticleContainer> > > tracks_per_jet(
jets.size());
57 for(std::pair<const xAOD::TrackParticle*, const xAOD::Jet*> trkpair : closest_jet_to_track) {
59 if(trkpair.second!=
nullptr) {
61 tracks_per_jet[trkpair.second->index()].emplace_back(trkpair.first,*handle_trk);
62 ATH_MSG_VERBOSE(
"Added track " << trkpair.first->index() <<
" to association list for jet " << trkpair.second->index());
63 ATH_MSG_VERBOSE(
"Verify ElementLink -- track pt: " << trkpair.first->pt() <<
"; EL pt; " << (*tracks_per_jet[trkpair.second->index()].back())->pt());
71 assocLinkHandle(*
jet) = tracks_per_jet[
jet->index()];
73 <<
" associated tracks with " <<
m_dRcut);
75 std::vector<const xAOD::TrackParticle*> tracks;
76 bool havetracks =
jet->getAssociatedObjects(
"DRTrack", tracks);
82 return StatusCode::SUCCESS;
92 if(
track==
nullptr) {
return StatusCode::FAILURE;}
96 if(
jet==
nullptr) {
return StatusCode::FAILURE;}
103 ATH_MSG_VERBOSE(
" This is the closest jet to the track, with mindR = " << sqrt(mindR2));
109 closest_jet_to_track[
track] = p_closestJet;
112 return StatusCode::SUCCESS;
bool msgLvl(const MSG::Level lvl) const
#define ATH_MSG_VERBOSE(x)
const std::string & key() const
Return the StoreGate ID for the referenced object.
double deltaR2(double rapidity1, double phi1, double rapidity2, double phi2)
from bare rapidity,phi
SG::ReadCondHandle< T > makeHandle(const SG::ReadCondHandleKey< T > &key, const EventContext &ctx=Gaudi::Hive::currentContext())
::StatusCode StatusCode
StatusCode definition for legacy code.
Handle class for adding a decoration to an object.
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.
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)
Class describing a TrackParticle.