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

Add executable to compare truth vs. CUDA seeding #906

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

stephenswat
Copy link
Member

This commit adds a new executable that compares the truth seeding to the CUDA seeding, emitting a CSV file with matched seeds allowing further analysis with e.g. Python.

This commit adds a new executable that compares the truth seeding to the
CUDA seeding, emitting a CSV file with matched seeds allowing further
analysis with e.g. Python.
@stephenswat stephenswat added feature New feature or request examples Changes to the examples labels Mar 7, 2025
Comment on lines +189 to +201
const measurement& bot_meas =
truth_track_candidates.at(i_trk).items.at(0);
const measurement& mid_meas =
truth_track_candidates.at(i_trk).items.at(1);
const measurement& top_meas =
truth_track_candidates.at(i_trk).items.at(2);

const std::map<particle, std::size_t>& bot_ptc_map =
evt_data.m_meas_to_ptc_map.at(bot_meas);
const std::map<particle, std::size_t>& mid_ptc_map =
evt_data.m_meas_to_ptc_map.at(mid_meas);
const std::map<particle, std::size_t>& top_ptc_map =
evt_data.m_meas_to_ptc_map.at(top_meas);
Copy link
Member Author

@stephenswat stephenswat Mar 7, 2025

Choose a reason for hiding this comment

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

@beomki-yeo I've noticed that if I get the bottom, middle, and top spacepoint positions like this, I get non-sensical $r$ progression on $79.2\%$ of seeds, i.e. the bottom $r$ isn't lower than the middle $r$ or the middle $r$ isn't lower than the top $r$. Is this expected? Do I need to sort the track candidate states?

Copy link
Contributor

Choose a reason for hiding this comment

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

It is not expected and the track candidates do not have to be sorted.

How did you get the spacepoint positions from bot_meas, mid_meas and top_meas?

Copy link
Contributor

Choose a reason for hiding this comment

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

After going through event_data.cpp, it is possible that we may need to sort the track candidate if csv_measurements is not sorted in the timing order:

m_ptc_to_meas_map[ptc].push_back(meas);

Copy link
Contributor

Choose a reason for hiding this comment

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

I found that measurement.csv of geant4 odd data does not have truth timing information (all of them are set to zero).
We will have to find the truth time from the corresponding hit object in hits.csv, which has truth timing information, via measurement-simhit-map.csv

Then you can run sorting on measurement (track candidate) vectors w.r.t. truth timing

@stephenswat stephenswat marked this pull request as draft March 7, 2025 08:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
examples Changes to the examples feature New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants