CMS 3D CMS Logo

SimpleJetTrackAssociator.cc
Go to the documentation of this file.
4 
8  for (size_t i = 0, n = in.size(); i < n; i++) {
9  const reco::Track &t = in[i];
10  if ((t.numberOfValidHits() < nHits_) || (t.normalizedChi2() > chi2nMax_))
11  continue;
12  if (deltaR2(dir, t) < deltaR2_) {
13  reco::TrackRef tr(&in, i); // note: transient ref
14  out.push_back(tr);
15  }
16  }
17 }
18 
22  for (size_t i = 0, n = in.size(); i < n; i++) {
23  const reco::Track &t = in[i];
24  if ((t.numberOfValidHits() < nHits_) || (t.normalizedChi2() > chi2nMax_))
25  continue;
26  if (deltaR2(dir, t) < deltaR2_) {
27  reco::TrackRef tr = in.refAt(i).castTo<reco::TrackRef>();
28  out.push_back(tr);
29  }
30  }
31 }
void associateTransient(const math::XYZVector &dir, const reco::TrackCollection &in, reco::TrackRefVector &out)
std::vector< Track > TrackCollection
collection of Tracks
Definition: TrackFwd.h:14
void associate(const math::XYZVector &dir, const edm::View< reco::Track > &in, reco::TrackRefVector &out)
XYZVectorD XYZVector
spatial vector with cartesian internal representation
Definition: Vector3D.h:31