Towards a Computer Vision Particle Flow

In high energy physics experiments Particle Flow (PFlow) algorithms are designed to reach optimal calorimeter reconstruction and jet energy resolution. A computer vision approach to PFlow reconstruction using deep Neural Network techniques based on Convolutional layers (cPFlow) is proposed. The algorithm is trained to learn, from calorimeter and charged particle track images, to distinguish the calorimeter energy deposits from neutral and charged particles in a non-trivial context, where the energy originated by a $\pi^{+}$ and a $\pi^{0}$ is overlapping within calorimeter clusters. The performance of the cPFlow and a traditional parametrized PFlow (pPFlow) algorithm are compared. The cPFlow provides a precise reconstruction of the neutral and charged energy in the calorimeter and therefore outperform more traditional pPFlow algorithm both, in energy response and position resolution.


Introduction
General-purpose high energy collider experiments are designed to measure both charged particle trajectories and calorimeter clustered energy deposits. The charged particle tracks in a magnetic field and the topology of energy deposits in calorimeters provide most of the information necessary to reconstruct, identify and measure the energy of the particles that constitute the event, which for the most part are charged and neutral hadrons, photons, electrons, muons and neutrinos. The latter escaping detection and are measured by the imbalance in momentum in electron-positron collision events or transverse momentum in hadron collision events. Other particles created during a high energy collision, typically have too short lifetimes to be directly detected in the Contact addresses a e-mail: Francesco.Armando.DiBello@roma1.infn.it b e-mail: sanmay.ganguly@weizmann.ac.il experiment and need to be reconstructed from the aforementioned particles that do traverse the detector.
The goal of Particle Flow (PFlow) algorithms is to make optimal use of the complementarity of the measurements of the experiment's detectors to reconstruct the particle content and its energy response for the entire event. A precise reconstruction of the entire event is essential for the measurement of those particles, such as neutrinos, escaping detection, as well as the reconstruction of jets of particles originating from the fragmentation and hadronization of hard scattering partons. One of the most challenging aspects of PFlow algorithms is to disentangle particles of different nature when they are close to one another and possibly overlap. The reconstruction performance in general and the performance of PFlow algorithms, in particular, will critically depend on the detector design specifications, for instance, the size and field of the tracking volume, the granularity of the calorimeters and their energy resolution. The first PFlow algorithm was designed by the CELLO collaboration at PE-TRA [1], where an optimal reconstruction of the event "Energy Flow " was measured by subtracting the expected energy loss from charged particles in the calorimeter, to estimate the "neutral energy" and its spatial distribution. This algorithm, developed in e + e − collisions, was aimed at a precise measurement of the hadronic activity for measurement of α S . Since then, PFlow algorithms relying on the parametrization of the expected charged energy deposits in the calorimeter have been further developed at e + e − [2] and pp [3,4] collider experiments. The success of these algorithms has been such that future e + e − collider experiment projects are taking PFlow algorithms into account in the design of the projected detectors [5][6][7][8][9].
In this paper, we explore the capabilities of computer vision algorithms to provide solutions to this complex question in a context of two overlapping particles, a charged and a neutral pion π + and π 0 , in which traditional PFlow algo-rithms have been developed and tuned [3]. That is the most common scenario in high energy hadron collisions where most of the event particle content originate from parton fragmentation and are typically charged and neutral pions.
This work aims to provide a proof-of-concept of the use of a computer vision PFlow (cPFlow) algorithm based on a convolutional neural network to optimally infer the magnitude and direction of the neutral energy in cases where both charged and neutral particles are present and possibly overlapping.
For these studies, a detector that captures the main characteristics of a multipurpose detector such as ATLAS [10], with a simplified geometry is used. As discussed above, a critically important aspect to consider for the performance of PFlow algorithms is the granularity of the calorimeter both in the longitudinal direction of the development of hadronic and electromagnetic showers and in the plane transverse to it. The specificities of granularity and calorimeter energy response chosen in the studies presented herein, correspond to a generic multipurpose particle detector. Events are then generated with a π + and a π 0 in various ranges of energies corresponding to the typical single-particle energies of processes at the LHC. The two particles are emitted very close to one another to simulate the most difficult scenario where the charged and neutral pions overlap. The electromagnetic showers of the photons from the subsequent decay of the neutral pion and the hadronic shower of the charged pion are simulated using GEANT 4 [11]. Electronic noise in the calorimeter is also taken into account.
Image-based deep learning techniques have drawn significant attention in high energy Physics experiments. In particular, the study of calorimeter shower and hadronic jet tagging using a convolutional neural network has been studied in detail in Ref. [12][13][14][15]. For the sake of simplicity, these approaches assume uniform two or three dimensional (2D or 3D) images. The more intricate case of varying granularity layered images has been recently addressed using graph neural networks in Ref. [16]. In this paper, while building deep learning-based PFlow algorithm, cPFlow, we also propose a different approach to address the issue of variable granularity.
The detector description is discussed in section 2, followed by a discussion of the simulated data in section 3. The details on the structure of the a deep neural network, the cPFlow model, is described in section 4. The description and implementation of a parametrized PFlow algorithm (pPFlow) is given in section 5. The performance of the pPFlow and the cPFlow are compared in section 6.

Detector Model and Simulation
The experimental setup is composed of three sub-detectors. The electromagnetic calorimeter (ECAL) and hadronic calorimeter (HCAL) which are fully simulated, and a parameterized simulation of a charged particle tracker. Each calorimetric sub-detector consists of three layers, with varying granularity, placed subsequently one after another. The overall detector layout is schematically represented in Figure 1. Both, the ECAL and the HCAL are sampling calorimeters where for simplicity and to produce a realistic shower development each layer is modeled as a homogeneous calorimeter using an equivalent molecule corresponding to a mixture of the absorber and scintillator materials.
The simulated energy deposits in each layer are then smeared to reproduce the corresponding sampling energy resolution. For the ECAL, the absorber material is lead and the active material is liquid argon, mixed with a mass proportion of 1.2 : 4.5, yielding an equivalent radiation length of X 0 = 3.9 cm. For the HCAL, the absorber material used is iron with polyvinyl toluene plastic material used as a scintillating active material. These are combined with a mass proportion of 4.7:1.0 yielding an equivalent interaction length of λ int = 17.4 cm. The choices of the detector geometry, material and smearing parameters are tuned to replicate single-particle energy responses similar to the one obtained with the ATLAS detector.
Overall the total length of the detector is 227.5 cm, including a 1 cm gap between the ECAL and HCAL blocks. The lateral profile of the calorimeters are squares of 125 × 125 cm 2 . The main characteristics of the calorimeters are summarized in Table 1. Table 1 Material budget of the ECAL and HCAL calorimeters as well as the corresponding equivalent radiation X 0 and interaction λ int lengths.

Detector Absorber
Scintillator The transverse granularities of each layer are indicated in Table 2.

Simulated data
To ensure significant overlap between the charged and neutral hadron, the polar angle of the π + /π 0 momenta varies randomly between π/100 to 3π/200 radians, whereas the azimuthal angle varies uniformly between 0 and 2π radians with a relative separation of π/60 radians. The π + and x y z π 0 ( → γγ)  π 0 are generated using the GEANT particle gun functionality. The source of the gun is located 150 cm away w.r.t. the first ECAL layer ( Figure 1). To populate different parts of the detector, the initial location of the neutral and charged hadron in the event is randomly chosen from the corner of a square at the source location with a length size equal to 20 cm. Four sets of independent simulations are run with different energy ranges of: 2 − 5 GeV, 5 − 10 GeV, 10 − 15 GeV and 15 − 20 GeV. The energy of the generated charged and neutral pions are randomly sampled from a uniform distribution bounded within these ranges, without any correlation among the pions energies. The generation parameters of the particle gun ensure that a large proportion of detector cells have a significant amount of energy overlap, originating from the individual showers. The average fraction of neutral energy within groups of clustered cells, referred to as topoclusters (see Section 5), is around 60%. The effect of electronic noise is emulated using gaussian distributions centered at zero with variables widths for different layers. The per cell levels of noise in each layer are given in Table  2. For each cell in the event an energy is sampled from these distributions and added to the total energy.
Finally, a track is formed by smearing the π + momentum by a resolution σ (p), given by σ (p) , and keeping the original π + momentum direction unchanged. The chosen momentum resolution of π + emulates the track resolution of the ATLAS tracking system and track reconstruction algorithms [10]. The smearing of the track direction is neglected as it is expected to have sub-dominant effects to the results presented in this document.

Deep neural network models
The target of the Neural Network is to regress the per-cell neutral energy fraction using deep learning methods to yield an accurate image of the neutral energy deposits. The chosen approach is to apply computer vision techniques to perform this task. Calorimeter images from the total energy deposit in the calorimeter cells in each layer are formed. The layers serve as image channels, (similar to RGB in regular images), each, with a different resolution due to varying granularity of the calorimeter layers. To perform an image recognition analysis, each of the image channels (with a granularity given in Table 2) is first mapped to a uniform resolution of 64 × 64 pixels. This mapping is performed by an individual NN block referred to as "UpConv" block. The track is represented by the track layer, a single channel, 64 × 64 pixel image. The image, therefore, has only one non-zero pixel which contains the value of the track energy. The location of this pixel in the image is determined from the transverse position where the π + hits the first ECAL layer surface. The track information is crucial in the design and performance of a particle flow algorithm as it sets the scale of the expected charged energy deposits as well as the expected position of the shower.
The track layer is combined with the six Up-Convoluted calorimeter image channels to form a seven-layer image that is fed to a neural network block consisting of convolutional layers, termed "ConvNet" blocks. The output of the convnet block is a six-channel image with a uniform resolution of 64 × 64 pixels. Each layer is then mapped to a lower resolution image, of single-channel, through a down convolutional learnable neural network block, called DownConv block. More details about UpConv and DownConv blocks can be found in Appendix A. The cPFlow output images of the six calorimeter layers preserve the same resolutions of the input images as quoted in Table 2. The overall flow of the model is described in Figure 2.
The loss function is designed to regress the neutral energy fraction of each cell in the event, with a larger weight assigned to more energetic cells, to reduce the effect of noise and simultaneously enrich the performance of the cells originating from the pions. The loss function is defined on an event-basis as follows: where E tot is the total energy collected by the six calorimeter layers, E c is the total energy of a given cell indexed by c, f c t and f c d represent the target and predicted energy fractions. The cPFlow model is trained with the Adam stochastic optimizer [17] and a learning rate of 10 −4 . The training dataset consists of 80,000 images while the validation dataset has 20,000 images. The performance of the trained model is evaluated on a test dataset consisting of 6000 images. The relative difference between the predicted neutral energy and truth neutral energy in the test sample serves as the baseline metric.

Implementation of a parametric Particle Flow algorithm
To quantify the performance of the designed cPFlow computer vision algorithm, a traditional pPFlow algorithm is also implemented.
The algorithm is divided into two separate steps: (i) the topocluster formation and (ii) the expected charged energy subtraction. The implementation of both steps is inspired by the PFlow algorithm currently used by the ATLAS experiment [3].
The Topological clustering algorithm groups cells based on their energies and topological location. The algorithm is designed to cluster cells originated by a single neutral or charged particle as well as to suppress noise. The algorithm starts by ranking cells based on their significance over the corresponding nominal noise values. Cells with a significance larger than five E σ ≥ 5 are considered as seeds and a topological search is performed on their adjacent cells in the longitudinal direction and on their adjacent and next-to adjacent cells in the transverse plane. If one of the clustered cells has a significance E σ ≥ 2 , an additional clustering step is performed. If a seed cell is found to be adjacent, within two cells to another topocluster, the two topoclusters are merged. The closest topocluster to the extrapolated track position is considered to be matched to the track.
The expected charged energy is estimated using a parametrisation of the energy deposited by a π + within the matched topocluster, referred to as E pred . This parametrisation is computed from template distributions obtained using a pure sample of π + without contamination of π 0 and it is dependent on the track momentum and the estimated Layer of First Interaction (LFI, where the first nuclear interaction takes place). The track position is extrapolated to the calorimeter layers and rings of radius equal to a single cell pitch are built. The rings are then ordered according to their expected energy density. The ring energies are subsequently progressively subtracted from the topocluster in decreasing order of energy density. The algorithm proceeds until the total amount of removed energy exceeds E pred . If the energy in the ring is larger than the required energy to reach E pred , the energy in that ring is not fully subtracted but scaled to the fraction needed to reach the expected energy released by the π + . The remaining energy in the topolcluster is considered as originating from neutral particles.

Results
An event display showing the truth energies and the predictions of the topocluster based pPFlow and cPFlow algorithms is shown in Figure 3. It illustrates how the cPFlow produces a more accurate image of the neutral energy deposits.
To quantify the overall performance of the cPFlow versus the pPFlow algorithm, two figures of merit related to the reconstruction of the neutral energy deposits are considered. The first is the energy resolution of the residual neutral energy after the charged energy subtraction. The second is the overall direction assigned to the charged energy deposit as a probe of the topological reconstruction of the neutral energy deposits.  energy belonging to the topocluster matched to the track. The distributions are fitted with a sum of two Gaussian distributions, to quantify the main gaussian resolution in energy and the non-gaussian tails. The estimated energy resolution of the cPFlow shows an improvement by more than a factor of 3 compared to the pPflow in the lowest energy range corresponding to 2-5 GeV . The relative improvement progressively decreases to reach approximately 40% in the highest energy range of 15-20 GeV . For both algorithms, a bias in the fitted mean is observed. The bias in the pPFlow algorithm, ranges from 20% in the low energy range, to 5 % in the highest energy range. It was found to originate from the parametrization of the charged energy predictions which is derived from a pure sample of π + . The size and energy of the topocluster in isolated π + are systematically lower compared to the evaluation sample which features a large π 0 and π + overlap. As the energy of the π + increases, the size of the topoclusters in both, isolated and overlapped topologies becomes comparable thus reducing the bias in the high energy ranges.
For the cPFlow results, the bias is much smaller and approximately constant at negative values of 5-6%. As the pions energies increase, the bias is only slightly reduced. This effect was found to originate from the training strategy of the cPFlow which is carried out without prior knowledge of the topocluster boundaries. It therefore predicts, as expected, a small fraction of the neutral energy outside the topocluster, deposited in cells with energy typically comparable to the injected noise values, resulting in a slight underestimate within the topocluster boundaries. To mitigate this effect, dedicated training is performed only for cells belonging to the topoclusters. Figure 5 shows the relative residual distribution of the cPFlow when the training is run over the full image and for training using only cells belonging to the topoclusters. For the latter, the vast majority of low energetic cells are effectively cut out by the clustering algorithm thus reducing the noise contribution during the training. Similarly to the previous case, the distributions were fit with a sum of two gaussian distributions. An overall shift of the distributions towards a lower bias value is seen when the training is run only for the cells belonging to the topoclusters, especially for the lowest energy range. The non-gaussian tails of the distributions are also slightly reduced when training over a cell of the topoclusters by approximately 10% for the lowest energy range. These features are expected given that the loss function was chosen to favor high energetic cells and The the extrapolated track position is shown by the red cross for the first three columns. The energy of the initial π + , π 0 ranges between 2-5 GeV . The total energy also includes noise contribution and topoclusters boundaries are outlined in white. The fourth and fifth columns shows the predicted neutral energy distribution from for the cPFlow and pPFlow algorithm, respectively. In this example, it is seen that the electromagnetic shower from π 0 → γγ decay has been correctly predicted by the trained model. The trained model also learns to suppress the noise pattern. thus predictions for the low energetic cells are expected to be less accurate by construction. It can also be noted, that the cPFlow predictions provide an excellent noise suppression per-cell, which is further improved when the great majority of low energetic cells are removed during training using topocluster cells only.
The spatial resolution of the neutral component was also studied. Figure 6 shows the distance, in number of cells, between the barycenter of the truth neutral energy and the predicted neutral energy within the topocluster for both the the pPFlow algorithm and the cPFlow predictions in the ECAL2 layer. The cPFlow predictions provide an accurate estimate of the barycenter, outperforming the pPflow results for all the considered energy ranges. This is because the pPFlow energy subtraction is performed within rings around the extrapolated track position and therefore it gives a very approximate estimate of the precise topology of the neutral energy deposit, in contrast with the image recognition algorithm. Improvements of a factor of 5 or more in the spatial resolution are observed for the cPFlow versus the pPFlow algorithm in all energy ranges.

Conclusion and outlook
Particle Flow reconstruction has an important role in high energy particle collider experiments and is being considered for the design of future experiments. In this paper a Computer Vision approach to particle flow reconstruction, based on deep Neural Network techniques is proposed. Its performance is quantified using a simplified layout of electromagnetic and hadron calorimeters, focussing on the challenging case of overlapping showers of charged and neutral hadrons. For charged hadrons with low to intermediate momenta, where the momentum resolution from the measurement of its track in an inner tracking detector is more precise than the energy measurements in the calorimeters, the role of the particle flow algorithm is to optimally infer the expected charged hadron energy deposits to then subtract it from the calorimeter and replace it with the measured track, which will not only be superior in energy resolution, but also in the reconstruction of its direction. The particle flow algorithm, therefore, aims at the most precise reconstruction of the neutral energy in the calorimeters. While standard particle flow algorithms use parametrizations of the expected charged energy deposits in the calorimeters (pPFlow), the cPFlow algorithm is trained to learn the image of the neutral energy deposits.
Comparing the cPFlow and pPFlow estimates of the neutral energy deposits in the calorimeter, an improvement of the resolution of the neutral energy response of approximately a factor of two is obtained. The precision in the neutral object direction reconstruction is also improved significantly by a factor of approximately 5 or more.
Combining the cPFlow algorithm with standard topological calorimeter clustering algorithms provides both an optimal performance in the challenging case of overlapping showers, and a simple path to generalize the algorithm from the two-particle case to a global event particle flow.
These studies provide a proof of concept for the construction of a computer vision-based PFlow algorithm, cPFlow, which, via the judicial implementation of UpConvolution and DownConvolution layers, successfully estimates the neutral energy in the event using track and calorimeter images of varying granularity as input. The distance computed in number of cells between the barycenter of the predicted and truth neutral energy in the ECAL2 layer when using the pPflow or cPFlow algorithms for different energy ranges described in the text. The equivalent distributions in different calorimeter layers show a similar behaviour.