Skip to content

Commit

Permalink
bringing benchmarks up-to-date + some minor clarifications
Browse files Browse the repository at this point in the history
  • Loading branch information
Matous Adamec committed Jul 17, 2020
1 parent d7c3700 commit 5d01770
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Coffea Benchmarks
This repository offers solutions to the benchmarks listed [here](https://github.com/iris-hep/adl-benchmarks-index) completed in [Coffea](https://github.com/CoffeaTeam/coffea).

The input data file is: root://eospublic.cern.ch//eos/root-eos/benchmark/Run2012B_SingleMu.root
As of 7/17/2020, I have updated all files in benchmarks/, adding some clarity, simpler solutions, and NanoEvents support. NanoEvents is what you should be using for most Coffea analyses, especially if they involve NanoAODs, but I have left the old method of constructing JaggedCandidateArrays to access data in the oldbenchmarks/ folder for reference, just in case. The oldbenchmarks/ folder has not been significantly updated; if you are learning Coffea, use benchmarks/!

The solutions in the benchmarks/ folder are in response to the list linked above:

Expand All @@ -25,6 +25,6 @@ The solutions in the oldbenchmarks/ folder are in response to an older set of be
7. Plot the sum of the pT of jets with pT > 30 GeV that are not within 0.4 from any lepton with pt > 10 GeV (looping over two collections)
8. For events with exactly three leptons and a same-flavor opposite-sign lepton pair, find the same-flavor opposite-sign lepton pair with the mass closest to 91.2 GeV and plot the transverse mass of the missing energy and the leading other lepton.

Note that for exercise 8, the n = 3 leptons case is fairly straightforward, whereas the n >= 3 leptons case is currently far more complicated and requires the usage of numba. Both solutions have been provided, with the former in oldbenchmarks/ and the latter in benchmarks/.
Note that for exercise 8, things get a little more complicated as we deal with cross-lepton pairs. A columnar solution to this exists, where we construct a new 'stacked' array of muons and electrons: leptons. This solution is now implemented in benchmarks/. An event loop solution exists and is implemented in the oldbenchmarks/ version, for purposes of comparison. I think you will find the columnar approach to be much nicer!

I have sought to provide detailed explanations for how each of these things is done in Coffea. Therefore, a lot of the code has verbose comments, which I hope are more helpful than they are distracting!

0 comments on commit 5d01770

Please sign in to comment.