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

Convert TrackFromPVSelector from legacy producer to global producer #17472

Merged
merged 5 commits into from Feb 14, 2017

Conversation

knoepfel
Copy link
Contributor

@knoepfel knoepfel commented Feb 9, 2017

This was a nicely written module. Straightforward to convert.

@cmsbuild
Copy link
Contributor

cmsbuild commented Feb 9, 2017

A new Pull Request was created by @knoepfel (Kyle Knoepfel) for CMSSW_9_0_X.

It involves the following packages:

Validation/RecoTau

@cmsbuild, @dmitrijus, @vanbesien, @davidlange6 can you please review it and eventually sign? Thanks.
@davidlange6, @smuzaffar you are the release manager for this.

cms-bot commands are listed here #13028

@knoepfel
Copy link
Contributor Author

@Dr15Jones


edm::Handle<std::vector<reco::Vertex>> vertices;
edm::Handle<std::vector<reco::Track>> tracks;
if (iEvent.getByToken(v_recoVertexToken_, vertices) && !vertices->empty() &&
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not the same logic. Previously if the data product was missing we'd throw an exception at the VertexHandle-> or TrackHandle-> call. Now you will put in an empty container. Please remove the check on return value of getByToken.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ack. Good catch. Yes I'll make the change.

auto const& vtxPos = vertices->front().position();
std::copy_if(std::cbegin(*tracks), std::cend(*tracks), std::back_inserter(*goodTracks),
[this, &vtxPos](auto const& track) {
return fabs(track.dxy(vtxPos)) < max_dxy_ && fabs(track.dz(vtxPos)) < max_dz_;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you switch to using std::abs ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep.

@cmsbuild
Copy link
Contributor

Pull request #17472 was updated. @cmsbuild, @dmitrijus, @vanbesien, @davidlange6 can you please check and sign again.

@knoepfel
Copy link
Contributor Author

@Dr15Jones Logic error fixed and pushed.

@Dr15Jones
Copy link
Contributor

please test

@cmsbuild
Copy link
Contributor

cmsbuild commented Feb 13, 2017

The tests are being triggered in jenkins.
https://cmssdt.cern.ch/jenkins/job/ib-any-integration/17764/console Started: 2017/02/13 17:06

@cmsbuild
Copy link
Contributor

@cmsbuild
Copy link
Contributor

Comparison job queued.

@cmsbuild
Copy link
Contributor

@dmitrijus
Copy link
Contributor

+1

@cmsbuild
Copy link
Contributor

This pull request is fully signed and it will be integrated in one of the next CMSSW_9_0_X IBs (tests are also fine). This pull request requires discussion in the ORP meeting before it's merged. @davidlange6, @smuzaffar

@davidlange6
Copy link
Contributor

+1

@cmsbuild cmsbuild merged commit 4f3b5b5 into cms-sw:CMSSW_9_0_X Feb 14, 2017
@knoepfel knoepfel deleted the convert-TrackFromPV branch February 14, 2017 18:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants