11 for(
unsigned i=0;
i<pfCandidates.size();
i++ ) {
30 std::cout<<
"VTX "<<
i<<
" "<< *(pfCandidates[
i])<<std::endl;
34 std::cout<<
"PU "<<
i<<
" "<< *(pfCandidates[
i])<<std::endl;
50 unsigned nFoundVertex = 0;
51 typedef reco::VertexCollection::const_iterator IV;
54 for(IV iv=vertices.begin(); iv!=vertices.end(); ++iv, ++
index) {
66 if(baseRef == trackBaseRef ) {
80 edm::LogWarning(
"TrackOnTwoVertex")<<
"a track is shared by at least two verteces. Used to be an assert";
89 double ztrack = pfcand.
vertex().z();
90 bool foundVertex =
false;
92 for(IV iv=vertices.begin(); iv!=vertices.end(); ++iv, ++
index) {
94 double dz = fabs(ztrack - iv->z());
trackRef_iterator tracks_end() const
last iterator over tracks
std::vector< Vertex > VertexCollection
collection of Vertex objects
std::vector< PFCandidatePtr > pfCandidates(const PFJet &jet, int particleId, bool sort=true)
reco::TrackRef trackRef() const
PFCollection pfCandidatesFromVtx_
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 (overwritten by PF...)
std::vector< LinkConnSpec >::const_iterator IT
PFCollection pfCandidatesFromPU_
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
std::vector< edm::FwdPtr< reco::PFCandidate > > PFCollection
Particle reconstructed by the particle flow algorithm.
std::vector< TrackBaseRef >::const_iterator trackRef_iterator
The iteratator for the vector<TrackRef>
void process(const PFCollection &pfCandidates, const reco::VertexCollection &vertices)
trackRef_iterator tracks_begin() const
first iterator over tracks
virtual ParticleType particleId() const