10 for (
unsigned i = 0;
i < pfCandidates.size();
i++) {
25 if (ivertex == -1 || ivertex == 0) {
27 std::cout <<
"VTX " <<
i <<
" " << *(pfCandidates[
i]) << std::endl;
31 std::cout <<
"PU " <<
i <<
" " << *(pfCandidates[
i]) << std::endl;
41 unsigned int index = 0;
42 unsigned int nFoundVertex = 0;
44 for (
auto const& vtx : vertices) {
45 float w = vtx.trackWeight(
track);
55 if (nFoundVertex > 0) {
56 if (nFoundVertex != 1)
57 edm::LogWarning(
"TrackOnTwoVertex") <<
"a track is shared by at least two verteces. Used to be an assert";
65 double ztrack = pfcand.
vertex().z();
66 bool foundVertex =
false;
68 for (
auto iv = vertices.begin();
iv != vertices.end(); ++
iv, ++
index) {
69 double dz = fabs(ztrack -
iv->z());
std::vector< edm::FwdPtr< reco::PFCandidate > > PFCollection
std::vector< Vertex > VertexCollection
collection of Vertex objects
reco::TrackRef trackRef() const
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
const Point & vertex() const override
vertex position (overwritten by PF...)
Particle reconstructed by the particle flow algorithm.
void process(const PFCollection &pfCandidates, const reco::VertexCollection &vertices)
Log< level::Warning, false > LogWarning
virtual ParticleType particleId() const