Skip to content

Conversation

@lubynets
Copy link
Contributor

Major change:
Before SimpleCut comparison (== operator) was done in the following way: if their names and lists of variables coincide the SimpleCuts are assumed to be equal. And the logic of the SimpleCut implemented in the function object (lambda function) was not compared. It lead to a bug when using AnalysisTreeQA package: because of false equality of Cuts the histograms supposed to be built with different cuts were built with the same - that one which was declared first.
Now this issue is partially addressed in the following way:
each SimpleCut created as EqualsCut or RangeCut has a hash generated from concatenation of its name, list of variables and numbers to be cutted. If two SimpleCuts have different hashes they are assumed non-equal. However if the SimpleCut is initialized with lambda function, its unique hash cannot be evaluated, therefore any pair of SimpleCuts initialized with lambdas are assumed not equal (unless they are in the same memory place). From the considerations expressed above (about AnalysisTreeQA package) it is less critical to identify cuts false non-equal than false-equal.

Minor changes:

  1. Added functions to HelperFunctions.hpp
  2. Added tests for SimpleCut, covering issues discussed above
  3. Printed out the list of files in the filelist when initializing AnalysisTree::Chain

@lubynets lubynets merged commit 4a5a25e into HeavyIonAnalysis:master Feb 28, 2025
4 checks passed
@lubynets lubynets deleted the helperFunctions branch February 28, 2025 15: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.

1 participant