## 1 Introduction  
Exploration of the essential nature of space and discoveries of exotic particles would not be possible without particle accelerators, which are primary tools in high-energy physics (HEP). The world's largest particle accelerator, the Large Hadron Collider (LHC) [1], is built to understand the fundamental laws of nature and test different predictions of elementary particle physics. In 2012, the LHC experiments A Toroidal LHC Apparatus and Compact Muon Solenoid (CMS) [2] confirmed the existence of the Higgs boson through the discovery of the predicted fundamental particle. The current phase aims to fully characterize the Higgs boson properties and search for phenomena beyond the standard model. In the LHC ring, high-energy proton collisions occur every 25 ns. To analyze the results of the collisions, four detectors surround collision points and record the obtained data. One of four LHC detectors is CMS, a cylindrically shaped general-purpose detector with several concentric layers of components (Figure 1). When interesting particles are produced as a result of the collision, they immediately decay into lighter, stable particles. As shown in Figure 1, decay products pass through detector layers and interact with them, allowing their direction and momentum to be measured. Among the detectable decay products, there are electrically charged leptons (electrons and muons) and particle jets (collimated streams of particles originating from quarks and gluons) [3]. The CMS is undergoing a major upgrade for the High-Luminosity (HL)-LHC era, and one of the most important enhancements is the design of the high-granularity calorimeter (HGCAL) [5], a radiation-hard replacement of endcaps. It is a sampling calorimeter characterized by very-high granularity using 6 million silicon and 400 thousand scintillator channels. Silicon cells are fine-segmented, radiation tolerant, and fast enough to mitigate PU. Hence, they will be used as active elements in high-radiation areas, and, to reduce cost, scintillators will be used as active elements in lower-radiation areas (Figure 2). The HGCAL consists of an electromagnetic part (CE-E) containing 14 layers of hexagonal silicon sensors, which alternate with absorber layers made of lead, copper-tungsten, and copper. The hadronic part (CE-H) consists of another 8 silicon layers and 14 mixed layers with silicon and scintillator. At the moment when the experiment presented herein was initiated, there were a total of 50 layers set to be used in HGCAL [6], as was planned to be used in the experiment. In the recent design revision, the number of layers was reduced to 47 [7] but could also be changed up until actual production. This paper concentrates on the electromagnetic calorimeter sub-detector part, where particles such as electrons and photons are detected. Combining the data coming from different sub-detectors, the ultimate goal was to obtain a complete picture of the collision event and enable the application of a wide range of physical analyses. However, due to the high rate of collisions (40 MHz), the detector produces tens of terabytes of data per second, exceeding the available processing and storage resources. Thus, the crucial part of the CMS dataflow consists of the event data selection algorithms in the early dataflow stage. Such algorithms should decide which data are potentially interesting, enabling transmission of only those data for more detailed analysis (and irretrievably rejecting the rest) while adhering to strict resource constraints (in terms of power, time, storage, and bandwidth). This process is overseen by an event-processing system called level 1 trigger (L1T), which runs in real-time and requires a fast decision on the input data stream.