12 for(
unsigned i=0;
i<pfCandidates.size();
i++ ) {
51 unsigned nFoundVertex = 0;
52 typedef reco::VertexCollection::const_iterator IV;
55 for(IV iv=vertices.begin(); iv!=vertices.end(); ++iv, ++
index) {
67 if(baseRef == trackBaseRef ) {
81 edm::LogWarning(
"TrackOnTwoVertex")<<
"a track is shared by at least two verteces. Used to be an assert";
90 double ztrack = pfcand.
vertex().z();
91 bool foundVertex =
false;
93 for(IV iv=vertices.begin(); iv!=vertices.end(); ++iv, ++
index) {
95 double dz = fabs(ztrack - iv->z());
trackRef_iterator tracks_end() const
last iterator over tracks
std::vector< Vertex > VertexCollection
collection of Vertex objects
reco::PFCandidateCollection pfCandidatesFromVtx_
reco::PFCandidateCollection pfCandidatesFromPU_
std::vector< PFCandidatePtr > pfCandidates(const PFJet &jet, int particleId, bool sort=true)
reco::TrackRef trackRef() const
float trackWeight(const TrackBaseRef &r) const
returns the weight with which a Track has contributed to the vertex-fit.
virtual const Point & vertex() const
vertex position
std::vector< LinkConnSpec >::const_iterator IT
std::vector< reco::PFCandidate > PFCandidateCollection
collection of PFCandidates
int chargedHadronVertex(const reco::VertexCollection &vertices, const reco::PFCandidate &pfcand) const
bool checkClosestZVertex_
use the closest z vertex if a track is not in a vertex
void process(const reco::PFCandidateCollection &pfCandidates, const reco::VertexCollection &vertices, const edm::Handle< reco::PFCandidateCollection > *handle=0)
Particle reconstructed by the particle flow algorithm.
std::vector< TrackBaseRef >::const_iterator trackRef_iterator
The iteratator for the vector<TrackRef>
trackRef_iterator tracks_begin() const
first iterator over tracks
virtual ParticleType particleId() const