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

Avoid copying uninitialized value in PFDisplacedVertexCandidateFinder #27525

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Expand Up @@ -18,10 +18,9 @@ PFDisplacedVertexCandidateFinder::PFDisplacedVertexCandidateFinder()
primaryVertexCut2_(0.0),
dcaPInnerHitCut2_(1000.0),
vertexCandidatesSize_(50),
debug_(false) {
TwoTrackMinimumDistance theMinimum(TwoTrackMinimumDistance::SlowMode);
Copy link
Contributor

Choose a reason for hiding this comment

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

Out of curiosity @Dr15Jones, and for my own education: what was uninitialized here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The original error report was

TrackingTools/PatternTools/interface/TwoTrackMinimumDistance.h:19:7: runtime error: load of value 32508, which is not a valid value for type 'Charge'

theMinimum_ = theMinimum;
}
theMinimum_(TwoTrackMinimumDistance::SlowMode),
debug_(false),
magField_(nullptr) {}

PFDisplacedVertexCandidateFinder::~PFDisplacedVertexCandidateFinder() {
#ifdef PFLOW_DEBUG
Expand Down