Python Exercise 6: Plotting a derived variable (10 minutes)

Revise to make a histogram of the variable pt. Don’t forget to label the axes; remember that the momenta are in GeV.


If you want to figure out what the bin limits of the histogram should be, I’ll permit you to “cheat” and use the following command interactively:

tree1.Draw("sqrt(px*px + py*py)")