1 #ifndef JetReco_JetTrackMatch_h 2 #define JetReco_JetTrackMatch_h 38 template <
typename JetC>
57 void insert (
const JetRef& fJet,
const TrackRef& fTrack) {
58 mMap.
insert (fJet, fTrack);
63 std::vector <JetRef>
result;
65 for (; it != mMap.
end(); ++it) {
66 result.push_back (it->key);
71 std::vector <TrackRef>
getTracks (
const JetRef& mJet)
const {
72 std::vector <TrackRef>
result;
74 int i = tracks.
size();
76 if (!tracks [i].isNull ()) 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)