Skip to content

Commit

Permalink
fix timings, 04 divs?
Browse files Browse the repository at this point in the history
  • Loading branch information
Julie Hogan committed Jul 2, 2024
1 parent 93128a9 commit d0e9708
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 4 deletions.
13 changes: 13 additions & 0 deletions episodes/04-root-and-cpp-fill-a-histogram.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ to the file, and then close the output file.
The final version of `fill_histogram.cc` will look like this:

:::::::::::::::::::::::::: spoiler

Check warning on line 77 in episodes/04-root-and-cpp-fill-a-histogram.md

View workflow job for this annotation

GitHub Actions / Build Full Site

check for the corresponding close tag

## Source code for `fill_histogram.cc`

```cpp
Expand Down Expand Up @@ -231,21 +232,28 @@ root [1] TBrowser b;
You should see the `TBrowser` pop up!

:::::::::::::::::::: callout

Check warning on line 234 in episodes/04-root-and-cpp-fill-a-histogram.md

View workflow job for this annotation

GitHub Actions / Build Full Site

check for the corresponding close tag

## TBrowser

![](fig/tbrowser_screenshot_00.png)

::::::::::::::::::::

If we double click on `output.root`, in the left-hand menu and then the `h1;1` that appears below it, we
should see the following plot appear!

:::::::::::::::::::: callout

Check warning on line 245 in episodes/04-root-and-cpp-fill-a-histogram.md

View workflow job for this annotation

GitHub Actions / Build Full Site

check for the corresponding close tag

## Inspecting the ROOT file contents

![](fig/tbrowser_screenshot_01.png)

::::::::::::::::::::

Quit ROOT by choosing the “Quit Root” option from Browser menu of the TBrowser window or by typing `.q` in the ROOT prompt.

:::::::::::::::::::::::::: challenge

Check warning on line 255 in episodes/04-root-and-cpp-fill-a-histogram.md

View workflow job for this annotation

GitHub Actions / Build Full Site

check for the corresponding close tag

## Work assignment: investigating data in ROOT files

In the previous episode you generated a file called `tree.root`. It has some variables which were stored in a TTree called `t1`. Let's explore the variables contained in this tree by using one of the methods available for TTree objects. You can find out more about these methods directly from the [ROOT TTree class documentation](https://root.cern.ch/doc/master/classTTree.html).
Expand All @@ -266,6 +274,7 @@ root [1] t1->Print()
Please copy the output this statement generates and paste it into the corresponding section in our [assignment form](https://docs.google.com/forms/d/e/1FAIpQLSdxsc-aIWqUyFA0qTsnbfQrA6wROtAxC5Id4sxH08STTl8e5w/viewform); remember you must sign in and <strong style="color: red;">click on the submit button</strong> in order to save your work. You can go back to edit the form at any time.
Then, quit ROOT.
::::::::::::::::::::::::::::::::
## Using a ROOT script
Expand Down Expand Up @@ -303,6 +312,7 @@ we "change directory" to the canvas and draw our histogram. We can even save it
Your `fill_histogram_SCRIPT.C` should look like this:
:::::::::::::::::::::::::: spoiler

Check warning on line 314 in episodes/04-root-and-cpp-fill-a-histogram.md

View workflow job for this annotation

GitHub Actions / Build Full Site

check for the corresponding close tag
## Source code for `fill_histogram_SCRIPT.C`
```cpp
Expand Down Expand Up @@ -396,8 +406,11 @@ root -l fill_histogram_SCRIPT.C
You'll be popped into the CINT environment and you should see the following plot pop up!

::::::::::::: callout

Check warning on line 408 in episodes/04-root-and-cpp-fill-a-histogram.md

View workflow job for this annotation

GitHub Actions / Build Full Site

check for the corresponding close tag

## TBrowser

![](fig/h_pt.png)

::::::::::::

Exit from the container. If you are using a container with VNC, first stop VNC with `stop_vnc`.
Expand Down
4 changes: 2 additions & 2 deletions episodes/06-uproot.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: "Using uproot to open ROOT files"
teaching: 10 min
exercises: 10 min
teaching: 10
exercises: 10
---

::::::::::: questions
Expand Down
4 changes: 2 additions & 2 deletions episodes/07-awkward.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: "Using awkward arrays to analyze HEP data"
teaching: 10 min
exercises: 10 min
teaching: 10
exercises: 10
---

:::::::::::: questions
Expand Down

0 comments on commit d0e9708

Please sign in to comment.