## 5 Conclusions and Future Work  
This paper describes a neural network (NN) model for classifying electromagnetic (EM) showers from the mixed background made of pile-up (PU) and quantum chromodynamics (QCD) jets at level 1 trigger within a given time limit of a few \(\mu\)s. Recent advances have made it possible to adjust the NN models to limitations caused by the targeted hardware, field programmable gate arrays (FPGAs). \begin{table}
\begin{tabular}{c c c c c} \hline \hline
**Settings** & **FF \#** & **FF \%** & **LUT \#** & **LUT \%** \\ \hline default & 20,594 & 2.38 & 63,261 & 14.64 \\ \hline hidden layer & & & & \\ precision & 19,670 & 2.28 & 61,387 & 14.21 \\ adjusted & & & & \\ \hline input + hidden layer precision & 13,008 & 1.51 & 57,884 & 13.40 \\ adjusted & & & & \\ \hline \hline \end{tabular}
\end{table} 
Table 17: The results of different types of optimizations for the QCNN_U2 model. Figure 16: hls4 ml profiling, plots show examples of the distributions of the QCNN_U2 model layers: (a) before optimization, (b) after optimization. The first tests are carried out with a data set containing ideal signal (EM) images; in the data simulation step, it was chosen to generate EM showers without PU. The NN classifiers distinguishing between idealistic EM showers and PU achieve 99% accuracy. The EM shower with included PU is generated to get closer to a more realistic situation. As there is a big difference in average EM and PU cluster pt, which simplifies the classification process, another type of particle, QCD jets, is also added to background samples. Simple convolutional neural network and multi-layer perceptron models with signal/background classification accuracy between 96 and 99% and false negative rate (FNR) between 2 and 4%, depending on the background case, are developed. The achieved results could eventually be improved by adding physical features to input data, but it would be difficult to incorporate into level 1 trigger latency requirements. The rest of the paper considers the EM versus mixed background, one-vs-all classification problem. Using the QKeras quantization library, NN models are aggressively quantized, representing the weights and activations with 2 bits, reducing computational and memory costs (in inference time) with accuracy degradation of less than 1%. Further, different approaches to data refinement are presented. The methods that affect the range of input data, like capping, using appropriate values, can significantly lower FPR (for a quantized convolutional neural network with capping value 8, by 34%). Image size reduction methods also decrease the FNR value, lowering the number of NN parameters. The quantization methods, uniform quantization, and selection bit approach achieve performances comparable to a base model, with a large reduction in the precision required for the data storage. As shown, the presented data refinement methods have enabled further reduction in the model resource consumption. Using the hls4 ml library, model examples are converted into the firmware to be implemented on FPGA. All implemented models can be executed with a latency lower than 1 \(\upmu\)s and flip-flop and lookup table utilization under 2.5% and 15%, respectively. Using variants of implementation of the proposed quantized convolutional neural network, it is shown that model and data quantization enable additional savings of resources when implementing the model in FPGA: the number of used flip-flops is reduced by 36.8% and the number of lookup tables by 8.5%. To address the limitations caused by HGCAL images of particles that have a showering pattern that differs from what is expected, future efforts will focus on introducing new features, possibly including high-level ones, or exploring more advanced model architectures that can better capture the subtleties of the data. Another possible future research avenue is to search for an efficient method with which to exploit the sparsity of calorimeter images. Conceptualization, A.B.M and J.M. ; methodology, A.B.M., J.M. and M.P. ; software, A.B.M.