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

DR: Excluding Duplicates for CM #267

Draft
wants to merge 4 commits into
base: L1TK-dev-14_0_0_pre2
Choose a base branch
from
Draft

Conversation

dally96
Copy link

@dally96 dally96 commented Mar 29, 2024

Fixed track comparison in PurgeDuplicate.cc so that the comparison modules ignore duplicate tracks. However, this does not overwrite the stub list if a duplicate is found and is merged.

@tomalin
Copy link
Collaborator

tomalin commented Apr 2, 2024

@dally96 given that in Settings.h , int numTracksComparedPerBin_ remains 9999, this PR should have no effect on tracking performance. But it fails git CI because the tracking performance has got worse. Do you understand why?

@tomalin tomalin requested a review from trholmes April 2, 2024 23:20
@dally96
Copy link
Author

dally96 commented Apr 3, 2024 via email

@dally96 dally96 marked this pull request as draft April 5, 2024 10:05
@tomalin
Copy link
Collaborator

tomalin commented Apr 6, 2024

Does the current code, before this PR, also behave incorrectly, by not overwriting the inputstublists when two tracks are merged?

@tomalin
Copy link
Collaborator

tomalin commented Apr 6, 2024

In your talk, you stated that if you correct this PR, so it does overwrite the inputstublists, then it crashes. My guess is that Tracklet:::proj() which you are calling from PurgeDuplicate is being called with a layer that fails the assert statement in Tracklet::validProj().

@dally96
Copy link
Author

dally96 commented Apr 8, 2024

Does the current code, before this PR, also behave incorrectly, by not overwriting the inputstublists when two tracks are merged?

There are two loops one to check if two tracks are duplicate and the other to merge the tracks if they are duplicates. In the loop to merge tracks, the stubs and stub ids do get merged, but after all the comparisons have been done. This error arises when I try to use the merged stubs for the comparison (although they should really be in one loop for this PR, I will fix that, but the same error persists).

@tomalin
Copy link
Collaborator

tomalin commented Aug 5, 2024

There's been no progress on this PR in 4 months. Shall we close it?

const unsigned int curSeed = aTrack->seedIndex();
static const std::vector<int> ranks{1, 5, 2, 7, 4, 3, 8, 6};
unsigned int curSeed = aTrack->seedIndex();
std::vector<int> ranks{1, 5, 2, 7, 4, 3, 8, 6};
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why has the "static const" qualifier been removed here?

@@ -181,38 +187,70 @@ void PurgeDuplicate::execute(std::vector<Track>& outputtracks, unsigned int iSec
if (inputtracklets_.empty())
continue;
const unsigned int numStublists = inputstublists_.size();
std::vector<int> seedRankIdx(numStublists);
Copy link
Collaborator

Choose a reason for hiding this comment

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

Add comment that you're ordering the tracks by seed rank.

@@ -86,6 +87,11 @@ void PurgeDuplicate::execute(std::vector<Track>& outputtracks, unsigned int iSec
inputstublists_.clear();
mergedstubidslists_.clear();

sortedinputtracklets_.clear();
Copy link
Collaborator

@tomalin tomalin Sep 13, 2024

Choose a reason for hiding this comment

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

I've never understood why all these vectors are declared as class data members. If they were instead declared inside the loop over bins, e.g. near here https://github.com/cms-L1TK/cmssw/blob/dally_CMFix/L1Trigger/TrackFindingTracklet/src/PurgeDuplicate.cc#L140 , they would automatically be deleted and recreated between loops, so no clear would be needed either here nor near L410. Am I missing something?

@tomalin
Copy link
Collaborator

tomalin commented Sep 13, 2024

This fails git CI only because the performance of HYBRID_DISPLACED is worse https://gitlab.cern.ch/cms-l1tk/cmssw_CI/-/pipelines/8056886 . The reason it is worse is presumably your discovery that that the DR binning equations need changing to work for displaced tracks.
Since Thomas says that with his new "comparison modules ignore duplicate tracks" idea, the binning is no longer necessary, please try running with only 1 bin, and check compare the performance with what you get currently.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants