Skip to content

JetUserData -> read vertex collection only once per event #286

@kreczko

Description

@kreczko

Currently we are reading the vertex collection once per jet.
While CMSSW is smart about caching such access, it is a bad code example.
These two lines should move into the produce method

edm::Handle < std::vector<reco::Vertex> > primaryVertices;
iEvent.getByToken(vtxInputTag_, primaryVertices);

and the current fillVertexVariables method should take the vertex handle (const reference) instead of iEvent as paramter.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions