Add all-event-weights functor and pp_hhh example analysis - #523
Draft
ZeynepEdaCabukoglu wants to merge 6 commits into
Draft
Add all-event-weights functor and pp_hhh example analysis#523ZeynepEdaCabukoglu wants to merge 6 commits into
ZeynepEdaCabukoglu wants to merge 6 commits into
Conversation
kjvbrt
reviewed
Jul 21, 2026
| //constructor runs whenever a new GetWeightByName object is created | ||
| const std::string& requestedWeightName, | ||
| // type of the file is string since inputFile is not the file’s contents. It is the path/name used to locate the file. Then PODIO uses that string path to open the actual EDM4hep ROOT file | ||
| const std::string& inputFile) |
Contributor
There was a problem hiding this comment.
The analyzer (struct) does not have access to the input file, it can only see the collections provided by the datasource.
kjvbrt
reviewed
Jul 21, 2026
|
|
||
|
|
||
| //get the list of labels from metadataFrame | ||
| auto weightNames = |
Contributor
There was a problem hiding this comment.
The way I understand it, this would be the job of the DataSource to pick up and add a this collection to the make it available among other regular collections.
Contributor
|
hi @ZeynepEdaCabukoglu, nice work :) Can you cut down a bit on the number of comments? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This draft PR adds a
pp_hhhevent-weight example adapted from the existingFCCAnalyses datasource example, together with a
Definitions.hheader.It includes two functors:
GetAllWeights, which returns all numerical weights stored in theEventHeader.GetWeightByName, which uses theEventWeightNamesmetadata exposed bypodio::DataSource, resolves the requested label to an index, and returnsthe corresponding weight for each event.
GetAllWeightswas initially tested successfully on 1,000 events. Bothfunctors were then tested on the five-event
pp_hhhsample.The implementation was also validated on the updated 10,000-event
pp_hhhsample containing
EventWeightNamesmetadata. Therwgt_4result matchesevent_weights[4]for every tested event.The implementation depends on a corresponding modification to
podio::DataSourcethat exposes file-level metadata to RDataFrame. A separatedraft PR against PODIO will be opened for discussion.