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

Merge development changes from Nov-Dec 2020 #27

Merged
merged 34 commits into from
Jan 6, 2021
Merged

Merge development changes from Nov-Dec 2020 #27

merged 34 commits into from
Jan 6, 2021

Conversation

lcorcodilos
Copy link
Owner

No description provided.

@lcorcodilos lcorcodilos changed the title dev Merge development changes from Nov-Dec 2020 Jan 4, 2021
@lcorcodilos
Copy link
Owner Author

lcorcodilos commented Jan 4, 2021

Change log

Collection of changes made from mid-November through December 2020. Highlights are the weight column calculation fix and improved C++ argument matching.

Setup/install

None

Analyzer

  • Add ObjectFromCollection() method that creates a subcollection but for just one object in the originating collection.
  • Fix the correction/weight collection so that only parent nodes are considered in the weight calculation for a node tree. In other words, if the node/processing tree has split, weights calculated in branch A should not affect those in branch B but they should share any weights calculated before the branches diverged.
    --- If one has separate branches, each one needs to have the MakeWeightCols() method called. Default called on ActiveNode but can take other nodes as input. With this in mind, the method also now takes a name to name a group of weights so that duplicate nodes are not created on the separate branches.
    --- Changes for this happened in __checkCorrections() (traversing up the tree), Node class (add back parent attribute), MakeWeightCols() (the naming)
  • Improved C++ argument matching when building a correction.
    --- Will now check against active node columns and not just the base node.
    --- Correction.MakeCall() changed to take a dict as input instead of a list. Keys are the C++ method argument names (as written in the C++ file) and values are the names of the RDataFrame columns that you'd like to use as function arguments. If there are arguments in the C++ method that are not in the dict, TIMBER will automatically try to determine if it matches a column name and will use that when building the call to the C++ method.
  • Added Range() method to analyzer and Node classes to select a subset of data to analyzer. Docs include warning to not use this with ROOT.EnableImplicitMT()

Tools

  • Add function GetStandardFlags() to return list of standard MET filter flags. Used as default flagList for GetFlagString().
  • Change cut and not option defaults in TrigTester.py.
  • Consolidated Cutflow* functions and added "initial" count to be included when producing the cutflow.

Modules

  • Staging JetSmearer.h, JetRecalib.h, fatJetUncertainties.cc, and JetMETinfo.h (includes commented-out bit in common.h)
  • Change Trigger_weight.cc default plateau to -1

Pythonic.h

  • Create Pythonic namespace.
  • Add header guards.
  • Add IsDir() and Execute() functions.
  • Updated naming so all functions are capitalized

Data

None

Testing

  • Fix tests so AddCorrections() changes work.
  • Fix test_Common.py so it works. Add in actual tests for Cutflow* functions.
  • Add test for Range()

More documentation

  • Changed error for multiple nodes of the same name to a warning.
  • Add transparent logo.
  • Example 1 (examples/ex1.py) now includes example of using Range() and explains to not use ROOT.EnableImplicitMT().

Issues that were addressed

  • Return ActiveNode with SubCollection method.
  • When providing a dict to Node.SetChildren(), the code was checking if the keys of the dict were of type Node. Fixed to check the dict values.
  • In C++ modules, switch int to size_t in for loops.
  • Fix "Library compiling doesn't play nice with periods in TIMBERPATH"
  • Fix TIMBER/data/README.md
  • Implement corr Correction type deduction
  • Fix CompareShapes() so that it works with empty bkgs, signals, and colors correctly.
  • Allow for default arguments when doing C++ clang parsing and automatic calls to correction methods.

@lcorcodilos lcorcodilos linked an issue Jan 4, 2021 that may be closed by this pull request
@lcorcodilos lcorcodilos linked an issue Jan 5, 2021 that may be closed by this pull request
@lcorcodilos lcorcodilos linked an issue Jan 5, 2021 that may be closed by this pull request
@lcorcodilos lcorcodilos linked an issue Jan 5, 2021 that may be closed by this pull request
@lcorcodilos lcorcodilos merged commit d8e2ffa into master Jan 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant