lce-mail<EMAIL_ADDRESS>ace-mail:
<EMAIL_ADDRESS>cke-mail<EMAIL_ADDRESS>gme-mail:
<EMAIL_ADDRESS>sme-mail<EMAIL_ADDRESS>fpe-mail:
<EMAIL_ADDRESS>dre-mail<EMAIL_ADDRESS>are-mail:
<EMAIL_ADDRESS>gse-mail<EMAIL_ADDRESS>
11institutetext: Dipartimento di Fisica, Università di Pavia, Via A. Bassi 6,
27100 Pavia, Italy 22institutetext: INFN, Sezione di Genova, Via Dodecaneso
33, 16146 Genova, Italy 33institutetext: H.H. Wills Physics Laboratory,
University of Bristol, Tyndall Avenue, Bristol BS8 1TL, UK 44institutetext:
Dipartimento di Fisica, Università di Genova, Via Dodecaneso 33, 16146 Genova,
Italy 55institutetext: INFN, Sezione di Pavia, Università di Pavia, Via A.
Bassi 6, 27100 Pavia, Italy 66institutetext: Physik-Institut, Universität
Zürich, Wintherturerstrasse 190, CH-8057 Zürich, Switzerland

# Tagging the Higgs boson decay to bottom quarks with colour-sensitive
observables and the Lund jet plane

Luca CavallinipaviaUNI,lc  Andrea CoccarogenovaINFN,ac  Charanjit K.
KhosaBristolUni,genovaUNI,genovaINFN,ck  Giulia MancopaviaUNI,paviaINFN,gm
Simone MarzanigenovaUNI,genovaINFN,sm  Fabrizio ParodigenovaUNI,genovaINFN,fp
Daniela RebuzzipaviaUNI,paviaINFN,dr  Alberto ResciapaviaUNI,ar  Giovanni
Stagnittozurich,gs

(ZU-TH 50/21)

###### Abstract

We study the problem of distinguishing $b$-jets stemming from the decay of a
colour singlet, such as the Higgs boson, from those originating from the
abundant QCD background. In particular, as a case study, we focus on associate
production of a vector boson and a Higgs boson decaying into a pair of
$b$-jets, which has been recently observed at the LHC. We consider the
combination of several theory-driven observables proposed in the literature,
together with Lund jet plane images, in order to design an original $Hbb$
tagger. The observables are combined by means of standard machine learning
algorithms, which are trained on events obtained with fast detector simulation
techniques. We find that the combination of high-level single-variable
observables with the Lund jet plane provides an excellent discrimination
performance. We also study the dependence of the tagger on the invariant mass
of the decaying particles, in order to assess the extension to a generic $Xbb$
tagger.

††journal: Eur. Phys. J. C

##  1 Introduction

Since the discovery of the Higgs boson at the Large Hadron Collider (LHC) by
the ATLAS 1207.7214 and CMS 1207.7235 experiments in 2012, our understanding
of the properties of this particle has progressively evolved. In addition to
the “golden” decay modes of the Higgs boson, $H\rightarrow\gamma\gamma$ and
$H\rightarrow 4l$, in the past few years other decay channels have been
observed, usually in association with particular production modes. For
instance, due to its large branching ratio, the $H\rightarrow b\overline{b}$
decay plays a central role in studies that aim at probing the structure of the
Higgs couplings to the fermions. In this regard, one of the most interesting
processes is the associated production of a Higgs boson $H$ and a vector boson
$V$ ($W$ or $Z$), with the vector boson decaying leptonically and the Higgs
boson decaying hadronically into a pair of $b$-quarks,
$V(l\bar{l})H(b\bar{b})$: the decay products of the vector boson provide us
with a clean experimental signature, as well as a recoil system for the Higgs
particle. Both ATLAS and CMS experiments have reported the observation of the
$H\rightarrow b\overline{b}$ decay and of the $VH$ production mode 1808.08238
; 1808.08242 and the ATLAS experiment reported the first cross-section
measurements 1903.04618 ; ATLAS:2019yhn ; ATLAS:2020fcp ; ATLAS:2020jwz
targeting different regimes of reconstructed transverse momenta of the vector
boson and in fiducial volumes, as defined by the simplified template cross-
section framework Berger:2019wnu . The experimental focus is therefore
shifting towards precision measurements of the kinematics of the $H\rightarrow
b\overline{b}$ decay channel and, as suggested in Ref. Brehmer:2019gmn ,
additional differential information, and hence discrimination of this process
against sources of backgrounds, is crucial for the sensitivity to beyond-the-
Standard-Model operators. After the fragmentation and hadronisation process,
the hard $b$-quarks produced by the Higgs boson decay are usually detected as
two separate $b$-jets ATLAS:2019bwq ; CMS:2017wtu . In simulation, a $b$-jet
is defined by a suitable particle-level observable, based on the angular
distance of $B$-hadrons with respect to the jet axis, or by ghost association
Cacciari:2008gn ; ATLAS:2013bqs . On real data, $b$-jets are identified by
means of dedicated $b$-tagging algorithms.

In order to make the most out of the large set of accumulated data, strategies
to better discriminate the $H(b\bar{b})$ process over the large QCD background
(where the pair of $b$-quarks is produced by pure strong interaction, mostly
by $g(b\bar{b})$ collinear splitting) are being actively developed. The
signal/background discrimination is especially compelling in the boosted
regime, when the transverse momentum of the jets is much greater than their
invariant mass: in such a situation, the $b$-quarks may be close in angle, and
hence reconstructed as a single jet. Since the seminal work of Ref.
Butterworth:2008iy , several jet substructure techniques— which aim to improve
the discrimination performance by finding hard prongs inside a large radius
jet — have been designed, tested and implemented in the analyses by the
experimental collaborations (see, for instance Ref. Marzani:2019hun and
references therein). Broadly speaking, two main strategies exist: design high-
level theoretically-motivated observables, sensitive to particular features of
the signal distribution, which can be measured on data and used as single-
variable discriminant; or produce some low-level representation of the jets
(list of particles, calorimetric images,…), to be used as input for machine
learning (ML) techniques. We refer the reader to the recent literature about
ML based approaches for $H\rightarrow b\bar{b}$ tagging Datta:2019ndh ;
Lin:2018cin ; Moreno:2019neq ; Chakraborty:2019imr ; Sirunyan:2020lcu ;
Chung:2020ysf ; Tannenwald:2020mhq ; guo2020boosted ; Abbas:2020khd ;
Jang:2021eph ; Khosa:2021cyk , which is continuously being updated in Ref.
hepmllivingreview .

Our case of interest is particularly challenging because both signal and
background feature a similar flavoured two-prong structure. However, the two
processes have a different behaviour with respect to the QCD radiation
pattern. Namely, in the signal case, the $b$-jets originate from the decay of
a colour singlet, and thus radiation will be mostly contained within the two
$b$-quark system. Instead, in the background case, we expect QCD radiation to
be more diffuse, due to colour connections with the rest of the event.
Therefore, we would like to exploit observables that are particularly
sensitive to the colour flows in the event. In this paper we select several
theory-driven single-valued observables (see Sect. 2) and a theoretically-
motivated representation of a jet (specifically, the Lund jet plane
Dreyer:2018nbf ) and build a combined $Hbb$ tagger, with the aim to exploit
the best of both strategies. Such a combination is performed by means of
standard ML algorithms, for different input choices. We use boosted decision
trees (BDT) for single-valued observables and convolutional neural networks
(CNN) for Lund jet images. BDTs have been part of HEP analyses for a long time
Yang:2005nz . CNNs are showing promising potential for image based data sets
for various applications in HEP see e.g. Khosa:2020qrz ; Khosa:2019qgp ;
Khosa:2019kxd . Moreover, in our analysis we account for the experimental
detection and reconstruction of the physical quantities of interest by
performing a fast detector simulation on the generated Monte Carlo events, and
we assess the impact of these so-called detector effects on individual
variable distributions and on the overall performance of the tagger. Finally,
in an ideal scenario we would like to apply the same tagger for the decay
products of a generic colour singlet $X$, without any prior knowledge on the
value of its mass, so as to design a global $Xbb$ tagger. In this view, it
would be desirable to keep the tagger uncorrelated with the invariant mass of
the $b$-quark pair, in order to ease its calibration on $Z$+jet events and to
simplify the determination of the non-resonant background shape in data-driven
approaches.

The paper is organised as follows. In Sect. 2 we briefly introduce the colour
sensitive observables under study and the Lund jet plane. In Sect. 3 we
discuss the event generation set-up and the selection cuts adopted in our
analysis. In Sect. 4 we study the individual distributions of the colour
sensitive observables and the output of the Lund jet plane CNN for the signal
and the background processes, before and after detector simulation. Moreover,
we assess the discrimination performance of the combination of several
observables, by also including the Lund jet plane CNN output as an additional
input. In Sect. 5 we discuss the BDT dependence on the invariant mass of the
large radius jet used in the analysis (see Sect. 3), to determine the mass
bias of our $Hbb$ tagger. Finally, in Sect. 6 we draw our conclusions.

##  2 Description of the observables

We make use of high-level colour sensitive variables introduced in the
literature in the past few years: jet pull and its projections, namely the
pull angle, $\theta_{p}$ Gallicchio:2010sw ; Larkoski:2019urm , and the
parallel and perpendicular components of the pull vector, $t_{\parallel}$ and
$t_{\perp}$ Bao:2019usu ; Larkoski:2019fsm ; the colour ring $\mathcal{O}$
Buckley:2020kdp ; $D_{2}$ Larkoski:2014gra ; Moult:2016cvt and the Lund jet
plane Dreyer:2018nbf . We limit ourselves to a brief introduction of the
relevant variables, and we refer the interested reader to the original papers.

###  2.1 Jet pull

Let us consider a hard jet $J_{a}$. The pull vector $\vec{t}$ is the jet shape
observable that is defined as

$\vec{t}=\frac{1}{p_{Ta}}\sum_{i\in J_{a}}p_{Ti}|\vec{r}_{i}|^{2}\hat{r}_{i},$
(1)

where $p_{T_{a}}$ is the transverse momentum of the jet, and the sum runs over
all the jet constituents. $y$ and $\phi$ represent rapidity and azimuthal
angle, and $\vec{r}_{i}$ is the distance vector between the jet axis and its
$i$-th constituent in the $y$-$\phi$ plane

$\vec{r}_{i}=(y_{i}-y_{a},\phi_{i}-\phi_{a}).$ (2)

The pull vector is sensitive to the different colour connections of the entire
event in which the jet is formed. If we consider events with two hard jets (or
subjets) $J_{a}$ and $J_{b}$ that originate from the decay of a colour
singlet, additional QCD radiation tends to be emitted between the two jets,
causing the pull vector of $J_{a}$ to point in the direction of $J_{b}$ and
vice-versa. If instead the two jets originate from the decay of a colour
octet, such as the gluon, then the pull vectors will instead tend to point in
different directions.

In order to make these considerations more quantitative, we can introduce
suitable projections of the pull vector $\vec{t}$ along two directions: the
one given by the unit vector which points from the centre of $J_{a}$ to the
centre of $J_{b}$

$t_{\parallel}=\vec{t}\cdot\hat{n}_{\parallel},\quad\text{with}\quad\hat{n}_{\parallel}=\frac{1}{\sqrt{\Delta
y^{2}+\Delta\phi^{2}}}\left(\Delta y,\Delta\phi\right),$ (3)

and the other generated by the unit vector perpendicular to
$\hat{n}_{\parallel}$

$t_{\perp}=\vec{t}\cdot\hat{n}_{\perp},\quad\text{with}\quad\hat{n}_{\perp}=\frac{1}{\sqrt{\Delta
y^{2}+\Delta\phi^{2}}}\left(-\Delta\phi,\Delta y\right),$ (4)

where in the above equations we have introduced $\Delta y=y_{a}-y_{b}$ and
$\Delta\phi=\phi_{a}-\phi_{b}$. We also consider $\theta_{p}$, known as the
pull angle, defined as

$\theta_{p}=\arccos\frac{t_{\parallel}}{|\vec{t}|}.$ (5)

Of all the variables built out of the jet pull vector, the pull angle has been
shown to be one of the most effective discriminants of the two different
colour configurations Gallicchio:2010sw . However, the comparison between
experimental measurements of the pull angle and theoretical calculations has
shown that this observable is not under good theoretical control D0:2011lzz ;
ATLAS:2015ytt ; ATLAS:2018olo . This problem can be traced back to the fact
that $\theta_{p}$ is not infra-red and collinear (IRC) safe, but only Sudakov
safe Larkoski:2019urm (for discussions about Sudakov safety, see Refs.
Larkoski:2013paa ; Larkoski:2014wba ; Larkoski:2015lea ). Instead,
$t_{\parallel}$ and $t_{\perp}$ _are_ IRC safe observables, so it is
interesting to assess whether individually or in some combination
$t_{\parallel}$ and $t_{\perp}$ possess the same discriminating power of its
non IRC safe counterpart. It is also interesting to study how the
discriminating power of the pull vector variables is affected when combining
the variables for both jets $J_{a}$ and $J_{b}$. Thus, we will include all the
three pull vector variables, for both jets $J_{a}$ and $J_{b}$, as input to
the ML algorithms. Furthermore, although $\theta_{p}$ is not IRC safe, it is
also included.

Finally, we note that there is potential overlap in including both
$t_{\parallel}$, $t_{\perp}$ and $\theta_{p}$ because the jet pull is only a
two-component vector. However, this is not an issue, since the machine
learning algorithms are trained to be robust against interdependence between
input variables.

###  2.2 Jet colour ring

The jet colour ring was introduced in Ref. Buckley:2020kdp , as an observable
that is provably optimal, in certain kinematic limits. The starting point of
its construction is the observation that, according to the Neyman-Pearson
lemma, the ratio of the matrix elements squared for the signal and the
background process should be monotonic to the optimal single-variable
discriminant Neyman:1933wgr . When considering a decay of a colour singlet as
signal and a colour octet as background, with a subsequent gluon emission in
the boosted regime, and working in the soft-collinear limit approximation, the
ratio simplifies to

$\frac{|\mathcal{M}_{S}|^{2}}{|\mathcal{M}_{B}|^{2}}\simeq\frac{\theta_{ak}^{2}+\theta_{bk}^{2}}{\theta_{ab}^{2}}\,,$
(6)

where the indices $a$ and $b$ refer to the hard partons, the index $k$ to an
additional (gluon) emission, and $\theta_{ij}$’s are the angles between them.
The above considerations lead to the definition of the jet colour ring

$\mathcal{O}=\frac{\Delta_{ak}^{2}+\Delta_{bk}^{2}}{\Delta_{ab}^{2}},$ (7)

where now $\Delta_{ij}$ are distances between jets (or subjets) in the
azimuth-rapidity plane. The observable name originates from its geometric
interpretation: radiation from colour singlets will tend to fall between the
two jets, leading to values of $\mathcal{O}<1$, while in the case of colour
octets, we will tend to have $\mathcal{O}>1$.

###  2.3 $D_{2}$

The variable $D_{2}$ Larkoski:2014gra is defined as the ratio of two
normalized $N$-point energy correlation functions (ECFs) Larkoski:2013eya ,
$e_{k}^{\beta}$:

$D_{2}^{(\beta)}=\frac{e_{3}^{(\beta)}}{(e_{2}^{(\beta)})^{3}},$ (8)

where $\beta$ is a parameter which we have set to $\beta=2$. The variable is
usually calculated on a large radius jet, and is useful to discriminate
2-prong jets from 1-prong jets. Furthermore, because of its sensitivity to
soft radiation at wide angles, $D_{2}$ also probes colour correlations and it
is therefore useful to disentangle different colour configurations. However,
we note that $D_{2}$ retains a correlation with the mass of the large radius
jet; this may be a problem when designing a tagger free of any mass bias, see
for instance Dolen:2016kst . We will come back to this aspect in Sect. 5.

###  2.4 Lund jet plane

The Lund jet plane is a theory-inspired representation of a jet Dreyer:2018nbf
. It is formed parsing backwards the Cam-bridge-Aachen (C/A) Dokshitzer:1997in
; Wobisch:1998wt clustering history of the jet. The procedure starts by
undoing the final clustering step and by recording the kinematics of the
splitting. The primary Lund jet plane is obtained by iterating the above
procedure, always following the hardest branch in each splitting and recording
the azimuth-rapidity separation of the branches involved in the splitting and
the relative transverse momentum of the emission. The Lund jet plane has been
exploited in the context of vector boson Dreyer:2018nbf , top Dreyer:2020brq
and Higgs Khosa:2021cyk tagging. Furthermore, it has been successfully
measured at ATLAS ATLAS:2020bbn and first-principle theoretical predictions
have been performed in Ref. Lifson:2020gua .

##  3 Event simulation and selection

We generate about 300k events for the $pp\rightarrow
H(b\overline{b})Z(\nu_{\ell}\overline{\nu}_{\ell})$ signal and 4M events for
the $pp\rightarrow b\overline{b}\nu_{\ell}\overline{\nu}_{\ell}$ background
processes, so as to have about 50k events remaining after all analysis cuts,
in accordance with Table 1, as will be detailed below. In case of signal,
$b\overline{b}$ pair is produced from the decay of the Higgs boson, while it
comes mainly from QCD interaction in case of background. Fig. 1(a) and Fig.
1(b) show representative Feynman diagrams for the signal and the background
processes, respectively.

(a) Signal

(b) Background

Figure 1: Representative Feynman diagrams.

We generate hard events using MG5_aMC@NLO v2.8.3.2 Alwall:2014hca , by
imposing a 200 GeV cut on the $p_{T}$ for the neutrino pair in the final
state. This is done to ensure that the events generated are firmly in the
boosted regime. These parton-level events are subsequently showered in Pythia
v8.305 Sjostrand:2014zea , including MPI and underlying events, to produce
particle-level events.

Finally, rather than simulating an entire detector, Delphes v3.5.0 is used to
perform a fast detector simulation Ovyn:2009tx ; deFavereau:2013fsa . This
allows us to understand how the discrimination power could be affected by
real-life detector effects, without having to run a computationally expensive
full simulation, which in addition is strongly detector dependent. From
Delphes, we extract both the Monte Carlo truth of the event, containing the
particle-level information, e.g. the same one would get from a perfectly
efficient detector (henceforth referred to as truth), as well as the
reconstructed events including the detector effects (henceforth referred to as
reco). The Delphes simulation is run using the ATLAS card with minor
modifications, described below, to fit our needs. For the truth case, we
consider all visible, stable particles with $p_{T}>0.5$ GeV. Instead, in the
reco case, the jets are built using the simulated calorimeter towers and
tracks. All electromagnetic calorimeter towers with energy $E>0.5$ GeV and
significance $S>2.0$ and all hadronic calorimeter towers with energy $E>1.0$
GeV and significance $S>2.0$ are considered. Tracks are required to have
$p_{T}>0.5$ GeV. Delphes uses FastJet v3.3.4 Cacciari:2011ma to perform the
jet clustering.

At this point the analysis is the same in both the truth case and the reco
case. First, the constituents are clustered into jets with radius $R=1.0$
using the anti-$k_{T}$ algorithm Cacciari:2008gp . For each event, we choose
the jet with the highest $p_{T}$ as the large radius jet. We only accept the
event if the large jet has $p_{T}>250$ GeV and $|y|<1.5$, because of the
tracking detector acceptance.

We also cluster the constituents into smaller jets with radius $R=0.2$. We
identify those jets having $\Delta R<0.8$ from the large jet, and call these
subjets. We then proceed to identify the $b$-subjets which originate from the
$b$-partons, through a process known as _b-labelling_. We do this by first
identifying the $b$-partons originating from the hard scattering in the event
record, requiring a minimum $p_{T}$ of $5.0$ GeV. For each $b$-parton, we
compute the distance between each $b$-parton and subjet; the subjet which is
closest to the $b$-parton, provided that the distance is below 0.2, is
labelled as $b$-subjet. The association between a $b$-parton and $b$-subjet is
unique.

For the event to be accepted, we require two $b$-labelled subjets with
$p_{T}>10$ GeV. The pull variables are calculated on these two $b$-labelled
subjets, and $D_{2}$ is calculated on the large jet. For the colour ring to be
defined, there must also be a third non-$b$-subjet within $\Delta R=0.8$ from
the large jet. In a majority of cases, this third jet is not present. To avoid
discarding too many events, in these cases we assign a default value of
$\mathcal{O}=-1$ to the colour ring. This allows for higher statistics, but
also provides useful information to the machine learning algorithms.

For the Lund jet plane, we consider large radius jet constituents and re-
cluster them using C/A algorithm. Considering the declustering history of this
jet, we get the primary Lund jet plane. Considering 25 $\times$ 25 pixels for
each image, we put 1 or 0 in a pixel depending on if ($\ln 1/\Delta,\ln
k_{T}$) value of the splitting falls in that pixel or not. Our implementation
of the Lund jet plane is based on the one present in fastjet-contrib
fastjetcontrib repository.

Table 1 shows the percentage of events which pass the selections in all cases
considered. The selection discards more background than signal events in both
the truth and reco cases. The most important cut is the $p_{T}$ cut on the
large radius jet, accounting for 60% of discarded events. The second most
important cut is the rapidity cut on the large radius jet which rejects 10$\%$
of the events.

Table 1: The efficiencies of the analysis after cuts are applied. | Truth | Reco
---|---|---
Signal | 20% | 17%
Background | 1.6% | 1.3%

##  4 Discrimination performance

After event selection, we are ready to evaluate observables on the selected
events. We first show in Fig. 2 the normalised distributions for the eight
colour sensitive (CS) observables introduced in Sect. 2, both for signal and
background, and at the truth and reco level. By just looking at the plots, we
can appreciate the strong discrimination power of the $\mathcal{O}$ and
$D_{2}$, which is retained at the reco level. Instead, the observables related
to the jet pull vector are more affected by detector effects: there is a
visible difference in $t_{\parallel i}$, $t_{\perp i}$ and $\theta_{pi}$, both
for the leading jet $a$ and the sub-leading jet $b$, between the truth and the
reco cases. In particular, the pull angle observables $\theta_{pa}$ and
$\theta_{pb}$ seem to be good discriminants at the truth level, but detector
effects noticeably flatten the signal distribution, hence leading to a
worsening of the discrimination power.

Figure 2: The distributions of the colour sensitive variables and Lund jet
plane after the selection cuts. Signal ($ZH(b\bar{b})$) and background
($Zb\bar{b}$) distributions are shown in red and blue, respectively, for both
truth and reco cases.

We then show in Fig. 3 the averaged Lund images for the signal and background
process, in the truth and reco cases respectively. We note that detector
effects lead to an overall decrease of the image quality, in the sense that
the distinctive features of the truth case are still present, but in the reco
case there is additional radiation for middle values of $\Delta$ and $k_{t}$
for both the signal and the background events. However, the high density patch
at large $\Delta$ and high $k_{t}$ in the case of the signal is still clearly
visible by eye also in the reco case.

Figure 3: Averaged primary Lund jet plane images for $ZH(b\bar{b})$ and
$Zb\bar{b}$ in the truth and reco case.

After having determined the distributions of the CS observables and the Lund
jet images, we now use these as inputs to ML algorithms in order to build
combined classifiers. Specifically, we train a BDT111We have also tried a
neural network, which returns similar results in all the cases analysed.
Hence, we only report results obtained with the BDT. on the CS observables,
whereas Lund images are classified using a CNN. More details about these
methods and architectures are provided in A. The output distribution of the
CNN Lund jet plane classifier (LP${}_{\text{CNN}}$) is shown in Fig. 2. In the
following, we consider also the combination of (some of) the CS and
LP${}_{\text{CNN}}$ observables, in order to improve the total discrimination
power; in such cases, we adopt a two-step procedure, by using the output of
the CNN Lund jet plane classifier as an additional input to the BDT.

In Fig. 4, we show the receiver operating characteristic (ROC) curves for
several combinations of observables. Namely, we consider all the colour
sensitive observables (CS) or just the $D_{2}$ and the colour ring
($D_{2}$+CR), combined through a BDT; the LP${}_{\text{CNN}}$; the combination
of all the CS observables with the LP${}_{\text{CNN}}$
(CS+LP${}_{\text{CNN}}$), by means of the two-step procedure explained above.
For each curve in Fig. 4, we report the value of the area under the ROC curve
(AUC) in Table 2, both for the truth and the reco cases. A perfect classifier
would have $\text{AUC}=1$, whereas a random classifier is associated with
$\text{AUC}=1/2$.

Figure 4: The ROC curves showing background rejection as a function of signal efficiency for the truth (left) and reco case (right) for CS variables, LP${}_{\text{CNN}}$ and the combined cases. Table 2: Area under the ROC curves for different combination of observables.  | AUC - Test Sample
---|---
 | Truth | Reco
CS observables | 0.826 | 0.788
$D_{2}$+CR | 0.817 | 0.787
LP${}_{\text{CNN}}$ | 0.876 | 0.828
CS + LP${}_{\text{CNN}}$ | 0.893 | 0.846

As expected, we first observe a worsening of the discrimination power by
moving from the truth case to the reco case, as can also be seen by comparing
the value in the left and in the right column of Table 2. However, the
performance after taking into account detector effects is still good for most
of the combinations, close to 0.85 for the CS+LP${}_{\text{CNN}}$ combination.
Furthermore, we see that most of the discriminating power of the set of CS
observables is actually coming from the combination of $D_{2}$+CR alone. This
is in agreement with what observed at the level of distributions at the
beginning of Sect 4: the jet pull observables, including the pull angle, seem
not to add any additional information useful for classification. At reco
level, their discrimination power is almost unnoticeable. Moving to the
combinations involving the Lund jet plane, we observe that the Lund jet plane
alone is performing better than the whole set of CS observables, especially in
the region of high signal efficiencies. When we combine LP${}_{\text{CNN}}$
with the CS observables, we see a noticeable improvement of the overall
classification power, with a value of AUC equal to 0.893 in the truth case and
0.846 in the reco case.

Finally, in Table 3 we rank the variables based on their importance in the
BDT, both in the truth and reco case. The ranking presented here also includes
the output of the Lund jet plane CNN as an additional input.
LP${}_{\text{CNN}}$ is the most discriminating variable, both in the truth and
in the reco case. It is followed in order by $D_{2}$ and the colour ring
$\mathcal{O}$. The jet pull variables are all of similar importance, at the
bottom of the ranking score. For the reconstructed case, $\mathcal{O}$ gains
additional importance with respect to the pull variables.

We end this Section with a comment about the usage of the pull angle. As
already mentioned in Sect. 2, the pull angle $\theta_{p}$ is only Sudakov
safe. One may wonder what is the effect of keeping only its (IRC-safe)
projections $t_{\parallel}$ and $t_{\perp}$, instead of using all the three
observables $t_{\parallel}$, $t_{\perp}$ and $\theta_{p}$ as input in the BDT,
as we have done. Unsurprisingly, by looking at the correlation matrix in the
BDT, we observe a strong correlation between these variables. Given that the
variables derived from the jet pull vector(s) have a small influence on the
overall performance, a variant of the tagger could be conceived, with
comparable performance, by dropping $\theta_{p}$ among the list of inputs to
the BDT.

Table 3: BDT observable ranking for the truth and reco cases. Observable
Ranking
---
| Truth | Reco
Rank | Obs. | Importance | Obs. | Importance
1 | LP${}_{\text{CNN}}$ | 6.6 $\times 10^{-1}$ | LP${}_{\text{CNN}}$ | 4.8$\times 10^{-1}$
2 | $D_{2}$ | 1.4 $\times 10^{-1}$ | $\mathcal{O}$ | 1.0$\times 10^{-1}$
3 | $\mathcal{O}$ | 5.7$\times 10^{-2}$ | $D_{2}$ | 9.3$\times 10^{-2}$
4 | $\theta_{pb}$ | 3.0$\times 10^{-2}$ | $\theta_{pb}$ | 7.0$\times 10^{-2}$
5 | $\theta_{pa}$ | 2.9$\times 10^{-2}$ | $\theta_{pa}$ | 6.5$\times 10^{-2}$
6 | $t_{\parallel b}$ | 2.6$\times 10^{-2}$ | $t_{\perp b}$ | 6.0$\times 10^{-2}$
7 | $t_{\parallel a}$ | 2.4$\times 10^{-2}$ | $t_{\parallel a}$ | 4.5$\times 10^{-2}$
8 | $t_{\perp b}$ | 1.9$\times 10^{-2}$ | $t_{\perp a}$ | 4.3$\times 10^{-2}$
9 | $t_{\perp a}$ | 1.0$\times 10^{-3}$ | $t_{\parallel a}$ | 3.3$\times 10^{-2}$

##  5 Invariant mass dependence

Since our goal is to develop a tagger purely sensitive to the colour
configuration of the decaying particle, in order to be applied to other
contexts (such as $Z$ or $W$ boson hadronic decays), ideally our procedure
should be insensitive to the invariant mass of decaying system, specifically
to the invariant mass of the pair of $b$-jets.

In Fig. 5 we show the distribution of the invariant mass measured on the whole
set of background events and on three subset of events, each of the same size,
corresponding to signal-enriched, intermediate and background-enriched
regions. These regions are defined by means of a set of cuts on different
discriminant variables: $D_{2}$ alone (Fig. 5(a)), combined BDT with CS but
$D_{2}$ (Fig. 5(b)), Lund plane CNN (Fig. 5(c)). We show results for the reco
case only, since the ones in the truth case are similar. In an ideal scenario,
a cut on the discriminating variable should not also concomitantly imply a cut
on the invariant mass of the system, hence the curves for the three regions
should overlap, and agree with the curve without any cut.

(a)

(b)

(c)

Figure 5: The distribution of the invariant mass of the $b$-jets pair in the
reco background sample for (a) different cuts on $D_{2}$, (b) different ranges
of the BDT output for the CS without the inclusion of $D_{2}$, (c) and for
different cuts on Lund plane CNN output.

We find that the sensitivity to the invariant mass is introduced mainly
through the $D_{2}$ observable, which is highly correlated to the value on the
mass, as it is clear from Fig. 5(a). Such a correlation has been already
investigated in the literature Dolen:2016kst ; Moult:2017okx . By removing
$D_{2}$ from the CS input variables of the BDT, the mass bias is greatly
reduced, as can be observed by comparing Fig. 5(a) and Fig. 5(b). However,
given the fact that the $D_{2}$ observable is ranked as one of the most
important (see Table 3), the removal of this variable comes at the price of
loosing a good part of efficiency.

Finally, it is interesting to study whether the LP${}_{\text{CNN}}$ alone
retains or not a dependence on the invariant mass of the decaying system. This
is shown in Fig. 5(c). Unfortunately, the output of the LP${}_{\text{CNN}}$
appears to be notably correlated to the invariant mass of the pair of
$b$-jets. In order to better understand this behaviour, by looking at the
correlation matrix of the BDT with the CS variables and the
LP${}_{\text{CNN}}$ as input, we note that LP${}_{\text{CNN}}$ and $D_{2}$ are
largely correlated. Hence, the behaviour we observe in Fig. 5(c) for
LP${}_{\text{CNN}}$ can be related to the known behaviour of $D_{2}$ of Fig.
5(a). Given the fact that LP${}_{\text{CNN}}$ is our best discriminating
variable, considering removing it from the combination comes at the price of
loosing a good part of discrimination power.

##  6 Conclusions

In this paper, we have investigated the problem of distinguishing the $b$-jets
originating from the decay of a colour singlet from those originating from the
pure QCD background (mostly through $g\to b\bar{b}$ collinear splitting). We
have focused on the signal process $pp\rightarrow
H(b\overline{b})Z(\nu_{\ell}\overline{\nu}_{\ell})$, but we are confident that
our strategy is valid in a more general context. Specifically, we have trained
a BDT architecture on eight high-level, colour sensitive observables, in order
to develop a combined colour tagger. We have also explored the discrimination
performance of a CNN architecture trained on Lund jet plane images. Finally,
we have combined the high-level observables and the output of the Lund jet
plane CNN in a common BDT architecture. We have also performed a fast detector
simulation in order to better assess the experimental feasibility of this
tagging strategy. Namely, we have compared individual distributions and the
final performance of the tagger before and after the inclusion of detector
effects.

We have found a good discrimination power for our combination of colour
sensitive observables with the output of the Lund jet plane CNN (AUC = 0.893),
slightly deteriorated when including detector effects (AUC = 0.846). The Lund
jet plane alone has been proven to be a powerful $Hbb$ tagger even in presence
of detector effect, thus extending the results of Ref. Khosa:2021cyk , and
when combined with theoretically motivated single-variable observables, such
as $D_{2}$ or the colour ring, the overall performance appreciably improves.
In the end, we have shown that our tagger, which is a combination of several
theory-driven single-variable observables with a representation of radiation
pattern within a jet, is not only effective in theory, but also shows
promising prospects for application to experimental analyses.

We have also studied to what extent the tagger is sensitive to the mass of the
decaying particle. In the case of the colour sensitive observables, the mass
bias has been shown to be ultimately due to the $D_{2}$ input variable, as
already known from the literature. However, we have also found that the Lund
plane CNN retains a large mass bias, and to the best of our knowledge this has
not been pointed out in the literature so far. The elimination of these
variables come at the cost of classification efficiency, especially in the
case of the Lund plane CNN. Further studies are needed in order to understand
how to remove such a mass bias. For instance, one could plan to explore
techniques similar to the ones presented in Refs. Dolen:2016kst ;
Moult:2017okx , based on a debiasing a posteriori.

Even if a fast detector simulation offers a good starting point in order to
assess the feasibility of a tagging strategy, in the end a full detector
simulation within a more defined experimental context would be required. Such
a more realistic scenario would also entail the inclusion of the efficiency of
real-life existing $b$-tagging algorithms used by the experimental
collaborations, whereas in this paper we have assumed a $b$-tagging algorithm
with 100% efficiency. Further, although the main scope of this study is to
assess the performance of relatively simple observables and ML architectures
for $Hbb$ tagging, it is interesting to investigate the importance of physics
information beyond the primary Lund plane, which can be exploited by including
planes originated by secondary splittings. In this context, we have made a
preliminary investigation using the LundNet-5 model of Ref. Dreyer:2020brq ,
which employs graph neural networks, and obtaining an improved performance
corresponding to AUC = 0.925 and AUC = 0.894, for truth and reco,
respectively.

We leave the implementation of these suggestions, as well as the opportunity
to consider new high-level observables as input for our tagger, for future
studies.

###### Acknowledgements.

The work of CK and SM is supported by Università di Genova under the
curiosity-driven grant “Using jets to challenge the Standard Model of particle
physics” and by the Italian Ministry of Research (MUR) under grant PRIN
20172LNEEZ and under the project “Dipartimenti di Eccellenza”. AR acknowledges
support from DESY (Hamburg, Germany), a member of the Helmholtz Association
HGF and from the University of Zürich.

##  Appendix A Details about ML algorithms

In this Appendix, we report some details about BDT parameters and CNN
architecture adopted in the analysis.

###  A.1 BDT parameters

The Boosted Decision Tree (BDT) has been implemented using the ROOT Toolkit
for Multivariate Analysis (TMVA) library physics/0703039 . The BDT is made up
of 50 trees, with a maximum depth of 5 and minimum node size set to 2.5% of
the total number of events. The Gini index is used as the optimisation
criterion. AdaBoost has been chosen as the boosting model and the number of
cuts is set to 80. We use a 50/50 train/test sample, and there is no
downsampling.

Parameters | Value
---|---
No. of Trees | 100
Max Depth | 3
MinNodeSize | 2.5%
Boost Type | AdaBoost
Train/Test | 50/50
No. of Cuts | 200
Downsampling | No
Table 4: BDT parameters used for the truth and reco data set.

###  A.2 CNN architecture

We used CNN (implemented using Keras chollet2015keras ) for the Lund jet
images data set. Balanced data set for the binary classification is used;
$70\%$ for the training, $15\%$ for the validation and $15\%$ for the testing.
We tried several models with different combinations of hyper-parameters and
the best architecture is described in the Table 5. Here $N_{i},i=1\dots 4$
denotes the number of filters in the corresponding convolutional layer. Filter
size is $3\times 3$ in all the convolutional layers. Activation function
‘relu’ and ‘softmax’ are used for the intermediate and last layer,
respectively. For the optimisation, ‘adam’ optimiser is used. We used pooling
(MaxPooling) operation after the second and fourth convolutional layer for
image downsizing. Note that CNN architecture used is same for truth and reco
data except the dropouts. The numbers mentioned in the brackets are the
dropouts strength used for the reco data set.

Parameter | Value
---|---
$N_{1}$ Conv2D | 30
$N_{2}$ Conv2D | 30
Dropouts | – (0.3)
$N_{3}$ Conv2D | 30
Dropouts | \- (0.3)
$N_{4}$ Conv2D | 10
Dropouts | \- (0.1)
Flat Layer | 150
Epochs | 30
Batch Size | 800
Table 5: CNN architectures used for truth and reco cases.

## References

  * (1) ATLAS collaboration, _Observation of a new particle in the search for the Standard Model Higgs boson with the ATLAS detector at the LHC_ , _Phys. Lett. B_ 716 (2012) 1 [1207.7214].
  * (2) CMS collaboration, _Observation of a New Boson at a Mass of 125 GeV with the CMS Experiment at the LHC_ , _Phys. Lett. B_ 716 (2012) 30 [1207.7235].
  * (3) ATLAS collaboration, _Observation of $H\rightarrow b\bar{b}$ decays and $VH$ production with the ATLAS detector_, _Phys. Lett. B_ 786 (2018) 59 [1808.08238].
  * (4) CMS collaboration, _Observation of Higgs boson decay to bottom quarks_ , _Phys. Rev. Lett._ 121 (2018) 121801 [1808.08242].
  * (5) ATLAS collaboration, _Measurement of VH, $\mathrm{H}\to\mathrm{b}\overline{\mathrm{b}}$ production as a function of the vector-boson transverse momentum in 13 TeV pp collisions with the ATLAS detector_, _JHEP_ 05 (2019) 141 [1903.04618].
  * (6) ATLAS collaboration, _Measurement of VH, $\mathrm{H}\to\mathrm{b}\overline{\mathrm{b}}$ production as a function of the vector-boson transverse momentum in 13 TeV pp collisions with the ATLAS detector_, _JHEP_ 05 (2019) 141 [1903.04618].
  * (7) ATLAS collaboration, _Measurements of $WH$ and $ZH$ production in the $H\rightarrow b\bar{b}$ decay channel in $pp$ collisions at 13 TeV with the ATLAS detector_, _Eur. Phys. J. C_ 81 (2021) 178 [2007.02873].
  * (8) ATLAS collaboration, _Measurement of the associated production of a Higgs boson decaying into $b$-quarks with a vector boson at high transverse momentum in $pp$ collisions at $\sqrt{s}=13$ TeV with the ATLAS detector_, _Phys. Lett. B_ 816 (2021) 136204 [2008.02508].
  * (9) N. Berger et al., _Simplified Template Cross Sections - Stage 1.1_ , 1906.02754.
  * (10) J. Brehmer, S. Dawson, S. Homiller, F. Kling and T. Plehn, _Benchmarking simplified template cross sections in $WH$ production_, _JHEP_ 11 (2019) 034 [1908.06980].
  * (11) ATLAS collaboration, _ATLAS b-jet identification performance and efficiency measurement with $t{\bar{t}}$ events in pp collisions at $\sqrt{s}=13$ TeV_, _Eur. Phys. J. C_ 79 (2019) 970 [1907.05120].
  * (12) CMS collaboration, _Identification of heavy-flavour jets with the CMS detector in pp collisions at 13 TeV_ , _JINST_ 13 (2018) P05011 [1712.07158].
  * (13) M. Cacciari, G.P. Salam and G. Soyez, _The Catchment Area of Jets_ , _JHEP_ 04 (2008) 005 [0802.1188].
  * (14) ATLAS collaboration, _Performance of jet substructure techniques for large- $R$ jets in proton-proton collisions at $\sqrt{s}$ = 7 TeV using the ATLAS detector_, _JHEP_ 09 (2013) 076 [1306.4945].
  * (15) J.M. Butterworth, A.R. Davison, M. Rubin and G.P. Salam, _Jet substructure as a new Higgs search channel at the LHC_ , _Phys. Rev. Lett._ 100 (2008) 242001 [0802.2470].
  * (16) S. Marzani, G. Soyez and M. Spannowsky, _Looking inside jets: an introduction to jet substructure and boosted-object phenomenology_ , vol. 958, Springer (2019), 10.1007/978-3-030-15709-8, [1901.10342].
  * (17) K. Datta, A. Larkoski and B. Nachman, _Automating the Construction of Jet Observables with Machine Learning_ , _Phys. Rev. D_ 100 (2019) 095016 [1902.07180].
  * (18) J. Lin, M. Freytsis, I. Moult and B. Nachman, _Boosting $H\to b\bar{b}$ with Machine Learning_, _JHEP_ 10 (2018) 101 [1807.10768].
  * (19) E.A. Moreno, T.Q. Nguyen, J.-R. Vlimant, O. Cerri, H.B. Newman, A. Periwal et al., _Interaction networks for the identification of boosted $H\rightarrow b\overline{b}$ decays_, _Phys. Rev. D_ 102 (2020) 012010 [1909.12285].
  * (20) A. Chakraborty, S.H. Lim and M.M. Nojiri, _Interpretable deep learning for two-prong jet classification with jet spectra_ , _JHEP_ 19 (2020) 135 [1904.02092].
  * (21) CMS collaboration, _Identification of heavy, energetic, hadronically decaying particles using machine-learning techniques_ , _JINST_ 15 (2020) P06005 [2004.08262].
  * (22) Y.-L. Chung, S.-C. Hsu and B. Nachman, _Disentangling Boosted Higgs Boson Production Modes with Machine Learning_ , 2009.05930.
  * (23) B. Tannenwald, C. Neu, A. Li, G. Buehlmann, A. Cuddeback, L. Hatfield et al., _Benchmarking Machine Learning Techniques with Di-Higgs Production at the LHC_ , 2009.06754.
  * (24) Jun Guo and Jinmian Li and Tianjun Li, _The Boosted Higgs Jet Reconstruction via Graph Neural Network_ , 2010.05464.
  * (25) M. Abbas, A. Khan, A.S. Qureshi and M.W. Khan, _Extracting Signals of Higgs Boson From Background Noise Using Deep Neural Networks_ , 2010.08201.
  * (26) C. Jang, S.-K. Ko, Y.-K. Noh, J. Choi, J. Lim and T.J. Kim, _Learning to increase matching efficiency in identifying additional b-jets in the $\text{t}\bar{\text{t}}\text{b}\bar{\text{b}}$ process_, 2103.09129.
  * (27) C.K. Khosa and S. Marzani, _Higgs boson tagging with the Lund jet plane_ , _Phys. Rev. D_ 104 (2021) 055043 [2105.03989].
  * (28) HEP ML Community, “A Living Review of Machine Learning for Particle Physics.” https://iml-wg.github.io/HEPML-LivingReview/.
  * (29) F.A. Dreyer, G.P. Salam and G. Soyez, _The Lund Jet Plane_ , _JHEP_ 12 (2018) 064 [1807.04758].
  * (30) H.-J. Yang, B.P. Roe and J. Zhu, _Studies of boosted decision trees for MiniBooNE particle identification_ , _Nucl. Instrum. Meth. A_ 555 (2005) 370 [physics/0508045].
  * (31) C.K. Khosa and V. Sanz, _Anomaly Awareness_ , 2007.14462.
  * (32) C.K. Khosa, L. Mars, J. Richards and V. Sanz, _Convolutional Neural Networks for Direct Detection of Dark Matter_ , _J. Phys. G_ 47 (2020) 095201 [1911.09210].
  * (33) C.K. Khosa, V. Sanz and M. Soughton, _Using machine learning to disentangle LHC signatures of Dark Matter candidates_ , _SciPost Phys._ 10 (2021) 151 [1910.06058].
  * (34) J. Gallicchio and M.D. Schwartz, _Seeing in Color: Jet Superstructure_ , _Phys. Rev. Lett._ 105 (2010) 022001 [1001.5027].
  * (35) A.J. Larkoski, S. Marzani and C. Wu, _Theory Predictions for the Pull Angle_ , _Phys. Rev. D_ 99 (2019) 091502 [1903.02275].
  * (36) Y. Bao and A.J. Larkoski, _Calculating Pull for Non-Singlet Jets_ , _JHEP_ 12 (2019) 035 [1910.02085].
  * (37) A. Larkoski, S. Marzani and C. Wu, _Safe Use of Jet Pull_ , _JHEP_ 01 (2020) 104 [1911.05090].
  * (38) A. Buckley, G. Callea, A.J. Larkoski and S. Marzani, _An Optimal Observable for Color Singlet Identification_ , _SciPost Phys._ 9 (2020) 026 [2006.10480].
  * (39) A.J. Larkoski, I. Moult and D. Neill, _Power Counting to Better Jet Observables_ , _JHEP_ 12 (2014) 009 [1409.6298].
  * (40) I. Moult, L. Necib and J. Thaler, _New Angles on Energy Correlation Functions_ , _JHEP_ 12 (2016) 153 [1609.07483].
  * (41) D0 collaboration, _Measurement of Color Flow in $\mathbf{t\bar{t}}$ Events from $\mathbf{p\bar{p}}$ Collisions at $\mathbf{\sqrt{s}=1.96}$ TeV_, _Phys. Rev. D_ 83 (2011) 092002 [1101.0648].
  * (42) ATLAS collaboration, _Measurement of colour flow with the jet pull angle in $t\bar{t}$ events using the ATLAS detector at $\sqrt{s}=8$ TeV_, _Phys. Lett. B_ 750 (2015) 475 [1506.05629].
  * (43) ATLAS collaboration, _Measurement of colour flow using jet-pull observables in $t\bar{t}$ events with the ATLAS experiment at $\sqrt{s}=13\,\hbox{TeV}$_, _Eur. Phys. J. C_ 78 (2018) 847 [1805.02935].
  * (44) A.J. Larkoski and J. Thaler, _Unsafe but Calculable: Ratios of Angularities in Perturbative QCD_ , _JHEP_ 09 (2013) 137 [1307.1699].
  * (45) A.J. Larkoski, S. Marzani, G. Soyez and J. Thaler, _Soft Drop_ , _JHEP_ 05 (2014) 146 [1402.2657].
  * (46) A.J. Larkoski, S. Marzani and J. Thaler, _Sudakov Safety in Perturbative QCD_ , _Phys. Rev. D_ 91 (2015) 111501 [1502.01719].
  * (47) J. Neyman and E.S. Pearson, _On the Problem of the Most Efficient Tests of Statistical Hypotheses_ , _Phil. Trans. Roy. Soc. Lond. A_ 231 (1933) 289.
  * (48) A.J. Larkoski, G.P. Salam and J. Thaler, _Energy Correlation Functions for Jet Substructure_ , _JHEP_ 06 (2013) 108 [1305.0007].
  * (49) J. Dolen, P. Harris, S. Marzani, S. Rappoccio and N. Tran, _Thinking outside the ROCs: Designing Decorrelated Taggers (DDT) for jet substructure_ , _JHEP_ 05 (2016) 156 [1603.00027].
  * (50) Y.L. Dokshitzer, G.D. Leder, S. Moretti and B.R. Webber, _Better jet clustering algorithms_ , _JHEP_ 08 (1997) 001 [hep-ph/9707323].
  * (51) M. Wobisch and T. Wengler, _Hadronization corrections to jet cross-sections in deep inelastic scattering_ , in _Workshop on Monte Carlo Generators for HERA Physics (Plenary Starting Meeting)_ , pp. 270–279, 4, 1998 [hep-ph/9907280].
  * (52) F.A. Dreyer and H. Qu, _Jet tagging in the Lund plane with graph networks_ , _JHEP_ 03 (2021) 052 [2012.08526].
  * (53) ATLAS collaboration, _Measurement of the Lund Jet Plane Using Charged Particles in 13 TeV Proton-Proton Collisions with the ATLAS Detector_ , _Phys. Rev. Lett._ 124 (2020) 222002 [2004.03540].
  * (54) A. Lifson, G.P. Salam and G. Soyez, _Calculating the primary Lund Jet Plane density_ , _JHEP_ 10 (2020) 170 [2007.06578].
  * (55) J. Alwall, R. Frederix, S. Frixione, V. Hirschi, F. Maltoni, O. Mattelaer et al., _The automated computation of tree-level and next-to-leading order differential cross sections, and their matching to parton shower simulations_ , _JHEP_ 07 (2014) 079 [1405.0301].
  * (56) T. Sjöstrand, S. Ask, J.R. Christiansen, R. Corke, N. Desai, P. Ilten et al., _An introduction to PYTHIA 8.2_ , _Comput. Phys. Commun._ 191 (2015) 159 [1410.3012].
  * (57) S. Ovyn, X. Rouby and V. Lemaitre, _DELPHES, a framework for fast simulation of a generic collider experiment_ , 0903.2225.
  * (58) DELPHES 3 collaboration, _DELPHES 3, A modular framework for fast simulation of a generic collider experiment_ , _JHEP_ 02 (2014) 057 [1307.6346].
  * (59) M. Cacciari, G.P. Salam and G. Soyez, _FastJet User Manual_ , _Eur. Phys. J. C_ 72 (2012) 1896 [1111.6097].
  * (60) M. Cacciari, G.P. Salam and G. Soyez, _The anti- $k_{t}$ jet clustering algorithm_, _JHEP_ 04 (2008) 063 [0802.1189].
  * (61) “fastjet-contrib.” https://fastjet.hepforge.org/contrib/.
  * (62) I. Moult, B. Nachman and D. Neill, _Convolved Substructure: Analytically Decorrelating Jet Substructure Observables_ , _JHEP_ 05 (2018) 002 [1710.06859].
  * (63) A. Hocker et al., _TMVA - Toolkit for Multivariate Data Analysis_ , physics/0703039.
  * (64) F. Chollet et al., “Keras.” https://keras.io, 2015.


4 synchronized(this) {

5 a++;

6 }

7 close(fd);

8 }

This synchronizes the processing that increments $a$ without unnecessarily
synchronizing the calls to $open$ and $close$. The $g$ function can be updated
similarly:

⬇

1 public void g(){

2 synchronized(this) {

3 a\--;

4 }

5 }

Alternatively, it could also be updated to be a synchronized method:

⬇

1 public synchronized void g(){

2 a\--;

3 }

The $h$ function does not require updates.

######  Solution A.0.13.

Solution to exercise 4.5.1. The correct answer is the first answer. In this
case, i is set to 0, and the if statement checks if i is greater than 0. It is
not, so the else clause is taken, which decrements i from 0 to -1.

######  Solution A.0.14.

Solution to exercise 4.5.2. The correct answer is the second answer. In this
case, the while loop is executed 3 times. The first time, L is reversed so
that it contains cba— which is printed. The second time, L is reversed again
so that it contains

######  Solution A.0.15.

Solution to exercise 4.6.1. The following interleavings are possible:

  1. 1.

A()-B()-C()-D()-E()—

  2. 2.
  3. 3.
  4. 4.
  5. 5.
  6. 6.
  7. 7.
  8. 8.
  9. 9.
  10. 10.

The correct answer is the third answer, 10.

##  Appendix B Coded examples

The following are selected coded examples.

###  B.1 Cleanup handler

The following example is a fully coded example demonstrating the
$pthread\\_cond\\_wait()$ C function in UNIX. This function is discussed in
exercise 4.4.3.

⬇

1// C program to test cleanup handler functions

2#include <pthread.h>

3#include <stdio.h>

4#include <unistd.h>

5

6// Declaration of mutex

7pthread_mutex_t my_mutex;

8// Declaration of thread condition variable

9pthread_cond_t condvar;

10

11// Definition of condition (predicate)

12int condition_case = 0;

13

14void handler1(void *arg)

15{

16 printf("cleanup handler: entered\n");

17 if (pthread_mutex_trylock(&my_mutex) == 0) {

18 printf("cleanup handler: mutex lock successfully obtained\n");

19 } else {

20 printf("cleanup handler: mutex lock not obtained\n");

21 printf("cleanup handler: unlocking mutex lock\n");

22 pthread_mutex_unlock(&my_mutex);

23 }

24 printf("cleanup handler: exiting\n");

25}

26

27// Thread function

28void* thread1()

29{

30 int oldstate, oldtype;

31

32 // Set up cleanup handler

33 pthread_cleanup_push(handler1, NULL);

34

35 // Set cancelability state. The following states are legal:

36 // - PTHREAD_CANCEL_ENABLE

37 // - PTHREAD_CANCEL_DISABLE

38 pthread_setcancelstate(PTHREAD_CANCEL_ENABLE,&oldstate);

39

40 // Set cancelability type. The following types are legal:

41 // - PTHREAD_CANCEL_DEFERRED

42 // - PTHREAD_CANCEL_ASYNCHRONOUS

43 pthread_setcanceltype(PTHREAD_CANCEL_DEFERRED,&oldtype);

44

45 // acquire a lock

46 printf("thread1: acquiring mutex lock\n");

47 pthread_mutex_lock(&my_mutex);

48

49 // wait on condition variable

50 while (!condition_case) {

51 printf("thread1: waiting on condition variable\n");

52 pthread_cond_wait(&condvar, &my_mutex);

53 printf("thread1: awakened\n");

54 }

55

56 // release the lock

57 printf("thread1: unlocking mutex lock\n");

58 pthread_mutex_unlock(&my_mutex);

59

60 // clean up and return to caller

61 printf("thread1: returning\n");

62 pthread_cleanup_pop(0);

63

64 return NULL;

65}

66

67// Driver code

68int main()

69{

70 pthread_t tid1;

71

72 printf("main: initializing\n");

73

74 // Initialize the condition variable and mutex

75 pthread_cond_init(&condvar,NULL);

76 pthread_mutex_init(&my_mutex,NULL);

77

78 // Create thread 1

79 printf("main: creating thread 1\n");

80 pthread_create(&tid1, NULL, thread1, NULL);

81

82 // Sleep for 5 sec so that thread1 gets a chance to run

83 printf("main: sleeping\n");

84 sleep(5);

85

86 printf("main: cancelling thread 1\n");

87 pthread_cancel(tid1);

88

89 // wait for the completion of thread 1

90 printf("main: waiting for thread 1 completion\n");

91 pthread_join(tid1, NULL);

92

93 printf("main: exiting\n");

94 return 0;

95}

The example output from running the program is as follows:

    main: initializing
    main: creating thread 1
    main: sleeping
    thread1: acquiring mutex lock
    thread1: waiting on condition variable
    main: cancelling thread 1
    main: waiting for thread 1 completion
    cleanup handler: entered
    cleanup handler: mutex lock not obtained
    cleanup handler: unlocking mutex lock
    cleanup handler: exiting
    main: exiting

###  B.2 Debug processing

The following example is a fully coded example demonstrating the
$pthread\\_cond\\_wait()$ C function in UNIX. This function is discussed in
example 4.4.4.

⬇

1// C program to demonstrate debugging behavior change

2#include <pthread.h>

3#include <stdio.h>

4#include <unistd.h>

5#include <stdlib.h>

6

7#define THREAD_COUNT 100

8#define DEBUG_MODE

9

10int global_x = 0;

11

12// Thread function 1

13void* thread1(void *arg)

14{

15 int *threadnumptr = (int *)arg;

16 int threadnum __attribute__ ((unused)) = *threadnumptr;

17 int local_x;

18

19 #ifdef DEBUG_MODE

20 printf("thread%d: entered\n",threadnum);

21 #endif

22

23 // process items

24 local_x = global_x;

25 #ifdef DEBUG_MODE

26 printf("thread%d: loaded global value %d\n",threadnum,local_x);

27 #endif

28 local_x = local_x+1;

29 global_x = local_x;

30 #ifdef DEBUG_MODE

31 printf("thread%d: increment complete\n",threadnum);

32 #endif

33

34 #ifdef DEBUG_MODE

35 printf("thread%d: returning\n",threadnum);

36 #endif

37

38 return NULL;

39}

40

41// Driver code

42int main()

43{

44 pthread_t tid[THREAD_COUNT];

45 int parm[THREAD_COUNT];

46

47 printf("main: initializing\n");

48

49 // Create threads

50 for (int thread = 0; thread < THREAD_COUNT; thread++) {

51 parm[thread] = thread + 1;

52 #ifdef DEBUG_MODE

53 printf("main: creating thread %d\n",thread+1);

54 #endif

55 pthread_create(&tid[thread], NULL, thread1, &parm[thread]);

56 }

57

58 // sleep for 5 sec so that the threads get a chance to run

59 sleep(5);

60

61 // wait for the threads to complete

62 #ifdef DEBUG_MODE

63 printf("main: waiting for thread completion\n");

64 #endif

65 for (int thread = 0; thread < THREAD_COUNT; thread++) {

66 pthread_join(tid[thread], NULL);

67 }

68

69 printf("main: total count is %d\n",global_x);

70

71 printf("main: exiting\n");

72 return 0;

73}