-
Notifications
You must be signed in to change notification settings - Fork 50
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 track tree writer #503
base: main
Are you sure you want to change the base?
Conversation
aebf0b8
to
d0dce88
Compare
d0dce88
to
3a09a8f
Compare
@krasznaa Could you take a look? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🤔 I believe the code is a bit too over-complicated right now.
But let's start at the beginning. Let's not use a generic name like event_tree_writer
for this class. It is doing a very specific thing. It writes data about the truth and reconstructed tracks. So let's call it something like: traccc::root::tracking_performance_file_writer
. (I'm very open to a better name. My point is just to give it a little more concrete of a name.)
Then... I am on board with the general API of the current traccc::event_tree_writer
class. But its implementation is unnecessarily complicated. Just make traccc::details::event_tree_writer_data
(or whatever you rename it to) do the heavy lifting itself. There's no need for an extra layer of classes under that data class. It can just be the "data class", which itself would both hold the primitive variables that the output TTree
is written with, and the code that deals with the TTree
.
The "cache concept" for this writer is just not necessary. 🤔
But sure, with a better name, and some simplification, I'm very open to adding this to the project.
Thanks for the comments! I simplified the code now with different name |
This PR adds an event tree writer to records the value of various properties (truth particle information, fitting information, etc.)
One of the motivations is to compare the fitted momentum distribution between CPU and GPU:
In this PR, I only added trees for truth particle information and fitting results. We can add more in the future if necessary