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 functionality to use arbitrary number of friend trees #230

Merged
merged 18 commits into from
Sep 7, 2023

Conversation

harrypuuter
Copy link
Member

@harrypuuter harrypuuter commented Aug 28, 2023

Before, only a CROWN ntuple could be used as input for friend trees. With this PR, a separate template is used for friend trees executables, which allows to use an arbitrary amount of friend files to be used. This is important e.g. for the generation of NN outputs

./executable outputfile.root crown_ntuple.root friend_1.root friend_2.root friend_3.root

During the cmake build step, the quantitiesmaps for each file have to be provided as a comma-separated list using the -DQUANTITIESMAP (providing either a ROOT file or a json file)

cmake .. -DANALYSIS=unittest -DCONFIG=unittest_friends_2 -DSAMPLES=dyjets -DERAS=2018 -DSCOPES=mt -DSHIFTS=all -DQUANTITIESMAPS=/path/to/crown_ntuple.root,/path/to/friend_1.root,/path/to/friend_2.root,/path/to/friend_3.root  -DDEBUG=false

In addition, this PR fixes some issues with friend trees:

  • Incorrect treatment of shift propagation, now shifts are appropriately set and only required shifts are executed
  • Validation of input files. How a scan of all required inputs is performed, catching potential misconfiguration before compilation.

@harrypuuter
Copy link
Member Author

harrypuuter commented Aug 28, 2023

Done: add unittest for this case

Copy link
Contributor

@ralfschmieder ralfschmieder left a comment

Choose a reason for hiding this comment

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

works fine!

self.input_quantities_mapping = self._readout_input_information(
input_information
input_information_list
)
# all requested shifts are stored in a seperate varaiable,
Copy link
Contributor

Choose a reason for hiding this comment

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

variable

@harrypuuter harrypuuter merged commit a9545d2 into main Sep 7, 2023
7 checks passed
@harrypuuter harrypuuter deleted the generic_friends branch September 7, 2023 12:03
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.

None yet

2 participants