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;
48 unsigned int nFoundVertex = 0;
50 for(
auto const &
vtx : vertices) {
63 edm::LogWarning(
"TrackOnTwoVertex")<<
"a track is shared by at least two verteces. Used to be an assert";
72 double ztrack = pfcand.
vertex().z();
73 bool foundVertex =
false;
75 for(
auto iv=vertices.begin(); iv!=vertices.end(); ++iv, ++
index) {
77 double dz = fabs(ztrack - iv->z());
std::vector< Vertex > VertexCollection
collection of Vertex objects
reco::TrackRef trackRef() const
const Point & vertex() const override
vertex position (overwritten by PF...)
PFCollection pfCandidatesFromVtx_
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.
void process(const PFCollection &pfCandidates, const reco::VertexCollection &vertices)
virtual ParticleType particleId() const