Introduce a new executable supporting user-defined event skims
Motivation
We want to combine two dataset with no overlapping phase space. So a tool is need to allows analysts to quickly test different selection criteria without modifying and recompiling the code.
Summary
This merge request implements a generic event-level selection mechanism based on user-defined cuts using TTreeFormula
.
The input cut expression can be written in the same format as used in TTree::Scan
, e.g., recJets[0].CorrPt() < 80 && @recJets.size() > 2
.
Improve exception handling. Some foreseeable errors may occur
segmentation violation:recJets[4]<40
while there are only 3 jets in the eventsUnknown branch or syntax error
This version is just a quick prototype and currently only supports simple expressions like recJets[0].CorrPt() < 80
.
Feel free to share any suggestions or feature requests.
Edited by Zhiyong Ye