Coffea Benchmarks
This repository offers solutions to the benchmarks listed here completed in Coffea.
The solutions in the benchmarks/ folder are in response to the list linked above:
- Plot the missing ET of all events.
- Plot pT of all jets in all events.
- Plot pT of jets with |η| < 1.
- Plot the missing ET of events that have at least two jets with pT > 40 GeV.
- Plot the missing ET of events that have an opposite-sign muon pair with an invariant mass between 60 and 120 GeV.
- Plot pT of the trijet system with the mass closest to 172.5 GeV in each event and plot the maximum b-tagging discriminant value among the jets in the triplet.
- Plot the sum of pT of jets with pT > 30 GeV that are not within 0.4 in ΔR of any lepton with pT > 10 GeV.
- For events with at least 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.
The solutions in the oldbenchmarks/ folder are in response to an older set of benchmarks, namely:
- Plotting the Missing ET (or any event level variable).
- Plotting the Jet pT (or any variable that is a per-event array).
- Plotting the Jet pT for jets that have an jet pT > 20 GeV and abs(jet eta) < 1.0
- Plotting the Missing ET for jets with at least 2 jets with Jet pT > 40 and abs(jet Eta) < 1.0
- Plot the opposite-sign muon pair mass for all combinations of muons
- Plot the Missing ET for events that have an opposite-sign muon pair mass in the range 60-120 GeV (double loop over single collection, math)
- 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)
- 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/.
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!