Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
kreczko opened this issue Feb 1, 2017 · 0 comments
Open

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

kreczko opened this issue Feb 1, 2017 · 0 comments

Comments

@kreczko
Copy link
Member

kreczko commented Feb 1, 2017

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.

@kreczko kreczko added this to the 13 TeV proper milestone Feb 1, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant