10 for (
unsigned i = 0;
i < pfCandidates.size();
i++) {
25 if ((ivertex == -1 || ivertex == 0 ||
29 std::cout <<
"VTX " <<
i <<
" " << *(pfCandidates[
i]) << std::endl;
33 std::cout <<
"PU " <<
i <<
" " << *(pfCandidates[
i]) << std::endl;
43 unsigned int index = 0;
44 unsigned int nFoundVertex = 0;
46 for (
auto const& vtx : vertices) {
47 float w = vtx.trackWeight(
track);
57 if (nFoundVertex > 0) {
58 if (nFoundVertex != 1)
59 edm::LogWarning(
"TrackOnTwoVertex") <<
"a track is shared by at least two verteces. Used to be an assert";
67 double ztrack = pfcand.
vertex().z();
68 bool foundVertex =
false;
70 for (
auto iv = vertices.begin();
iv != vertices.end(); ++
iv, ++
index) {
71 double dz = fabs(ztrack -
iv->z());
double fDzCutForChargedFromPUVtxs_
std::vector< edm::FwdPtr< reco::PFCandidate > > PFCollection
std::vector< Vertex > VertexCollection
collection of Vertex objects
reco::TrackRef trackRef() const
unsigned int fNumOfPUVtxsForCharged_
PFCollection pfCandidatesFromVtx_
Abs< T >::type abs(const T &t)
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