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

mc_truth/interactions #126

Closed
wants to merge 9 commits into from
Closed

mc_truth/interactions #126

wants to merge 9 commits into from

Conversation

YifanC
Copy link
Collaborator

@YifanC YifanC commented May 22, 2024

Fill mc_truth/interactions with vertices when there is no mc_hdr available.

@YifanC YifanC requested review from diaza, cuddandr and krwood May 22, 2024 15:42
Copy link
Contributor

@cuddandr cuddandr left a comment

Choose a reason for hiding this comment

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

In raw_event_generator.py a couple warning messages are added, but one of them uses print() and the other uses warning.warn(). Use print() or warn() for both.

Also, what is the purpose of switching between file_vertex_id and vertex_id? It looks like it's there as a fallback if the file_ version is not present in the dataset.

use warning instead of a mix of warning and print
@YifanC
Copy link
Collaborator Author

YifanC commented May 30, 2024

@cuddandr addressed the warning comment.
For the "file_vertex_id" one, please also check this PR: DUNE/larnd-sim#234
An interaction is considered as a unit in raw_event_generator. It is written with the assumption that vertex_id is unique. If we pass non-unique vertex here, the event=interaction selection would be wrong. (

intr_evid = self.mc_events[self.vertex_id_name][:]
) (It is not so critical to have unique traj_id I think..)
In particle bomb adaption in edepsim, the vertex_id restart from 0 every event and the traj_id restart from 0 every interaction. In the beam simulation vertex_id is unique. I have not looked at the cosmic simulation yet.

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