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

Finding performance writer: comments + fake tracks #575

Merged

Conversation

SylvainJoube
Copy link
Contributor

@SylvainJoube SylvainJoube commented May 5, 2024

While writing a ROOT documentation for the finding and ambiguity resolution algorithms, I thought it would be interesting to have a visualization for the fake tracks rates. The greedy ambiguity resolution algorithm successfully managed to remove every track duplicates while retaining reasonable efficiency, but I wanted to make sure that it would also greatly reduce the number of fake tracks, at least on the data generated by the toy detector (mostly 100GeV muons).

The fake_tracks_plot_tool.hpp file is a duplication of the code from the duplication_plot_tool.hpp file. I think it would be better to merge the two codes, so I will do it if you think it’s a good idea.

If you like the idea, I will write the corresponding documentation and append it to the doc/root/README.md file from PR 535

For example, with toy detector generated data and 100GeV muons, the mean value for “fake tracks” goes from 1.707 with the finding algorithm down to 0.0155 after the ambiguity resolution algorithm (a x110 decrease!):

After the finding algorithm:

After the ambiguity resolution algorithm:

I used the following code to generate the ROOT data with traccc_seeding_example:

# Generate toy detector data
./bin/traccc_simulate_toy_detector --gen-vertex-xyz-mm=0:0:0 --gen-vertex-xyz-std-mm=0:0:0 --gen-mom-gev=100:100 --gen-phi-degree=0:360 --gen-events=10 --gen-nparticles=2000 --output-directory=detray_simulation/toy_detector/n_particles_2000/ --gen-eta=-3:3 --constraint-step-size-mm=1

# …copy data were needed…

# Run the seeding example
./bin/traccc_seeding_example --input-directory=detray_simulation/toy_detector/n_particles_2000/ --detector-file=toy_detector_geometry.json --material-file=toy_detector_homogeneous_material.json --grid-file=toy_detector_surface_grids.json --input-event=1 --track-candidates-range=3:30 --constraint-step-size-mm=1000 --check-performance

@SylvainJoube
Copy link
Contributor Author

SylvainJoube commented May 5, 2024

If I’m not mistaken, we can do the following math.
5296 tracks were found and fitted, 1780 remained after ambiguity resolution. So only 1 out of (about) 3 tracks were kept, whereas only 1 out of 110 fake tracks were kept. All duplicated tracks were removed, meaning the ambiguity resolution algorithm disproportionately affected fake and duplicated tracks (which is great!). The efficiency graphs seem to be largely unaffected by ambiguity resolution (but I can’t compare the exact numbers as they are not mentioned in the ROOT plots for some reason I don’t understand).

==> Statistics ... 
- read    7830 spacepoints
- read    7830 measurements
- created (cpu)  4794 seeds
- created (cpu)  5296 found tracks
- created (cpu)  5296 fitted tracks
- created (cpu)  1780 ambiguity free tracks

@beomki-yeo beomki-yeo self-requested a review May 6, 2024 15:01
@beomki-yeo
Copy link
Contributor

Great I assigned myself for review

@SylvainJoube
Copy link
Contributor Author

SylvainJoube commented May 7, 2024

Thanks a lot Beom Ki! :)

But let's wait the performance measurement code reorganization by Attila, as he mentioned on PR 578

Copy link
Contributor

@beomki-yeo beomki-yeo left a comment

Choose a reason for hiding this comment

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

Looks good to me but I might need to understand the logic clearly. Actually I don't know the exact definition of fake rate. Could you find its definition?

@SylvainJoube SylvainJoube force-pushed the ROOT-performance-fake-tracks branch from 74e5f21 to 27753e3 Compare May 20, 2024 10:33
Copy link
Contributor

@beomki-yeo beomki-yeo left a comment

Choose a reason for hiding this comment

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

Looks good to me. I will update the branch and merge

@SylvainJoube
Copy link
Contributor Author

Okay, thanks!

@beomki-yeo beomki-yeo merged commit 8d2996c into acts-project:main May 22, 2024
19 checks passed
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