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

Remove unused variable in TestAssociator.cc #47199

Merged
merged 3 commits into from
Feb 3, 2025
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion SimTracker/TrackerHitAssociation/test/TestAssociator.cc
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ void TestAssociator::printRechitSimhit(const edm::Handle<edmNew::DetSetVector<re
edm::LogVerbatim("TrackAssociator")
<< " simtrack ID = " << m.trackId() << " Simhit Pos = " << m.localPosition();
// Seek the smallest residual
if (const SiPixelRecHit* dummy = dynamic_cast<const SiPixelRecHit*>(&rechit)) {
if (dynamic_cast<const SiPixelRecHit*>(&rechit)) {
Copy link
Contributor

Choose a reason for hiding this comment

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

@iarspider , likely problem of test is not due to this modification but I would change the code differently:

auto ptr = dynamic_cast<const SiPixelRecHit*>(&rechit));
if (nullptr != ptr) {

This place will be more clear both for non-expert of the code and for compiler, which will optimise executable.

isPixel = true;
dist = (rechit.localPosition() - m.localPosition()).mag(); // pixels measure 2 dimensions
} else {
Expand Down