1 #ifndef JetReco_JetTrackMatch_h 2 #define JetReco_JetTrackMatch_h 38 template <
typename JetC>
56 void insert(
const JetRef& fJet,
const TrackRef& fTrack) { mMap.
insert(fJet, fTrack); }
60 std::vector<JetRef>
result;
62 for (; it != mMap.
end(); ++it) {
63 result.push_back(it->key);
68 std::vector<TrackRef>
getTracks(
const JetRef& mJet)
const {
69 std::vector<TrackRef>
result;
71 int i = tracks.
size();
73 if (!tracks[i].isNull())
74 result.push_back(tracks[i]);
Association between Jets from jet collection and tracks from track collection.
friend struct const_iterator
const_iterator end() const
last iterator over the map (read only)
void insert(const JetRef &fJet)
insert orphan jet
edm::AssociationMap< edm::OneToMany< JetC, reco::TrackCollection > > Map
void insert(const JetRef &fJet, const TrackRef &fTrack)
assign track to jet.
edm::Ref< reco::TrackCollection > TrackRef
std::vector< JetRef > allJets() const
get list of all jats in the map
void insert(const key_type &k, const data_type &v)
insert an association
std::vector< TrackRef > getTracks(const JetRef &mJet) const
get all tracks associated with jet
size_type size() const
Size of the RefVector.
const_iterator begin() const
first iterator over the map (read only)