Skip to content
18 changes: 16 additions & 2 deletions _episodes/04-higgs-search.md
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ ax.hist(branches["data_A"]["m4l"])
{: .output}

![m4lep_histogram_1]({{ page.root }}/fig/m4lep_histogram_1.png)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's keep the empty line here to separate things.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done, I have restored the empty line after the image link to maintain proper spacing.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's still not empty. There's a >

>
> ## Exercise
>
> Make the histogram of the variable `m4l` for sample `mc_363490.llll`.
Expand Down Expand Up @@ -402,14 +402,24 @@ for k in range(0, 3):
~~~
{: .output}

And then make a plot, actually, let's make 2 plots, with matplotlib we can add sub-plots to the figure, then, we will be able to compare the MC distribution without and with weights.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the comma should stay

And then make a plot, actually, let's make 2 plots, with matplotlib we can add sub-plots to the figure, then we will be able to compare the MC distribution without and with weights.

```python
var_name = "m4l"
units = " [GeV]"
ranges = [[80, 170]]
bins = 24
```
> ##Python Unpacking & Physics Logic
>
> In the code `fig, (ax_1, ax_2) = plt.subplots(1, 2)`, we use 'tuple unpacking'.
> This is a very common pattern in Python when a function returns multiple values.
> Here, `subplots` returns a figure object and an array of axes. We "unpack" them
> into two separate variables, `ax_1` and `ax_2`, so we can plot different
> distributions side-by-side.
{: .callout}



```python
fig, (ax_1, ax_2) = plt.subplots(1, 2)
Expand Down Expand Up @@ -497,6 +507,10 @@ ax.legend(fontsize=18, frameon=False)
```

![m4lep_histogram_5]({{ page.root }}/fig/m4lep_histogram_5.png)

>

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's also remove the > here. And let's just leave one empty line.



> ## Exercise
>
> Modify a bit the previous code to include the ticks and text, in the text and axis labels use latex to achieve the final plot.
Expand Down