First results on ProtoDUNE-SP liquid argon time projection chamber performance from a beam test at the CERN Neutrino Platform

The ProtoDUNE-SP detector is a single-phase liquid argon time projection chamber with an active volume of $7.2\times 6.0\times 6.9$ m$^3$. It is installed at the CERN Neutrino Platform in a specially-constructed beam that delivers charged pions, kaons, protons, muons and electrons with momenta in the range 0.3 GeV$/c$ to 7 GeV/$c$. Beam line instrumentation provides accurate momentum measurements and particle identification. The ProtoDUNE-SP detector is a prototype for the first far detector module of the Deep Underground Neutrino Experiment, and it incorporates full-size components as designed for that module. This paper describes the beam line, the time projection chamber, the photon detectors, the cosmic-ray tagger, the signal processing and particle reconstruction. It presents the first results on ProtoDUNE-SP's performance, including noise and gain measurements, $dE/dx$ calibration for muons, protons, pions and electrons, drift electron lifetime measurements, and photon detector noise, signal sensitivity and time resolution measurements. The measured values meet or exceed the specifications for the DUNE far detector, in several cases by large margins. ProtoDUNE-SP's successful operation starting in 2018 and its production of large samples of high-quality data demonstrate the effectiveness of the single-phase far detector design.


Introduction
The Deep Underground Neutrino Experiment (DUNE) [1] is a next-generation, long-baseline neutrino oscillation experiment, with a near detector at Fermilab and a far detector located at the 4850 ft level of Sanford Underground Research Facility (SURF), in Lead, South Dakota, U.S.A., 1285 km from the neutrino production target. The neutrino detectors at the DUNE far site will be housed inside four cryostats, each of which will contain 17.5 kt of liquid argon (LAr). The first detector to be constructed will be a single-phase time projection chamber (TPC), similar to, but a factor of 25 more massive than the pioneering T600 detector built by the ICARUS -1 -

Cryostat
The TPC is installed in a membrane cryostat [12] with internal dimensions of 8.5 m in both the and directions, and 7.9 m in . The cryostat is filled to a height of about 7.3 m and its pressure is maintained to 1050 mbar (absolute). The TPC is suspended by the detector support system, which is a network of steel beams held in place by nine penetrations in the roof of the cryostat.
A detailed description of the design, construction, leak-checking, testing and validation of the cryostat is given in [11]. The cryogenics control system is also described there. We give a summary here of the argon purification system that has played a crucial role in the detector performance achieved.
The argon received from the supplier has contaminants of water, oxygen and nitrogen at the parts per million level each. Water and oxygen will capture drifting electrons and the concentration of these contaminants needs to be reduced by a factor of at least 10 4 and maintained at this level to allow operation of the TPC. Purification of argon in the liquid phase, as required for the mass of argon involved here, is reported in [13]. The present system builds on purification systems developed for ICARUS and most recently at Fermilab [14] and [9], including the use of the same filter materials. The main features of the system are indicated in figure 1. There are three circulation loops. In one, liquid leaves the cryostat via a penetration in the side. It is pumped as liquid through a set of filters, and it is reintroduced to the cryostat at the bottom. The pump can drive about 7 t/hr giving a volume turnover time of about 4.5 days. In the second loop, argon gas from the purge pipes with which each signal penetration is equipped is purified directly while warm and it is recondensed to join the liquid flow out of the cryostat. In the third loop, the main boil-off from the argon is recondensed directly and it then joins the liquid flow out of the cryostat. When the argon is first Throughout this paper, the charge and energy deposited per unit track length are conventionally referred to as / and / respectively. The in these expressions is not oriented along the detector coordinate but rather it is a differential step along the track path.
-3 -circulated, the contamination level falls following a perfect mixing model with a time constant of the turnover time until a steady state is reached in which the rate of contamination from leaks and outgassing from impurities balances the clean-up rate. In the NP04 cryostat, thanks to the rate of recirculation and the avoidance of leaks, this state is equivalent to an oxygen contamination [15] of a few parts per trillion resulting in essentially full-strength signals from the furthest parts of the TPC. Instrumentation for monitoring the state of the argon is distributed outside the TPC near the inner walls of the cryostat. Three purity monitors, formerly used with the ICARUS T600 detector [2], were refurbished with new gold photocathodes and quartz fibers. They are deployed in ProtoDUNE-SP, each at a different height. They monitor and give fast feedback on the drift electron lifetime in the liquid argon. Two vertical columns of resistance temperature detectors (RTDs) measure the temperature gradient of the liquid argon. Computational fluid dynamics (CFD) calculations have been performed that predict the temperature distribution and the internal flow pattern of the argon [16]. The temperature is predicted to vary by 15 mK total over the height of the liquid. The RTDs have been cross calibrated in situ to better than 2 mK and their measurements agree with the predictions within ±3.7 mK. A set of cameras and LED lights in the liquid and in the ullage provides monitoring of the mechanical state of the apparatus during filling and operation.

Time projection chamber
The time projection chamber is divided into two separate half-volumes with a solid, planar cathode in the center, at = 0 in the plane, with three APAs forming an anode plane opposite to the -4 -cathode on either side. The two active regions of the TPC, permeated by an electric field, enclose a volume 6.1 m high along the direction, 7.0 m along , and 3.6 m in the positive and negative direction. The entire active volume, except very thin regions at the boundaries, is instrumented for ionization charge readout at the APA end of the drift. Table 1 summarizes the nominal TPC parameters and features. Figure 2 shows a view of the TPC with its major components labeled and a photo of one of the two drift volumes. Table 1. Nominal LArTPC parameters and features. Here, X refers to all collection planes, and Z and C refer to the collection planes on the sides of the TPC and cryostat, respectively.

TPC configuration
Anode-Cathode-Anode ( The cathode plane of the TPC is formed from six cathode plane assemblies (CPAs). Each CPA is 1.15 m wide and 6.1 m high, and consists of three vertically stacked cathode panels. The stored electrical energy in the TPC when fully charged presents a challenge. If the cathode were electrically conducting, an electrical breakdown can discharge it rapidly, endangering the front-end electronics. Instead, the cathode is constructed out of resistive materials which give it a very long discharge time constant, reducing the risk. The CPA panels are constructed from FR4, a fire-retardant fiberglassepoxy composite material. These panels are laminated on both sides with a commercial Kapton -5 - film with a resistivity of ∼3.5 MΩ/sq. The cathode plane is biased at -180 kV to provide a 500 V/cm drift field. A field cage with 60 voltage steps on each side of the cathode ensures the uniformity of the nominal drift field between the cathode plane and the sense planes. The electric field differs from the nominal prediction due to space-charge effects, which are described in section 6.1.
-6 - Figure 3 is a diagram of an APA viewed from the front, and figure 4 shows one end of an APA viewed from the side. Each APA has a rectangular stainless steel frame 6.1 m high, 2.3 m wide, and 76 mm thick. There are four layers (planes) of wires bonded on each side of the frame. Following the notation of ref. [3], the wire planes and their wire orientations are (from outside in) the Grid (G) layer (vertical), the U layer (+35.7 • from vertical), the V layer (-35.7 • from vertical), and the X layer (vertical). A bronze wire mesh with 85% optical transparency is bonded directly over each side of the APA frame to provide a grounded shield plane for the four wire planes mentioned above. Each successive wire plane is built 4.75 mm above the previous layer, including the wire mesh. The wires are terminated on wire boards which are stacked on the short ends the APA. The G and X layers have the same wire pitch of 4.79 mm, but are staggered by half a wire pitch in relative position. The U and V wires have a pitch of 4.67 mm. Wires on the two induction planes are helically wrapped around the frame from the head, to the sides, and then to the foot. Wires are held in place with FR-4 boards with teeth cut in them as they wrap around the sides. The wire angle is chosen such that the wires do not wrap more than one revolution to avoid creating ambiguities in track reconstruction. Four wire support combs made out of 0.5 mm-thick G10 (a fiberglass-epoxy composite material) are installed on each side of each APA uniformly spaced along the direction, in order to hold the long wires in place, helping to counteract gravitational, electrostatic, and fluid-flow forces that would otherwise cause portions of the wires to be displaced from their nominal positions. Each wire plane is electrically biased at a different potential such that the primary ionization electrons created in the drift volume pass through the G, U and V planes without being captured, and finally are collected on the X wires. Therefore, the X plane wires are also referred to as the collection wires, and the U, V plane wires as the first and second induction plane wires. The grid plane wires serve as an electrostatic discharge (ESD) protective shield and are not read out. The nominal wireplane bias voltages, to ensure electron collection only on collection-plane wires, are G = −665 V, The G plane on the lowest-APA on the < 0 side of the detector was unintentionally not connected to its voltage supply. The break in connectivity was determined to be inside the cryostat Figure 3. Sketch of a ProtoDUNE-SP APA, showing some of the U, V and X wires, to accentuate their angular relationships to the frame and to each other. The induction layers are connected electrically across both sides of the APA. The grid layer (G) wires run parallel to the X wires. Separate sets of G and X wires are strung on the two sides of the APA. The blue boxes on the end house the cold electronics. The APA is shown turned on its side. Each APA is installed vertically in the detector. From ref. [5].
-7 - Wires are mounted on the head wire boards and bias voltages and signals are brought through the capacitance-resistance (CR) boards. From ref. [5]. and it could not be repaired for the duration of the run. Groups of four G plane wires are connected to a 3.9 nF capacitor with the other terminal grounded. Without a voltage supply, drifting ionization electrons will charge up the G-plane from its initial state to a potential that repels electrons and prevents further charge collection. This charging process takes approximately 100 hours [5], and the average charge measured by this APA is reduced during the charge-up time. While we observed the transparency of the G plane on this APA to be as low as 10% immediately after the drift field had been switched on, the total loss in transparency after 100 hours became negligible.
Electron diverters are installed in the two vertical gaps between the APAs on the negativeside of the cathode, but not between the APAs on the positive-side. These diverters consist of two vertical electrode strips, an inner electrode and an outer electrode, mounted on an insulating board that protrudes approximately 25 mm into the drift volume beyond the G plane wires. Voltages applied to the diverter electrodes modify the local drift field so that electrons drift away from the gaps between the APAs and into the active area. A diagram showing the field lines and equipotentials in the vicinity of the electron diverters when they are working as designed is given in ref. [3]. High currents were drawn from the electron diverters' power supplies when they were energized, due to one or more electrical shorts in the cold volume. The electron diverters were therefore left unpowered. A resistive path to ground on each one ensured that the actual voltage on the outer electrode was close to zero, which was not the intended voltage. The grounded diverter electrodes collected charge near the gaps, and also distorted nearby drift paths. The impacts on the measured charge values and spatial distortions are discussed in section 6.3.1 and also in ref. [5].

Beam plug
The test beam enters the detector at mid-height and about 30 cm away from the cathode, on the negative side. It points down 11 • from the horizontal, and towards the APA on the negative side, 10 • to the right of the direction. In order to minimize the energy loss of beam particles prior to -8 -their entry in the TPC due to the materials in the cryostat, the 40 cm of inactive liquid argon in front of the TPC, and the field cage, a "beam plug" [3] is installed on the low-, negative-side of the end-wall field cage, as shown in figure 5. This beam plug is constructed from a series of alternating fiberglass and stainless steel rings to form a cylinder, and capped at entrance and exit ends with low mass fiberglass plates. The stainless steel rings are connected to three sets of resistors to regulate the voltage from the field cage to the grounded cryostat membrane. The beam plug extends through an opening in the field cage about 5 cm inside the field cage boundary. The inside face of the beam plug is covered with a mini field cage made from 0.8 mm thick printed circuit board to reduce the drift field distortion introduced by this opening. The beam plug is filled with nitrogen at a nominal pressure of 1.3 bar (absolute pressure) to balance the hydrostatic pressure of the liquid argon at this height and also to maintain high dielectric strength to avoid HV breakdown. Besides, the cryostat warm structure and the insulation are also modified to reduce the beam interaction with passive materials.~5

Cold electronics
The U, V and X wire planes on both sides of an APA are read out by 20 front-end motherboards (FEMBs) installed close to the wire boards on top of each APA. The FEMBs amplify, shape, digitize, and transmit all 15,360 TPC channels' signals to the warm interface electronics through cold data cables, which are up to 7 m in length. Each FEMB contains one analog motherboard, which is assembled with eight 16-channel analog front-end (FE) ASICs [17], to provide amplification and pulse shaping, and eight 16-channel Analog to Digital Converter (ADC) ASICs for a total of 128 channels readout per FEMB.
Each FE ASIC channel has a dual-stage charge amplifier circuit with a programmable gain selectable from 4.7, 7.8, 14 and 25 mV/fC, and a 5th-order anti-aliasing shaper with a programmable time constant with peaking times of 0.5, 1, 2, and 3 μs. The FE ASIC also has an option to enable AC coupling and a baseline adjustment for operation at either 200 mV for the unipolar pulses on the collection wires or 900 mV for the bipolar pulses on the induction wires. Under normal running -9 -conditions the ASIC gain is set at 14 mV/fC and the peaking time is set at 2 μs for all channels. On October 11, 2018, the internal ASIC baseline was changed to 900 mV for both induction and collection channels in order to mitigate ASIC saturation with large input charge. Each FE ASIC also has an adjustable pre-amplifier leakage current selectable from 100, 500, 1000, and 5000 pA. The default leakage current is 500 pA. The estimated power dissipation of a FE ASIC is about 5.5 mW per channel at 1.8 V. Each FE ASIC contains a programmable pulse generator with a 6-bit DAC for electronics calibration, which is connected to each channel individually via an injection capacitor. The ADC ASIC has 16 independent 12-bit digitizers performing at speeds up to 2 megasamples per second (MS/s).
A commercial Altera Cyclone IV FPGA, assembled on a mezzanine card that is attached to the analog motherboard, provides clock and control signals to the FE and ADC ASICs. The FPGA also serializes the 16 data streams from the ADCs into four 1.25 Gbps links for transmission to the warm interface electronics over the cold data cables. The FPGA can also provide a calibration pulse to each FE ASIC channel via the same injection capacitor used for the internal FE ASIC DAC, as a cross-check for the electronics calibration. The production, commissioning and performance of the cold electronics components are described in [18].
The number of TPC channels that do not respond to charge signals from cosmic-ray muons evolved over the course of the data-taking period. Twenty-nine channels never showed any sensitivity to signals, from September 2018 to January 2020. An additional seven became solidly unresponsive during the run, making the total unresponsive channel count 36 in January 2020. Approximately 30 additional channels were found to be intermittently unresponsive during the run. During initial cold-box testing before installation, 34 channels were identified as non-responsive; this includes the 29 initially dead channels and five intermittent ones that happened to be non-responsive during the test.

Photon detectors
Liquid argon is a prolific emitter of scintillation light. Approximately 2.4×10 4 vacuum ultraviolet (VUV) photons are created per MeV of energy deposited by ionization in LAr at the nominal electric field of 500 V/cm. Photon detectors are installed in ProtoDUNE-SP in order to detect a fraction of these photons to measure interaction times and to get an independent measurement of deposited energy. These photon detectors, however, cannot be placed outside of the field cage because it blocks the scintillation light, and so the photon detectors are integrated in the APAs, occupying the space between the two mesh planes. Ten bar-shaped photon detectors with dimensions of 8.6 cm (height) 2.2 m (length) and 0.6 cm (thickness) are embedded at equally spaced heights within each APA. A number of different designs of photon-detector technologies are implemented within this size constraint. In each design, silicon photomultipliers [19] are used to convert the light to electrical signals, which are brought out of the cryostat on copper cables. Most of the photon detectors sense the light that reaches the ends of the bars -the exception is the so-called ARAPUCA design, which collects light at several positions along the bar. More details on the photon detector system are provided in section 5.

Cosmic-ray tagger
The CRT is a system of scintillation counters that covers almost the entire upstream and downstream faces of the TPC. It was installed in order to provide triggers to read out the detector for a set -10 - of cosmic-ray muons that pass through with known timing and direction, parallel to the TPC readout planes. Since the ProtoDUNE-SP detector is on the surface, it is exposed to 20 kHz of cosmic-ray muons. Most of these muons are not tagged before entry into the TPC. Both untagged muons and muons tagged by the CRT are exploited to provide important calibration data and performance indicators.
The CRT uses scintillation counters recycled from the outer veto of the Double Chooz experiment [20]. It is constructed in four large assemblies, two mounted upstream and two mounted downstream of the cryostat. Each assembly covers an area approximately 6.8 m high and 3.65 m wide. The CRT uses 32 modules containing 64 scintillating strips each. The strips are 5 cm wide and 365 cm long. The strips in each module are parallel to each other, and thus a module provides a one-dimensional spatial measurement for each track at a given position along . In order to enable two-dimensional sensitivity in and , four modules are placed together into eight assemblies with two modules being rotated by 90 degrees to create an assembly of 3.65 m by 3.65 m in size, as shown in figure 6. Four of these units are placed to cover the upstream (front) face of the detector and the other four placed against the downstream (back) face. Hamamatsu M64 multi-anode photomultiplier tubes detect the scintillation light and the resulting electrical pulses are digitized by ADCs and recorded by the data acquisition system along with timestamps with 20 ns resolution. A digitized pulse and its timestamp are called a "one-dimensional hit." Two-dimensional hits are reconstructed when two one-dimensional hits are recorded in overlapping CRT modules within a coincidence window of 80 ns. A cosmic-ray muon track is reconstructed in the CRT by drawing a line from hits in the front modules to hits in the back modules within a coincidence window dictated by the estimated time of flight to travel from the front modules to the back modules.
Half of the 32 upstream CRT modules cover the upstream face of the detector and the other half of the CRT modules cover the downstream face of the detector as seen in figure 7. The upstream -11 -

JINST 15 P12004
CRT modules are offset due to the beam pipe, which enters the cryostat at an angle. Because of this, eight CRT modules cover the area near the cathode along the direction, but 9.5 m upstream from the front face of the TPC. The other eight upstream CRT modules sit to the left of the beam pipe with an offset of 2.5 m upstream from the from face of the TPC. The downstream CRT modules are centered with respect to the center of the TPC in and sit 10 m downstream from the front face of the TPC.

Data acquisition, timing and trigger system
The ProtoDUNE-SP data acquisition system (DAQ) is responsible for reading the data from the TPC, the photon detector and the CRT. It also reduces the data volume using online triggering and compression techniques and formats the data into trigger records for storage and offline processing. The TPC has two candidate readout solutions under test in ProtoDUNE-SP: RCE (ATCA-based) [21,22] and FELIX (PCIe-based) [23,24]. Both of these systems ran simultaneously. For the beam runs, five out of the six APAs were read out using RCEs and one APA was read out using FELIX. After the beam runs, four APAs were converted from RCE readout to FELIX readout. Fermilab's artDAQ [25] is used as the data-flow software.
The word "event" is customarily used for a triggered detector readout in many high-energy physics experiments. Due to the need to refer to interactions as events and the presence of multiple interactions per detector readout, we standardize on "trigger record" as the name of a unit of data produced by the DAQ.
-12 - The ProtoDUNE-SP timing system provides a 50 MHz clock multiplexed on an 8b10b encoded data stream that is broadcast to all endpoints. The timing system interfaces to the CERN SPS beam presence signals and can be used to switch modes for data taking with and without beam. The timing system data stream also provides the trigger distribution. The timing system is partitionable, a feature that allows parts of the experiment to run independently. A clock synchronized to the Global Positioning System provides 64-bit timestamps that are used to mark the trigger and data times irrespective of file name, run, or trigger record numbers. A hardware triggering system was designed in order to perform event selection in ProtoDUNE-SP. The core element of this system is the Central Trigger Board (CTB) which is a custom printed circuit board (PCB) in charge of processing the status of the auxiliary detectors to aid in making prompt readout decisions. The readout decisions are ultimately made by the timing system which communicates with the CTB through various commands. The CTB hosts a MicroZed, which is a commercial PCB with an onboard System-On-a-Chip (SoC). The SoC contains both Programmable Logic (PL) and a Processing System (PS) and serves as an interface between the auxiliary detectors (photon detectors, beam instrumentation, and CRT) and the DAQ through the timing system. The CTB has 32 individual CRT pixel inputs (a pixel being a unit of two overlapping panels), 24 optical inputs for the photon detection system, and seven inputs for beam instrumentation signals, all of which are translated into digital pulses and forwarded to the PL for further processing.
The CTB triggering firmware operating in the PL is organized into a two-level hierarchy of low-level and high-level triggers (LLTs and HLTs) which are configurable at run-time by the DAQ system. LLTs are defined for inputs from a single subsystem while HLTs can be defined using the various LLTs and can therefore span any or a combination of the subsystems. Several trigger conditions can be set up; each one is uniquely identified by a bitmask and is embedded into a trigger word issued to the DAQ. An overview of the CTB trigger scheme and its interface with the DAQ is depicted in figure 8. -13 -Additionally, multiple trigger conditions can be satisfied during a single triggered detector readout. To distinguish between these, the CTB timestamps all LLTs and HLTs generated with the 50 MHz system clock. This (64-bit) timestamp is also included in the trigger word along with the bitmask.
In the HLT, trigger conditions can be configured to require coincidences or anti-coincidences between the various LLTs. Only when all the required conditions for an HLT are satisfied is a trigger command passed to the timing system. The timing system is then responsible for validating or vetoing the issued trigger. If accepted, the timing system forwards the readout decision to the DAQ software and to the individual readout systems (i.e. TPC, photon detectors, and CRT). However, for accountability, the CTB sends a data word directly to the DAQ to be stored regardless of whether or not the trigger is validated by the timing system.
All HLTs can be classified as beam-on or beam-off triggers. The former relies mostly on the beam instrumentation inputs and requires the conditions to be satisfied during a beam spill while the latter requires that the conditions are satisfied outside the beam spill. The most common examples of beam-on triggers include those aimed at tagging electron, proton and kaon events. By requiring different signal combinations from the beam instrumentation inputs, one can identify specific particles for a relevant energy range, which will be discussed in section 3.
The most common examples of beam-off triggers are those arising from cosmic-ray activity. Several of these triggers are in place to select events with specific topologies, requiring CRT pixels from specific regions to register hits in coincidence with pixels from another region. For example, by requiring that at least one upstream CRT pixel is hit in coincidence with a downstream CRT pixel, one can select throughgoing muon candidates. Another trigger is set up for cathode-crossing muon candidates, which is achieved by requiring coincidence hits on CRT pixels on opposing drift volumes and sides of the cryostat. In addition to the logic-specific triggers, an aperiodic random trigger is provided to read out the detector without regard to trigger conditions.
For each triggered readout of the detector, the TPC data consists of 6000 consecutive samples of each ADC, which are digitized at a rate of 2 MHz, for a total of 3 ms of time. Each time period of 500 ns between ADC samples is called a "tick." The data readout starts 250 μs (500 ticks) before the trigger time in order to collect charge deposited by particles that arrive earlier than the trigger but cause charge to arrive at the anodes during time periods that overlap those of triggered events. Corresponding data from the photon detectors and the CRT are saved in the output data stream for analysis. Compressed raw data trigger records have a typical size of 60 MB, and trigger rates of 40 Hz were reliably sustained by the data acquisition system. A typical physics run lasts several hours.

CERN beam line instrumentation
The ProtoDUNE-SP TPC is located in the CERN North Area in a tertiary extension branch of the H4 beam line. The 400 GeV/ primary proton beam is extracted from the CERN Super Proton Synchrotron (SPS) and is directed towards a beryllium target, producing a mixed hadron beam with a In case a trigger has already been issued by the timing system. If beam pile-up occurs, the timing system vetoes any additional beam triggers if it has issued one in the last 10 ms. However, the CTB still reports multiple beam triggers in this case.
-14 -momentum of 80 GeV/ . This secondary beam is then transported to impinge on a secondary target, producing a tertiary, very low energy (VLE) beam in the 0.3-7 GeV/ momentum range. The H4-VLE beam line then accepts, momentum-selects and transports these particles to the ProtoDUNE-SP detector. The secondary target material can be changed between copper and tungsten. The latter is chosen for momenta below 4 GeV/ in order to increase the hadron content of the beam. However, the copper target was unintentionally used for the 2 GeV/ run instead of the tungsten target.

Beam line instrumentation components
The H4-VLE beam line is instrumented with three types of detectors that provide particle identification and a trigger for the TPC. There are eight profile monitors ("XBPF"), three trigger counters ("XBTF") and two threshold Cherenkov counters ("XCET"). There are also three bending magnets that direct the beam toward the ProtoDUNE-SP detector. The second of these magnets is also used as part of a momentum spectrometer. The relative positions of each of these features can be seen in figure 9. A description of the beam line design has been reported elsewhere [26], while an in-depth discussion of the instrumentation can be found in [27]. The XBPFs, described in detail in [28], are scintillating fiber detectors, each containing 192 square fibers, approximately 1 mm thick. The fibers are arranged in a planar configuration and cover an area of approximately 20 × 20 cm 2 . Each device contains a single plane of fibers and therefore measures one spatial coordinate. Pairs of these detectors, rotated by 90 • with respect to each other, are placed at several points along the beam line. This arrangement allows the beam position to be tracked on a particle-by-particle basis. The XBPF data is also used in the reconstruction of a particle's momentum, discussed in section 3.3.1. Hits in the last two sets of XBPF devices are used to measure the trajectories of the beam particles that are then extrapolated to the face of the ProtoDUNE-SP TPC. The XBTFs are designed in a similar way. However, instead of each fiber being read out separately, they are gathered into two bundles and therefore offer no position resolution. Instead, the signals from upstream and downstream planes, which are separated by 28.575 m, are connected to a time-to-digital converter (FMC-TDC [29]). The TDC signals from these two planes provide a particle's time of flight (TOF). The resolution of this measurement has been measured to be approximately 900 ps [27].
-15 -Coincident signals from the middle and downstream XBTFs act as a "general trigger." These general triggers are sent to the CTB serving as conditions for HLTs as described in section 2.7. During data taking across the momentum regime of interest, the measured efficiencies of the XBPFs with respect to these triggers are greater than 95% for all chambers [27].
The two Cherenkov counters used in the H4-VLE are of similar design [30,31], although one is able to sustain a higher radiator gas pressure. The internal pressures of the two devices were tuned to tag different particle species at various momenta. A combination of the TOF and the two Cherenkov signals (high and low pressure), offers particle identification for analysis across the whole momentum spectrum of interest. During the beam run, signals from these devices were sent to the CTB to form HLTs tagged as various beam particle species.

Beam line simulation and optimization
The beam transported in the H4-VLE beam line is produced by the collision of the secondary mixed hadron beam of 80 GeV/ with the secondary fixed target. To limit the contributions from the decays of unstable low-energy hadrons such as pions and kaons, a beam line length of less than 50 m is required. Low-energy beam particles need to be sufficiently separated from the highenergy background in this distance, and enough space for the beam line instrumentation is required. Detailed simulation studies were carried out in order to meet these specifications.
The performance of the initial layout was calculated with the beam optics code Transport [32] and refined by a comprehensive MAD-X [33] (and MAD-X-PTC [34]) simulation [35]. The Monte Carlo simulations use two frameworks, G4beamline [36] and FLUKA [37,38]. Different target lengths and materials were investigated to satisfy the experimental needs of rate and beam composition. The target choice (either copper or tungsten) and the different field strengths of the beam line's dipoles and quadrupoles are incorporated into the G4beamline and FLUKA models. Based on these studies, estimates of the beam rates, compositions and background rates at the experiment location are obtained. The background suppression was improved by optimizing the shielding using the FLUKA simulation [27].

Beam line event reconstruction and particle identification
Information from the three types of beam line instruments (discussed in section 3.1) is combined in order to perform particle identification on an event-by-event basis. A search window in time of 500 ns is defined around each general trigger; timestamps associated with data packets from each device are then matched within this interval.

Momentum spectrometer technique/calculation
The three XBPF detectors surrounding the middle bending magnet provide a measurement of each particle's momentum. This is illustrated in figure 10 [30]. The lateral position of the particle at each XBPF detector ( 1 , 2 , 3 ) is provided by the index of the activated fibers in the profile monitors. These measurements, along with the known distances between the monitors ( 1 , 2 , 3 ) and the measured magnetic field are used with equations. (3.1) and (3.2) to determine a particle's bending To validate the performance of the spectrometer, we used the high statistics simulation, which includes all the material in the line, the gas in the Cherenkov detectors at the right pressures per momentum, as well as the expected special resolution of the profile monitors. For each particle, we compute its momentum from the above equation, and therefore the measured Δp/p of the line. Assuming no material in the beam line for a central momentum of 12 GeV/c and position resolutions of 0.2 mm, 0.5 mm and 0.8 mm we obtain a Δp/p of 1.1%, 2.5% and 3.9% accordingly, as shown on Figure 19. When the material along the beam is included, the reconstructed momentum resolution Δp/p deteriorates, because of the multiple scattering, with the effect becoming more significant in lower energies, as shown on Figures 20,21 and 22. For the 2 GeV beam, the reconstructed momentum resolution with all material included and with Figure 10. A schematic diagram showing the method by which momentum is reconstructed for a given beam particle (red), as discussed in the text. Taken from [30]. The direction of the axis is opposite to the convention used in this paper. angle and momentum .

Particle identification logic
The beam line is designed to provide particle identification (PID) for the various particle types ( , , , , ) comprising the beam. Depending on the beam momentum settings, different conditions are applied to the data from the beam line instrumentation to extract the particle types. These conditions are listed in table 2. This technique is demonstrated for selected runs at various beam momenta in figures 11(a)-11(d). Figure 12 shows the measured momentum and TOF distribution throughout the selected runs. The red curves show expected TOF for several particle types ( , , , , and ) given the particle's momentum, its mass, and assuming a distance of 28.575 m between the TOF monitors.
-17 - Table 2. A summary of beam line instrumentation logic used in the identification of particle types. Each cell reflects how a particular type of instrumentation is used at a given reference momentum. When time of flight is used, the values of the lower and upper cuts are given in nanoseconds. In the case of the high-pressure Cherenkov (XCET-H) and the low-pressure Cherenkov (XCET-L), zero and one represent the absence and presence of a signal respectively. When a given piece of instrumentation is not involved in a logic decision at a given momenta, a dash is used.

TPC characterization
The large quantities of high-quality data collected by ProtoDUNE-SP enable many studies of the performance of the TPC. This section describes the offline data preparation and noise suppression, charge calibration, noise measurement, signal processing, event reconstruction, signal-to-noise performance, and a measurement of the electron lifetime.

TPC data preparation and noise suppression
The ProtoDUNE-SP detector is typically triggered at a rate of 1-40 Hz where each trigger record includes synchronized contiguous samples from all TPC channels, typically with a length of 3 ms corresponding to 6000 ticks (ADC samples). Trigger records are processed independently of one another, beginning with data preparation which converts the ADC waveform (ADC count for each tick) for each channel to a charge waveform. The data preparation comprises evaluation of pedestals, charge calibration, mitigation of readout issues, tail removal and noise suppression. These operations are necessary in order to optimize the performance of subsequent stages of event reconstruction. The data preparation steps are described in detail in the following subsections.

Pedestal evaluation
Voltage offsets are introduced at the inputs to the amplifier and ADC for each channel to keep the signals in the appropriate range for each of these devices. These offsets and the gains of both devices vary from channel to channel and so there are channel-to-channel variations in the ADC pedestal, i.e. the mean ADC count that would be observed in the absence of signal. In addition, the  pedestal is observed to have significant variation from one trigger record to another, presumably due to low-frequency (compared to the 3 ms readout window) noise pickup before the amplifier. To cope with this, the pedestal is evaluated independently for each channel and each trigger record. The pedestal is evaluated by histogramming the ADC count for all (typically 6000) ticks and fitting the observed peak with a Gaussian whose mean is used as the pedestal. The RMS of the fit Gaussian provides an initial estimate of the noise in the channel and is typically around four to six ADC counts. Due to the sticky-code issues described in section 4.1.3, these ADC count distributions are sometimes observed to have spikes at the offending sticky codes which can bias the pedestal estimate. To reduce this bias, the peak bin is excluded from the fit if it holds more than 20% of the samples.

Initial charge waveforms
Initial charge waveforms are obtained for each channel by subtracting the pedestal from each of the ADC counts and multiplying this difference by the gain assigned to the channel. These gains may be set to 1.0 to obtain a charge waveform in units of ADC counts or they may be taken from a charge calibration. The standard ProtoDUNE-SP reconstruction makes use of the calibration discussed in section 4.2.

Sticky code identification
A few percent of ADC ASIC channels suffer from an issue known as "sticky code," in which certain ADC values would be preferentially produced by the ADC independent of the input voltage causing the readout channel to appear to "stick" at a particular value. The flaw in this ADC design is a failure of transistor matching at the transition from digitizing the six most significant bits to the six least significant bits. The sticky codes therefore tend to prefer values of zero or 63 plus a multiple of 64, though other sticky codes have been observed in the data as well. Sticky codes were observed in test-bench measurements in advance of installation, where the dynamic range of the ADC was tested with a calibrated source of charge.
The pedestal histograms and a few waveforms for all channels were scanned by eye to obtain an initial list of sticky codes and this list is extended when other problematic channels are uncovered. A total of 498 codes in 312 channels (of 15360) have been identified as sticky and are mitigated as described in the following section.
Approximately 70 channels are flagged as bad due to very high fractions of sticky codes or population of multiple widely-separated sticky values. Another 35 are flagged as noisy due to serious -20 -  Signals from charged tracks appear mostly in black and are off scale, well above the noise level. Horizontal dashed lines indicate the boundaries between the ten FEMBs used to read out the channels for this plane. The second from the bottom is FEMB 302 referenced in the text.
but less-severe sticky-code issues. The solidly unresponsive channels mentioned in section 2.4 are also flagged as bad. A total of 133 channels are flagged as bad or noisy. The data for these channels are prepared like any others, but downstream processing such as deconvolution or track finding may choose to ignore these channels or treat them in a special manner.

ADC code mitigation
For channels that have known sticky codes, if the ADC value on a particular sample is at one of the sticky values, it is replaced with a value interpolated from the nearest-neighboring non-sticky codes. If the two neighbors on either side exhibit a significant jump (20 ADC counts), the interpolation uses a quadratic fit. Otherwise, linear interpolation is used. Figure 14 shows an example charge waveform before and after mitigation. This is from FEMB 302 where sticky codes are particularly prevalent. A sticky code has been identified and the waveform is significantly improved after mitigation. Sticky codes very close to the pedestal are not flagged.

Timing mitigation
One of the 120 FEMBs (FEMB 302) does not receive the master timing signal used to clock the ADCs. The ADCs on that FEMB make use of a backup clock that resides on the FEMB. Although the master and FEMB clocks both nominally run at 2 MHz, reconstructed signals show that the FEMB clock runs 0.07% slower than the master clock. The charge waveforms for FEMB 302 are corrected to match the sampling rate and offset for the other channels. The charge for each sample is replaced with a linear interpolation of the original charges of two samples nearest in time. Figure 13(b) shows an event display made from mitigated waveforms for the same data with the same scale and binning as figure 13(a). Both sticky-code and timing mitigations are added. The shift in the FEMB 302 timing and reduction in noise are discernible. Channels flagged as bad or noisy are zeroed and appear white in the display.

Tail removal
In each TPC channel, the amplifier and ADC are AC-coupled using a high-pass RC filter with a time constant of approximately RC =1.1 ms (2200 ticks) for collection-plane channels and 3.3 ms (6600 ticks) for induction-plane channels. The typical signal from a charged track will be much faster, 10-20 μs (20-40 ticks) and this AC coupling implies the observed signal will be followed by a long tail of opposite sign whose area cancels that of the initial signal. The tails are much smaller and are neglected in induction-plane channels, where the signals are bipolar and thus integrate to zero.
The decay time is comparable to the mean time between cosmic-ray signals, about 1500 ticks, and it is a significant fraction of the data readout time used to evaluate the pedestal, typically 6000 ticks. Variations in cosmic arrival time and charge deposit per channel (in particular due to varying angle of incidence) imply that all signals are superimposed on a fluctuating background of accumulated tails from preceding signals, many of which arrive before the readout window starts. Tails from these fluctuations are clearly visible in collection-plane waveforms and event displays.
-22 -Large charge deposits in figure 13(b) are followed by blue regions indicating negative tails. Some other regions are positive (orange) because the initial pedestal estimate is biased by the negative tails. The tails are removed in collection-plane channels using a time-domain correction, chosen because of the large fraction of channels that start each trigger record with a significant tail from charge that has arrived before the readout window starts.
Before tail removal, the (nominal) pedestal-subtracted value (ADC count or calibrated charge) in sample , , is the sum of signal, , and tail, , contributions and a pedestal offset, : The pedestal offset is not zero because the method used to evaluate the pedestal includes contributions from tails. Because the tails are exponential, the tail in any sample may be expressed in terms of the signal and tail in the preceding sample: where = −1/ RC ( RC is the time constant in ticks) and = 1 − 1/ obtained by requiring the integral of the tail cancel that of the signal. Equations 4.1 and 4.2 may be solved to obtain the signal and tail from the input data: eq. (4.1) is used to obtain from and and eq. (4.2) to obtain +1 from and for = 0, 1, 2, . . .. The tail correction replaces the input data with the evaluated signal: → .
In addition to , , this solution depends on two parameters: the pedestal offset and the tail in the first sample, 0 . The latter is unknown because the data preceding the start of the triggered readout have not been recorded. These parameters are obtained by identifying signal-free regions and choosing the values that minimize the sum of 2 over those regions. This is done by iteratively applying the signal finder first to the input data and then to each signal estimate. Figure 13(c) shows an event display composed of waveforms after tail removal for the same data with the same scale and binning as figure 13(b). Examples of two corrected waveforms from ProtoDUNE-SP data are shown in figure 15.  Figure 15. Examples of waveforms with tail removal. The black curve shows the original data { } and the red curve shows the corrected data, i.e. the signal { }. The blue curve is the correction added to the data, i.e. pedestal offset minus estimated tail { }. On the left, a very long pulse produces a clearly visible tail. On the right, there is clear evidence of a tail from charge that preceded the readout window as well as tail from signal within the window.

Correlated noise removal
One of the most significant sources of excess noise observed in the ProtoDUNE-SP detector has a frequency distribution with a peak around 45 kHz. This noise source is found to be highly -23 -correlated among a group of channels that share the same low-voltage regulator in the same FEMB. Following ref. [39], a mitigation method is developed by dividing channels into groups. Each FEMB amplifies and digitizes 128 channels: 40 adjacent U-plane channels, 40 adjacent V-plane channels, and 48 adjacent collection-plane channels. The U-plane channels form a group, as do the V-plane channels and the collection-plane channels. For each of the three groups, a correction waveform is constructed based on the median value of samples from the group at every time tick and it is subtracted from each channel's waveform in that group. However, if the majority of waveforms contain signals of ionization electrons, it is necessary to protect this time region to avoid signal suppression. A region of interest (ROI) is defined as the ADC counts above an expected threshold as well as 8 (20) ticks before (after). As an example, event displays consisting of waveforms before and after the correlated noise removal (CNR) are shown in figure 13(c) and 13(d), respectively. The correlated noise is visible as vertical bands in figure 13(c), and it is suppressed in figure 13(d). Some sources of correlated noise remain in some portions of the detector, specifically those for which the spatial correlation does not coincide with FEMB boundaries.

Charge calibration
The ProtoDUNE-SP electronics provide the capability to inject a known charge in short-duration (< 1μs) pulses into each of the amplifiers connected to the TPC wires. The level of that charge is controlled by a six-bit voltage digital-to-analog converter (DAC) and is nearly linear with = where is the DAC setting (0, 1, . . . , 63) and the step charge = 3.43 fC = 21.4 ke, which is comparable to the charge deposition of a minimum ionizing particle traveling parallel to the wire plane and perpendicular to that plane's wire direction.
A charge calibration is carried out so that ADC counts read out for each channel may be converted to collected charge. The calibration is expressed as a gain for each channel normalized such that the product of the gain and the integral of the ADC signal over the pulse in a collection channel gives the charge in the pulse, i.e. = . The evaluation of charge for the bipolar TPC signals in induction channels is more complicated but also proportional to the gain derived here.
Special runs were taken with injected voltage regularly alternating between ground and the DAC level (one setting for each run) producing charge pulses of alternating sign. Fifty trigger records with typically 12 pulses of each sign are processed for each channel at each DAC setting. For each channel, the pedestal is evaluated for each event and a distribution of approximately 600 pedestal-subtracted areas in units of (ADC count)-ticks is obtained for each charge sign. The mean of these signal area measurements are plotted as a function of DAC setting using data from many runs, and a line constrained to pass through the origin is fit to DAC settings 1-7. The step charge divided by the slope of this line provides the calibrated gain for each channel. Figure 16 shows the uncalibrated area vs. DAC setting and the fit for a typical collection channel. The response is fairly linear over the DAC setting range (-5, 20) with saturation setting in outside this range. Typical track charge deposits are one to four times the step charge and this saturation is only an issue for very heavily ionizing tracks. The gain for this channel is = (21.4 ke)/(909.4 (ADC count)-tick) = 23.5 e/((ADC count)-tick). Figure 17 shows the residuals for the same data, i.e. the measured area minus that expected for the fitted gain Δ = − / . These results are typical -most of the measured areas for positive smaller ( ≤ 7, 160 ke) pulses are within 1% of their fitted values. The systematic shift for higher values is also typical and presumably reflects non-linearity in the DAC.
All 15,360 ProtoDUNE channels were calibrated in this manner, and those gains are applied early (before the mitigation and noise removal) in the typical processing of data from the detector. Figure 18 shows the distribution of these gains for all channels. Channels flagged as bad or especially noisy in an independent hand scan are shown separately. The gains for the remaining good channels are contained in a narrow peak with an RMS of 5.1% reflecting channel-to-channel response variation in the ADCs and gain and shaping time variations in the amplifiers.

TPC noise level
One very important goal for ProtoDUNE-SP is to demonstrate that noise levels are well below signals from charged tracks; this is found to be the case for nearly all of the channels in the detector. The noise is evaluated both for single ADC samples (sample noise) and for a contiguous range of 50 samples (integrated noise). The latter range is chosen to be sufficient to obtain the area of the signal from a charged track in the detector traveling in the plane. Tracks with other angles with respect to the electric field will leave longer pulses on the sense wires.
The noise is measured after initial data preparation. As discussed in section 4.1, the pedestal is evaluated for each trigger record, and the charge calibration is applied to the ADC count minus pedestal to obtain the initial charge measurement for each channel. Sticky codes are mitigated and the AC-coupling tails are removed in the collection channels. The noise is evaluated both at this point and after applying the CNR. The noise is expressed in units of collected electrons. To set -25 - The high rate of cosmic-ray signals -an average of one every 1500 ticks (0.75 ms) for the TPC-side collection-plane channels -complicates the measurement of the noise. To avoid contamination from these and radioactive (e.g. 39 Ar) signals, a signal finder is applied and the noise is defined to be the RMS ADC value outside the signal regions. For the integrated noise measurement, integration regions start every 50 ticks (i.e. at ticks 0, 50, 100, . . . ) and regions are discarded if they have any overlap with signal regions.

JINST 15 P12004
The signal finder used for this study makes use of a variable sample threshold and retains a region of (−30, +50) ticks around any tick with signal magnitude above that threshold. The threshold is evaluated independently for each channel in every trigger record. The threshold starts at 300 e and, if it is below five times the sample noise, is increased until it reaches that level. This allows efficient removal of signals in quiet channels while retaining the noise in those that are noisier.
Visual inspection of raw waveforms were performed to identify bad channels in the detector, mostly those with no signal or exceptionally high noise typically from sticky ADC codes. The number of such channels is 90, i.e. 0.6% of the channels in the detector. These are excluded from the noise summary plots below. Figure 19 shows the distributions of sample and integrated noise levels before and after correlated noise removal for trigger records 1-1000 of run 5240 taken October 12, 2018. The collectionplane and induction-plane channels are shown separately and, as expected, the noise levels are higher for the induction-plane channels as the wires are longer. For the collection channels, the sample noise is around 100 e before correlated noise removal falling to 80 e after the channel correlations are removed. The corresponding values for the integrated noise are 1200 e and 900 e.
For charge deposits much faster than the nominal 2 μs shaping time of the amplifier, the area of the resulting signal pulse is proportional to the height ℎ and shaping time : = ℎ . The shape is well understood [39] and has been verified with fits of the ProtoDUNE-SP pulser signals. Numerical integration gives = 1.269/tick = 2.538/μs. For such fast signals, the charge may be deduced directly from the pulse height and its standard deviation is called the ENC (equivalent noise charge) [39]. The ProtoDUNE-SP signals are slower than this but the ENC is a standard metric and is presented here to allow comparison with results from other detectors.
The ratio of ENC to sample noise defined here is /ℎ = . The actual shaping time varies from channel to channel but has central value around 2.2 μs which gives a ratio of ENC to sample noise of 5.58. With this factor and the above values for the sampling noise, the mean ENC for the collection channels is 530 e before correlated noise removal and 430 e after. The corresponding numbers for the induction channels are 620 e and 500 e. These noise values are similar to the 500-600 e values obtained from bench measurements with a prototype FEMB at LN2 temperature [3]. Figure 20 shows the noise frequency power spectra for data collected at the same time as those used for figure 19. For each channel, a signal finder with a dynamic threshold of five times the sample RMS in the non-signal region is used to identify signal samples. A discrete Fourier transform is performed on non-overlapping blocks of 1000 contiguous samples selected from the non-signal regions. The power spectra for good channels are averaged separately for each of the four wire types: TPC-side collection, cryostat-sided collection and the two induction orientations,  Figure 19. TPC sample (left) and 50-sample integrated (right) noise distributions before (top) and after (bottom) correlated noise removal. Each plot has one entry for each channel excluding bad channels with overflows shown in the last bin. Collection and induction channels are shown separately. U and V. These are normalized so that the sum over power terms or histogram entries is equal to the RMS charge per sample, i.e. the sample noise shown on the left side of figure 19.
As expected for effective removal of signals from the TPC, the power distributions are very similar for the TPC-side and cryostat-side collection channels. The induction wire distributions have similar shapes. The small spike around 300 kHz is due to pickup noise in one of the APAs. The CNR effectively suppresses both that and the excess noise below 100 kHz.

Signal processing
The recorded waveform on each TPC readout channel is a linear transformation of the current on the connected wire as a function of time. This transformation includes the effect of induced currents due to drifting and collecting charge, as well as the response of the front-end electronics. The goal of the signal-processing stage of the offline data processing chain is to produce distributions of charge arrival times and positions given the input waveforms. These charge arrival distributions are used in subsequent reconstruction steps, such as hit finding. Because the response is linear in the arriving charge distribution, a deconvolution technique forms the core of the signal processing.
A charge moving in the vicinity of an electrode can induce electric current. Shockley-Ramo theorem [40] states that the instantaneous electric current on a particular electrode (wire)   is held at constant voltage, is given by where is the charge in motion, and ì is the charge velocity at a given location. The so-called weighting potential of a selected electrode at a given location is determined by virtually removing the charge and setting the potential of the selected electrode to unity while grounding all other conductors. The field response is defined to be the induced current on different wires due to a moving point charge. The field response is an essential input to the signal processing procedure as will be discussed below. For ProtoDUNE-SP, the field response is calculated with Garfield [41], a TPC drift simulation code, in a 2D scheme as illustrated in figure 21(a). During the field response simulation, a point charge is positioned at different positions in a horizontal plane 10 cm away from the grid plane and the drift path is recorded from the simulation as shown in figure 21(b). The electron drift velocity can be determined from the electric field [42,43], while the precomputed weighting potential for a U-plane wire is also shown in figure 21(b). With the drift path and the weighting potential, the field response of the point charge on the sense wire can be calculated according to eq. (4.3). This procedure is repeated for a series of point charges that spans a region of 21 wires with the wire of interest at the center. In order to sample the rapidly-changing field response functions -29 -adequately, point charges are simulated drifting in from positions on a grid with a spacing of one tenth of the wire pitch. After convolving the electronics response, the total response as a function of time and wire pitch is presented in figure 22, where a "Log10" color scale is defined for the sake of visibility: As shown in figure 21(b), the weighting potential of the first induction (U) plane is significantly different from zero over a region of a few wires even with the presence of the grid plane. As a result, the current induced on a sense wire contains contributions not only from charges passing between the wire and its immediate neighbors, but also from moving charges that are farther away. A region that is 10 cm in front of the grid plane and ±10 wires around the wire of interest in the simulation is sufficient to envelope the field response. Figure 21. (a) Illustration of the 2D ProtoDUNE-SP TPC scheme for the Garfield simulation, where ±10 wires (large black dots) are considered for each wire plane and the electrons drift simulation starts 10 cm away from the grid plane. The inset shows the spacing of the starting points of the simulated electrons; (b) Garfield simulation of electron drift paths (yellow lines) in a 2D ProtoDUNE-SP TPC scheme and the equal weighting potential lines (green) for a given wire in the first induction plane, where the latter is shown in percentage from 1% to 45%. A long-range induction effect is noticed as the weighting potential has significant strength several wire spacings away from any particular wire.
In order to deconvolve the ionization electron distribution from the measured signal, it is natural to mathematically describe this long-range effect as follows: Figure 22. The overall response function convolved with electronics response. The color density is shown in a modified, sign-dependent base 10 log scale, as described in the text.
where measured signal ( 1 , 1 ) on the 1 th wire and time 1 is a convolution of i) the ionization charge distribution as a function of the position in wire number and the drift time: ( 2 , 2 ), ii) the field response that describes the induced current on the wires when the ionization charge moves: ( 2 − 1 , 3 − 2 ), and iii) the electronics response that amplifies and shapes the induced current on the wire: ( 1 − 3 ). For simplicity, one can firstly convolve the field response and the electronics response into the overall response function: ( 2 − 1 , 1 − 2 ), in which the fine-grained position-dependent field response function is averaged within one wire pitch.

JINST 15 P12004
Because of the long-range induction effect, instead of a 1D deconvolution involving only the time dimension, a two-dimensional (2D) deconvolution involving both the time and wire dimensions is performed to extract the ionization electron distribution. In practice, the FFT algorithm is used to convert the data from the discrete 2D time and wire domain to a discrete 2D frequency domain [44,45]. To avoid amplifying high-frequency noise in the deconvolution, two Wienerinspired filters are applied separately in both dimensions. In addition, to further reduce the noise contamination and improve the charge resolution, a technique for identifying the signal regions of interest (SROI) is adopted and adjusted accordingly. The application of SROIs are particularly important to process the induction plane signals. As an example, a raw waveform that has been de-noised as described in section 4.1 and the corresponding extracted charge distribution after the deconvolution are shown in figure 23(a) and figure 23(b), respectively.

Event reconstruction
There are two distinct steps in the ProtoDUNE-SP event reconstruction chain to go from the deconvolved waveforms to fully reconstructed interactions: hit finding and pattern recognition. These steps are described in sections 4.5.1 and 4.5.2, respectively.

Hit finding
The hit finding algorithm fits peaks in the wire waveforms, where a hit represents a charge deposition on a single wire at a given time. Each hit corresponds to a fitted peak. Ideally, after the deconvolution process described in section 4.4, the signals on all wires, regardless of whether they are inductionplane wires or collection-plane wires, will be waveforms containing possibly overlapping Gaussianshaped peaks. The algorithm searches for candidate hits in the waveform and fits them to a Gaussian shape to produce the hits. Situations can occur in which charge deposits do not form a simple Gaussian shape, for example when a particle trajectory is close to being in the plane containing the wire under study and the electric field. If, after the candidate peak-finding, a very large number of candidate peaks are found in a given SROI then the algorithm bypasses the hitfitting step and the pulse is instead divided into a number of evenly-spaced hits. An example of a fitted waveform is shown in figure 24, where three hits have been reconstructed. The two induction planes consist of wires that are wrapped around the APA. As a result, it must be determined on which segment of the wrapped wire that a given energy deposit was actually measured. Firstly, triplets of wires (one on each plane) are formed using signals within a narrow time window. Often, for a given collection wire, only a single pair of induction wires are matched, thus the hits are disambiguated at this stage. Otherwise, there can be multiple induction wires consistent in time with the collection wire. In this case, the algorithm aims to minimize the difference in charge between the collection wire and the candidate induction wires in a deterministic manner. A full description of the method is given in ref. [6]. Simulation studies show that this technique assigns more than 99% of hits to their correct wire segments.

Pattern recognition with Pandora
Pattern recognition in ProtoDUNE-SP is performed using the Pandora software package [46], which executes multiple algorithms to build up the overall picture of interactions in the detector. Pandora has been used successfully in other liquid argon time projection chambers (LArTPCs) such as MicroBooNE [47]. New features have been developed for ProtoDUNE-SP since it differs from MicroBooNE with its multiple TPCs and drift volumes in addition to the need for a testbeam particle specific reconstruction chain.
Pandora contains chains of reconstruction algorithms that focus on specific topologies, but they all follow a common pattern. The first step involves two-dimensional clustering of the reconstructed hits in each of the three detector readout planes separately. Dedicated algorithms then match sets of 2D clusters between the three views. If matching ambiguities are discovered, information from all three views is used in order to motivate changes to the original 2D clustering. Once consistent matches between 2D clusters have been made, three-dimensional hits are constructed and particle interaction hierarchies are created.
In the Pandora ProtoDUNE-SP reconstruction, all of the clusters are reconstructed first under the cosmic-ray hypothesis using a set of algorithms designed to reconstruct track-like particles. Cosmic-ray candidates are subsequently identified and removed so that beam-particle analysis can proceed. One important feature of the cosmic-ray reconstruction step is the "stitching" of tracks across the boundaries between neighboring drift volumes bounded by a CPA or an APA. The -33 -stitching procedure is applied when two 3D clusters have been reconstructed in neighboring drift volumes that have consistent direction vectors and an equal but opposite shift in the drift direction from the CPA or APA. When the clusters are shifted by this amount, a single collinear cluster with a known absolute position along the drift direction and time 0 relative to the trigger time is produced. Figure 25 shows the reconstructed 0 distribution for data and simulation for those cosmic-ray muon tracks that have been stitched at the cathode or anode. Cosmic-ray muons that cross the cathode have 0 values between −2500 μs and 500 μs, and those that cross the anode have −250 μs < 0 < 2750 μs. Tracks satisfying one or more of the following criteria are identified as "clear" cosmic-ray candidates: • The particle enters through the top of the detector and exits through the bottom.
• The measured 0 for stitched tracks is inconsistent with a particle coming from the beam.
• Any of the reconstructed hits appear to be located outside of the detector when assuming 0 = 0, which indicates that the object is inconsistent with the timing of the beam.
The hits from these clear cosmic-ray candidates are removed from the trigger record before the Pandora reconstruction chain continues to further process the data. These tracks, and in particular those with a measured 0 , form a critical component of the various detector calibrations detailed in section 6. Once the energy deposits from the clear cosmic rays have been removed, the reconstruction continues with a 3D slicing algorithm that divides the detector into spatial regions containing all of the hits from a single parent particle interaction. These 3D slices could contain beam particles or cosmic rays that were not clear enough to be removed in the first-pass cosmic-ray removal process. Two parallel reconstruction chains are applied to these slices -one is the aforementioned cosmic-ray reconstruction, and the other is a test-beam specific reconstruction. The test-beam specific reconstruction consists of a more complex chain of algorithms capable of reconstructing the intricate hierarchies of particles seen in hadronic interactions that can produce numerous track-like and shower-like topologies. Included in this reconstruction chain is a dedicated search for the primary interaction vertex of the test-beam particle. As well as being used to inform the clustering, the vertex is essential for constructing the correct particle hierarchy.
Once the slices have been reconstructed under both hypotheses, cosmic-ray and test-beam, a boosted decision tree (BDT) algorithm is used to determine which, if any, of the slices are consistent with being of test-beam origin. The input variables to the BDT primarily use topological information to measure the consistency of the interaction with the test-beam particle hypothesis. The output from the reconstruction is in the form of a particle hierarchy, where links are made between parent and child particles to give the flow of an interaction from the initial beam particle. Figure 26 shows an example of a fully reconstructed particle hierarchy for a simulated beam interaction, where the incoming beam + is shown as the magenta track. A suite of tools has been produced for ProtoDUNE-SP analysers to easily access this hierarchical information in order to perform the analyses.
The charge deposition per unit length, / is reconstructed for track-like objects such as muons, charged pions, kaons, protons and the beginnings of electromagnetic showers. The charge is taken as the area of the Gaussian fit to the individual hit. The segment length is calculated as the wire spacing divided by the cosine of the angle between the track direction and the direction normal to the wire direction in the wire plane. The raw / is further calibrated to remove nonuniform detector effects and converted to energy loss / for energy measurement and particle identification. This procedure is described in section 6.3.

Signal to noise performance
The measurement of the signal-to-noise ratio (S/N) for the ProtoDUNE-SP detector is carried out using a selected cosmic-ray muon sample in Run 5432 taken on Oct. 20, 2018. Muon tracks crossing the LArTPC at shallow angles with respect to the anode plane and large angles with respect to the direction of the wires in the planes are considered for the S/N characterization. To ensure good track quality, track length is required to be at least 1 m. The electron drift lifetime of the sample was approximately 24 ms as independently measured by the purity monitor.
The signal on each wire in a plane is defined to be the maximum pulse height of the raw waveform after subtracting the pedestal. The noise value is defined to be the standard deviation of a Gaussian function fit to the distribution of ADC values in signal-free regions of a channel's waveform. The signal size depends on the angle of the track with respect to the wire and also with respect to the electric field. We standardize the signal on a wire to be that from tracks that are perpendicular to the wire and also perpendicular to the electric field. We define two angles (the angle made by the projection of a track on the plane with the direction) and (the angle made by the projection of a track on the plane with the direction). The two angles are illustrated in figure 27. To minimize the influence of angular dependence of S/N, we select muon tracks that have minimum component in both drift and wire direction. Angle cuts of and within 20 • are applied. A correction is applied to the raw waveform signal to standardize the strength, adjusting for angular effects. The angle-corrected S/N distributions are shown in figure 28. No electron drift lifetime corrections are applied to the angle-corrected S/N calculations. The most probable values (MPVs) of the S/N distributions after the noise mitigation are 40.3, 15.1, and 18.6 for the collection plane, the U plane, and the V plane, respectively. The actual performance of the S/N for the three planes is much better than the expectation in the ProtoDUNE-SP technical design report [3] -9.0 for the three planes. The angle-corrected S/N results with and without the noise filters, together with the estimation using the averaged values of the S/N distributions, are summarized in table 3.
-36 - The differences in the average S/N values for the three planes is explained using the Shockley-Ramo theorem, discussed in section 4.4. The three planes have similar weighting fields but different local drift velocities. Among the three planes, the collection plane has the largest local drift velocity and hence the best S/N performance. The S/N performance is slightly better for the V plane with respect to the U plane. This is because the local drift velocity at the V plane is higher than that of the U plane due to larger bias voltage, while the weighting fields are the same for both.

The photon detector system
The ProtoDUNE-SP photon detector system (PDS) comprises 60 optical modules embedded within the six APA frames of the TPC. These modules view the LAr volume from each anode side opposite -37 -the central cathode. Three different photon collection technologies proposed for DUNE's far detector modules [3] are implemented in ProtoDUNE-SP's PD system. In each technology, incident LAr scintillation photons, which have wavelengths around 128 nm, are converted into longerwavelength photons using photofluorescent compounds as wavelength shifters (WLS). Visible light is trapped within the modules, a portion of which is eventually incident on an array of silicon photomultiplier photosensors (SiPMs) [19].

Light collectors
Each APA contains ten support structures located behind the wire planes for the PDS modules. Each module is a long, thin bar oriented along the axis. The spacing between modules in is approximately 60 cm, as illustrated in figure 29. Of the 60 modules, two are based on the ARAPUCA photon detector technology [48], 29 are dip-coated light guides [49,50], and 29 are double-shift light guides [51]. All light-guide modules have the same dimensions. The optical area of a module is 207.4 × 8.2 cm 2 in size, and the light is read out on one end of the bar. The ARAPUCA modules are segmented longitudinally (along the direction) into 12 cells, each with its own readout. The first eight cells each have an optical area of 9.8 × 7.9 cm 2 and the remaining four cells are double-area cells, each with an optical area of 19.6 × 7.9 cm 2 . One ARAPUCA module is located in the top half of the upstream APA in the beam-side drift volume. A second is located in the middle of the APA in the center of the opposite drift volume. The two light-guide designs fill the remaining modules in alternating positions in the APAs. One example of each module type is highlighted in figure 29, together with the photo-sensor arrays equipping the module. The installation of the modules within an APA behind the wire planes and a grounding mesh is also visible in figure 29.
The two light-guide designs convert incident VUV photons into the visible range using tetraphenyl butadiene (TPB) (emission peak ∼430 nm), while the ARAPUCA design uses p-terphenyl (PTP) (emission peak ∼340 nm). In the dip-coated acrylic light guide, wavelength-shifted photons are confined inside by total internal reflection and they are guided toward the end of the bar that is in optical contact with a photosensor array. The double-shift light guide contains an internal light guide doped with the second WLS (490 nm emission) to facilitate trapping of double-converted photons within the module and guide them toward the photosensors at the end of the bar. The ARAPUCA uses a dichroic filter window (400 nm cutoff) to reflect photons from a second WLS (TPB) inside the cell underneath the window and prevent them from exiting before they are absorbed or detected by the photosensors distributed inside the cell.

Photosensors
Three silicon photosensor models, each with an active area of 6 × 6 mm 2 , are employed throughout the photon detection system. They were selected among those that were available commercially or that were newly developed during the PDS material procurement phase: the SensL SiPM MicroFC-60035-SMT (35 μm pixel size) and two types of Hamamatsu MPPC S13360-6050 (50 μm pixel size) -the CQ-type (Quartz windowed for Cryogenic application) and the VE-type (VErtical through-silicon via). Arrays of photosensors of the same model are passively ganged together in parallel forming large-area single channels for voltage supply and signal readout. The arrays formed by three SensL SiPMs are indicated in the following as 3-S-SiPM, those formed by 3 Hamamatsu  The ratio of the photosensor area to the light collector surface area for the light-guide modules (0.26%) is lower than that of the ARAPUCA cells (4.2% and 2.1% for the cells with double area).

Readout DAQ and triggering
Unamplified signals from the photosensors in the LAr are transmitted outside the cryostat on copper cables. A dedicated, custom module was built for receiving and processing silicon photosensor signals for the trigger and DAQ. The module is called the SiPM Signal Processor (SSP). A selfcontained, 1U SSP module reads out 12 independent PDS channels. Each channel has a voltage amplifier and a 14-bit, 150 megasamples per second ADC that digitizes the (current) output signal from photosensors into analog-to-digital units. The front-end amplifiers are configured to be fullydifferential with high common-mode noise rejection. Each amplifier has on its input a termination resistor that matches the 100 Ω characteristic impedance of the signal cable. The least-significant ADC bit corresponds to 66 nA in this configuration. The digitized data are stored in pipelines in the SSP, corresponding to as much as 13.3 μs per trigger. The processing is performed by FPGA (Field-Programmable Gate Array). The FPGA implements an independent data processor for each channel. The processing incorporates a leading-edge discriminator and a constant fraction discriminator for sub-clock timing resolution. A block diagram of the system is shown in figure 30. Each channel is individually triggerable. Triggers can come from a periodic trigger, an internal trigger based on the leading-edge discriminator local to the individual channel, or an external global trigger distributed by the timing system as the general triggers issued by the beam line instrumentation (sections 3.1, 3.3). If a trigger is present, the channel will produce a data packet consisting of a header and a waveform (a sequence of values in ADU) of predefined length. An artDAQ process in the PD DAQ system (SSP boardreader) generates a fragment when the timing system produces a trigger. This fragment contains all packets received from the SSP with timestamps in a window −2.25 + 2.75 ms from the timestamp of the trigger. Each SSP fragment contains 12 packets, one for each channel, with identical timestamps corresponding to the trigger time, and an arbitrary number of additional packets generated for channels that have discriminators that fired.

Photon detector calibration and monitoring system
The PDS incorporates a pulsed UV-light monitoring and calibration system to determine the photosensors' gains, linearities, and timing resolution, and to monitor the stability of the system response over time. The system hardware consists of both warm and cold components. Figure 31 (left) shows a schematic of the ProtoDUNE-SP PD calibration and monitoring system. Diffusers mounted on the cathode-plane assembly panels serve as point light sources that illuminate the APA with the PDS modules on the opposite side of the drift volume. The location of the diffusers on the CPA panel is indicated by magenta discs. Also shown are the quartz fibers from the top of the CPA to the diffusers. The other CPA side holds a second set of five diffusers to calibrate the PDS in the opposite APA array.
The active system component is a 1U rack mount Light Calibration Module (LCM) sitting outside the cryostat. The LCM generates light pulses that propagate through the quartz fiberoptic cable to the diffusers at the CPA. The LCM consists of an FPGA-based control logic unit coupled to an internal LED Pulser Module (LPM) and an additional bulk power supply. The LPM utilizes multiple digital outputs from the control board to control the pulse characteristics, and it incorporates DACs to control the LPM pulse amplitude.
The calibration system produces UV light flashes with predefined pulse amplitude, pulse width, repetition rate, and total number of pulses. A typical photosensor response to low amplitude, shortest duration calibration pulses is shown in figure 31 (right) where many recorded waveforms are overlaid with the color indicating the frequency, as in an oscilloscope persistence trace mode. The UV light flashes can be produced in pairs with a fixed time difference between the two pulses to study timing properties of the photon system.

Photosensor performance
Silicon photomultipliers convert light flashes into analog electrical pulses. When a photon hits and is absorbed in a microcell of the avalanche photodiode matrix, an electron is lifted into the conduction band. If the bias voltage exceeds the breakdown voltage, this photoelectron creates an avalanche multiplication, with amplification (gain) typically in the 10 6 range, which leads to a rising current signal. Silicon photomultipliers are implemented as photosensors in the ProtoDUNE-SP PDS modules because of their compact design, low operating voltage and sensitivity to single photons. To overcome the limitation due to their small sensitive area (6 × 6 mm 2 ) and to limit the number of channels, arrays of photosensors are passively ganged together in parallel forming a large-area single channel for voltage supply and signal readout. The capacitance of the array however increases with the number of photosensors connected in the array, and correspondingly its recovery time. Therefore, the signal amplitude decreases and the intrinsic noise increases. Operating at cryogenic temperature helps reduce the dark count rate. On the other hand, correlated noise -afterpulses in the same pixel and optical crosstalk in neighboring pixels, both generated by the primary photoelectron event -is expected to grow at high signal gain settings. The adopted multiplicity of the arrays in the ProtoDUNE-SP PDS design (three per channel in the 3-S-SiPM and 3-H-MPPC for the electron bars and twelve per channel in the 12-H-MPPC for the ARAPUCA cells) and the working parameters for operation (bias voltage and gain) were determined with the requirement of acceptable signal-to-noise ratio allowing for sensitivity to single photoelectron discrimination with minimal secondary effects.
Fifteen channels out of a total of 256 show anomalous readings. There are two that appear to be disconnected. They fail their continuity checks and they have been unresponsive since the earliest tests after cabling. There are two that appear to respond anomalously to light signals. Their gains are similar to the others, but are somewhat higher, and their peak signal amplitudes are much higher than those of similar channels. The remaining 11 pass their continuity checks but they do not respond to light signals. These anomalous channels (all of the 3-S-SiPM type) have not been investigated further. No channels have changed state since detector operation began.
The photosensor response is characterized using dedicated calibration runs that have fast, lowamplitude LED flash triggers. Data are collected at several different bias voltage settings. These calibration runs are periodically repeated in time.

Single photoelectron sensitivity
Signal extraction and noise evaluation are performed for each recorded waveform. The waveform consists of 2000 samples of the photosensor output (in ADC units -ADU) at discrete, evenly spaced points in time ("time ticks" -tt). The sampling interval is 6.67 ns and the duration of the waveform is 13.3 μs. The trigger time, either from the global trigger or from the SSP internal trigger, is at a fixed time relative to the start of the waveform. Typical recorded waveforms are shown in figure 32.
The mean of the pedestal distribution, determined from a pre-sample portion of the waveform before the trigger, gives the baseline value and the spread ( ) is an estimate of the noise in the recorded event. After baseline subtraction, the charge of the signal (in ADU × tt units, proportional to number of electrons or fC, where 1 ADU × tt = 2750 electrons) is evaluated by integration -42 - of the portion of the waveform starting from the trigger time and extending over a 7 μs (1050 tt) time window. De-noising algorithms that preserve the signal rise time and integral [52] are applied to more precisely evaluate the maximum amplitude in the same window corresponding to the photoelectron current of the signal (in ADU or μA). During detector assembly, the photosensors for each of the three-and twelve-unit channels were pre-selected based on minimal difference in their nominal breakdown voltage (at warm temperature) from that listed in data sheets. After this selection, the spread in breakdown voltages among the sensors in the same 12-H-MPPC channel is typically Δ max bd ≤ 300 mV. All sensors in a channel are biased at the same common voltage B , and the pre-selection thus enables the photosensors in the channels to all operate in relatively similar working conditions. Typical charge (signal integral) and current (signal amplitude) distributions under pulsed LED illumination and with a nominal operating B setting are shown in figure 33 for a 12-H-MPPC channel (top row) and for a 3-S-SiPM channel (bottom row).
The multi-peak structure corresponds to detection of 0, 1, 2, . . . photoelectron-induced avalanches. The clear peak separation confirms good sensitivity to single PE detection for both the three-sensor and the twelve-sensor channels. The spread around the peaks in the charge spectra (left panels) is partly due to over-voltage difference among sensors in the array. The asymmetric distributions around the peaks in the signal amplitude spectra (top right panel) may be due to secondary avalanches from afterpulses and crosstalk in the sensors more visible in the H-MPPC due to the faster recharge time. The 1-PE charge directly measures the overall gain of the photosensor array at the applied bias voltage. The gain thus provides the charge per avalanche issued by the −th channel.
The gain as a function of bias voltage is shown in figure 34 for some of the 12-H-MPPC channels and 3-S-SiPM channels. The gain response to varying B is very uniform channel by channel, as indicated by the slopes of the lines in figure 34. On the other hand, the intercept with the horizontal axis, that defines the actual breakdown voltage bd of the multi-sensor channel at LAr temperature, shows a relatively large spread, particularly for the 12-H-MPPC channels.
At the reference bias setting adopted for PDS operation (

Signal to noise in photosensors in passive ganging configurations
The signal-to-noise ratio (SNR) is a good performance metric for the characterization of the photosensor component of the PDS during normal operating conditions. The SNR of the individual channel (three or twelve photosensors in parallel) at the reference bias voltage setting is here defined as: where, referring for example to figure 33 (left panels), the signal 1 is the mean value from the Gaussian fit of the one-PE peak (the minimal detectable signal), and the noise is evaluated from the Gaussian spread, 0 of the zero-PE peak. The SNR for all channels of the three types are shown in figure 35. For the 12-H-MPPC channels of the ARAPUCA modules, the SNR values are around 6, while for the 3-S-SiPM channels of the double-shift and dip-coated bar modules the SNR is in the range 10 to 12. The signal-to-noise ratio, as defined in equation (5.1), is directly proportional to the gain and the higher SNR shown by the 3-S-SiPM channels is primarily due to their higher oV setting adopted for operation.

Light calibration
Calibration of the light response is necessary to convert the charge signal from the photosensors into the corresponding number of photons detected. The detector calibration LED pulser is flashed synchronously with the data acquisition. Calibration runs at varying intensities of the flasher are needed in order to produce a suitable illumination in each PDS element. For each channel, the digitized waveform recorded in coincidence with the short LED pulse is baseline subtracted and the photosensor charge output is measured by waveform integration over a predefined time window (see section 5.1). Typical charge distributions with multi-peak structure from a LED calibration run are shown in figure 33 (left panels, top for a 12-H-MPPC channel and bottom for a 3-S-SiPM channel). Among the possible different calibration methods, the one adopted here relies on the statistical features of photon counting measurements under stable pulsed, low illumination conditions. The number of detected photons ( ) per light flash follows the Poisson distribution with , the expected mean number of photons detected per flash, whose value is directly related to the probability of detecting 0-photons in that flash:

JINST 15 P12004
The probability (0) can be estimated by the relative frequency of detecting zero photoelectrons in many LED trials, and from this the mean number of photons detected per flash is inferred: where 0 is the observed number of counts under the zero-PE peak (1st peak in the charge distribution of figure 33 -left panels) and Tot is the number of LED flashes in the calibration run. The mean number of photons per flash, , depends on the illumination level (LED flash amplitude). The illumination is maintained constant during the run and low enough to have sufficient probability of 0-photon detected. In addition to this, the measured rate is corrected for the accidental background rate of environmental photons, which are not correlated to the LED flash, that may be detected in the trigger window. The background rate is measured in the portion of the recorded waveforms before the LED trigger.   The photosensor response to detected photons, estimated by equation (5.3), is the mean charge output per flash in the calibration run (average of the distribution shown in figure 33 -left panels). The calibration factor for the iℎ PDS channel is thus determined by the ratio = / and represents the output charge per photon detected by the individual photosensor channel.
The charge issued when an incident photon is detected is expected to be, on average, larger than the single-avalanche induced charge. The comparison of the charge per photon detected (calibration factor -blue line) and charge per avalanche (gain -red line) as a function of the applied over-voltage oV is shown in figure 36 for a typical 12-H-MPPC channel (left), and 3-S-SiPM channel (right). The difference is due to the correlated noise contribution to the signal formation in the photosensor. This is found to grow exponentially with increasing voltage.

Afterpulses and crosstalk
A common feature of Si-photosensors is the generation of avalanche pulses subsequent to a primary event. The avalanche of a single microcell in a device has a finite probability of inducing an avalanche in neighboring microcells (optical crosstalk), or/and of re-triggering itself before the microcell is fully recovered (afterpulse). The rate of these secondary pulses increases at higher gain settings. The correlated noise due to these effects is a well-known limiting factor for a precise photon counting with silicon photosensors. The measurement of the charge per photon detected (the calibration factor , defined in section 5.2.3) and the charge per avalanche (the gain , defined in section 5.2.1) allows the calculation of the crosstalk and afterpulse probability for each photosensor by the ratio / in units of [Ava/Ph], average number of avalanches per photon detected. This ratio is sensitive to the over-voltage on the photon detector and can be used to monitor for changes in the operating characteristics of the photosensor as a measure of the stability of the PD system. Figure 37 shows the measured avalanche/photon value for each channel in the PDS. An average of ∼1.3 Ava/Ph is found for the 3-S-SiPM channels and the 12-H-MPPC, while a larger factor ∼1.6 Ava/Ph characterizes the 3-H-MPPC channels.

Response stability over time
The sensor gain, the calibration factor and the size of the afterpulse and crosstalk component of the signal can be used as a system monitor. Any drift in these parameters is an indication of instability in the system. The calibration data taken at various times during operation provide measurements that indicate the system stability as a function of time. Figure 38 shows the value of the gain for typical 12-H-MPPC channels and 3-S-SiPM channels over the course of several months. Within the uncertainties of the measurements, neither the gain nor the other parameters were found to be drifting over time for any of the sensors used in the ProtoDUNE-SP photon detector system.

Photon detector performance
The PD modules (ARAPUCA and light-guide bars) are exposed to scintillation light from ionization events in the drift volume. A fraction of the emitted photons impinge upon the optical surface of any given PDS module, and a charge signal is issued, proportional to the number of photons detected by the photosensors of the module. The detection efficiency of a PDS module is defined here as the ratio of detected photons to impinging photons. Test-beam data from particles of known type, energy and incident direction in the LAr volume are used to determine and thus evaluate the performance of the different detection technologies implemented in the PDS.
For each beam event, the number of detected photons Det is evaluated from offline data reconstruction (baseline subtraction, waveform integration and charge-to-photon conversion) for - 47 - . This simulation is performed with the LArSoft toolkit [53], which has a detailed description of the geometry of the ProtoDUNE-SP detector, including a proper description of the materials and the positions of the TPC components surrounding the LAr volume (APA, CPA, FC, as shown in figure 39). Simulation of beam events is performed with standard G 4/LArG4 generator within LAr-Soft. This accounts for the well known features of scintillation in liquid argon ensuing ionization processes.
Photon emission: the emission spectrum is a narrow band in the Vacuum-UV (VUV) wavelength range peaking around = 128 nm (FWHM 6 nm), exponentially distributed in time with two very different time components (fast ∼ 5 ns and slow ∼ 1.3 − 1.4 μs, with intensity ratio 0.3 in case of minimum ionizing particles). Electric fields applied to the LAr medium affect the intensity of scintillation emission. At 500 V/cm (ProtoDUNE-SP operation), a photon yield of 2.4 × 10 4 photons/MeV for minimum ionizing particles is assumed in simulations, 60% of the maximum yield measured at zero field. The relative uncertainty on the photon yield value is 8.5% [55]. The photon yield dependence on increasing linear energy transfer, the rate of energy deposited by ionizing particles, is not included in the current simulation.

Photon propagation:
LAr is transparent to its own scintillation light. However, during propagation through LAr, VUV photons may undergo Rayleigh scattering, absorption from residual photo-sensitive impurities diluted in LAr and reflections at the boundary surfaces that delimit the LAr volume. In the MC simulation, the Rayleigh scattering length, the reflectivities of materials for VUV photons, and the absorption length as a function of the impurity concentration are parameters that are fixed at their best estimates from existing data. Tracking each of the large number of VUV photons emitted in an event using G 4 is computationally expensive, so a pre-computed optical library is used to look up the probability that a photon produced at a particular location in the liquid -48 - Figure 39. 3D event display made with the Wire-Cell BEE display [54] showing data from a 7 GeV/ beam muon crossing the whole TPC volume, fully reconstructed by the LArTPC. Only tracks inside a predefined sub-volume (red box) are shown. The beam muon track enters near the cathode and propagates along the beam direction about 10 • downward and 11 • toward the anode plane. Ten bars are located in each APA frame. The dip-coated bars are indicated in blue, the double-shift bars in green and the segmented ARAPUCA bar in orange. argon volume is detected by a specific PDS channel. In order to create the optical library, the liquid argon volume is segmented into small sub-volumes (voxels) of size ∼ 6 × 6 × 6 cm 3 . For each voxel, a large number (of order 5 × 10 5 ) of VUV photons is sampled with an isotropic angular distribution. All photons are tracked using G 4, recording how many reach the sensitive area of each optical detector. In the simulation used to create the optical library, the Rayleigh scattering length for VUV photons in liquid argon is assumed to be 90 cm, according to the most recent experimental determination [56,57]. Due to the high level of purity during the beam run (Oxygen equivalent impurity concentration < 100 ppt), absorption by impurities is assumed to be negligible. Light reflection at VUV wavelength is low for perfectly polished metal surfaces (20% or less) and effectively null for any other material. The actual reflectance of the (extruded, non polished) Al profiles of the field cage surrounding the LAr drift volume is unknown and therefore it is set to zero in the current simulations. Once the library is created, ProtoDUNE-SP detector simulation jobs retrieve information from the library when the trajectory of a ionizing particle in the LAr volume is simulated by G 4, converting the number of emitted photons from energy deposited in each voxel directly into the number of photons impinging upon the area of each PD module coming from this given voxel. The uncertainty on the rate at which photons arrive at the detector after photon -49 -transport is dominated by the uncertainty on the Rayleigh scattering length. Neglecting reflections at the LAr volume boundaries is expected to be a subdominant effect. A relative uncertainty of 5% is assigned to the number of photons incident on the detector surface by varying the Rayleigh length by 20% around the nominal value in the simulation. The uncertainty on the possible bias due to the photon library parameterization is not included in the total uncertainty. Photon transmission at the anode plane: the optical surfaces of the PD modules lie immediately behind the four wire planes of the TPC and a fifth (grounding) plane made by the woven metallic mesh stretched across the APA frame (see section 2.2). A correction is applied to account for the light transmission through this series of parallel planes, which is not included in the detector simulation in LArSoft. The geometrical transparency of the mesh (percentage ratio of opening to total area, function of wire gauge and pitch) is 85% The transparency is reduced to 75% when the TPC wire planes above the mesh plane are also considered. This corresponds to the transmission upper value for orthogonal incident light. Transmission at any angle is then obtained based on a geometrical model, as illustrated in figure 40. A stand-alone simplified MC simulation is then performed to evaluate the transmission of light from beam events. Optical photon emission is sampled over straight trajectories crossing the LAr volume along the beam direction, nearly representing beam muon tracks, or sampled according to a spatial parametrization of electromagnetic showers, representing the longitudinal and transverse energy deposition from incident beam electrons. After photon propagation to the APAs, the angular distribution of incident photons on each PD module is folded with the transmission map to obtain the transmission coefficients for beam muons and beam electrons. These were found in the 65-71% range, mildly depending on the position of the PD module. The relative uncertainty on the transmission coefficients is evaluated to be 7% (one-sided) A simplified geometrical model is used in which VUV photons intercepting a wire of the mesh are absorbed (no reflection). The transmission coefficient shows a dependence on the polar angle of incidence ( ) almost flat with T=0.75-0.7 for photons incoming with < 45 • and then decreasing above that angle. Only a small modulation in the azimuthal angle is expected across the whole range due to the geometrical orientation of the wires and mesh planes ( = ±35.7 • , 0 • , 90 • ) and the gauge per pitch ratios ( / ).

A P A 3 A P A 2 A P A 1 C e n t r a l C a t h o d e (Muon) Beam Entry Point
-50 -to account for the simplified assumptions in the model (no reflection). The transmission coefficients for each module so determined are then used to scale down the number of photons arriving at the APA from the G 4 MC simulation of the beam events into the actual number of photons Inc incident on the surface of the PD module behind the APA.

Efficiency
Runs with beam momentum settings from 2 to 7 GeV/ are considered for the efficiency study. The muon and electron samples for the runs at different momenta are selected using the PID information from the beam instrumentation and the recorded light signals passing quality cuts are fully reconstructed (O(10k events/sample) for each run). Correspondingly, Monte Carlo runs were generated with muons or electrons entering the TPC volume from the beam-plug with the same momentum (nominal value and spread) and direction to reproduce the features of the H4-VLE beam line (see section 3). The MC samples were generated with the same number of triggers as were collected in the corresponding data samples. For each run the MC distribution of the number of photons in the event impinging upon the -th PDS element (light-guide module or ARAPUCA cell) and the distribution from real data sample of photons detected by the same module/cell are extracted.  figure 39). The number of detected photons increases from cell to cell along due to the increasing visibility of the muon track from the cells deeper into the LAr volume. In every cell the number of detected photons is observed to increase with incident muon beam momentum (open circles of different color in figure 41) due to the increase in the energy loss along the track for more energetic muons. Cells in the ARAPUCA module are of two types: the last four cells (channels = 9, . . . , 12) have double size but equal number of photosensors than the first eight. The high step in the number of collected photons Inc at = 9 -figure 41 (center) -reflects the double geometrical acceptance of these cells. A smaller step is observed in the detected photons Det (top). This is due to the halved photocathode coverage partly mitigated by the light trapping in the ARAPUCA cell.
For each light-guide module in the PDS beam side the number of detected photons and incident photons were evaluated in the same manner from the same beam muon samples (data and MC runs with beam momenta of 2, 3, 6 and 7 GeV/ ). The efficiency from the ratio of the detected to incident photons is shown in figure 42  number of suitably placed photosensors, and inversely correlated with the length of the optically active surface of a module with fixed width due to the attenuation of internally reflected optical photons. As a crude characterization, the smallness of the ratio of number of photosensors to optically active surface area of the light-guide modules relative to the ARAPUCA cells underlies the corresponding ratios of efficiencies. A factor of two can be gained by instrumenting both ends of the light guides, but improvement beyond that would require modification to the module design to enable effective deployment of additional photosensors.
-52 -2020 JINST 15 P12004  The response of the light-guide modules (beam side) to beam electrons were also used for efficiency measurements with beam momenta of 3, 6 and 7 GeV/ , excluding electron data at -53 -

JINST 15 P12004
2 GeV/ with the modules in APA1 at the farthest distance from the shower and low photon counting. Results are shown in figure 42 (right) for the ten double-shift light-guide modules in APA3 and APA2 and in figure 43 (right) for the nine dip-coated light-guide modules.
Efficiency: the photon detection efficiency was evaluated through 8 independent measurements using muon data and electron data at four different beam momenta, for each element of the PDS (12 cells in one ARAPUCA module, 15 double-shift light-guide modules and 14 dip-coated light-guide modules of the PDS beam side). By comparing the results, efficiency estimated from the electron data is found in all elements systematically higher than from the muon data, regardless of the energy of the particle [see figures 41 (bottom), 42 and 43]. The systematic difference may be due to bias in the MC simulation at the photon emission stage (e.g., an unaccounted deviation in scintillation yield for GeV-scale electrons and muons with respect to minimum-ionizing particles) and at the propagation stage (e.g., a difference due to the computational method used to approximate the number of photons reaching the PD optical window from localized volumes (EM showers) and long tracks (muons)). The mean value from all available measurements for the -th element is taken as the best estimate of the efficiency of that element, and the standard deviation that measures the dispersion around the mean is taken as an estimate of the systematic uncertainty on the efficiency. The statistical uncertainty, evaluated from the standard errors of the mean numbers of detected and incident photons in the data and MC samples of muons and electrons at different energies, is negligible. Table 5. Efficiencies of the detector technologies in the ProtoDUNE-SP PD system: median value among detectors of the same type, determined from the average of independent measurements with beam muons and electrons at different energies. The error is from systematic uncertainty, with negligible statistical uncertainty. The number of detectors of different types examined correspond to the fraction of PDS elements in the beam side upstream APAs (# 3 and 2), selected to determine the median efficiency reported in the efficiency column. Comparing modules or cells of the same type, relative variations in efficiency are within ±6% for the ARAPUCA cells, ±20% for the double-shift modules and greater than ±25% for the dipcoated modules. The median efficiency value with its statistical and systematic uncertainty from each group of detectors (˜,˜2,˜,˜) is selected to characterize the different technologies implemented in the ProtoDUNE-SP PD system. These value are reported in table 5. The overall relative uncertainty on the efficiency for all detector types is thus found to be 8.5% / 13.5%, as determined from the set of measurements described above. This appears compatible with the systematic error expected from uncertainty in the parameters of the photon emission and propagation used in the MC generation.

Comparisons of cosmic-ray muons to simulation
The analysis of photon signals from cosmic-ray muons provides a check on the validity of the photon simulation used to determine efficiency. Throughgoing cosmic-ray muons, or those which enter through the upstream face and exit through the downstream face of the cryostat, are isolated in the scintillation medium using CRT triggered events that have been matched to reconstructed tracks in the TPC. A trigger from this sub-detector involves a four-fold coincidence of the -and -measuring planes of the CRT over the span of 60 ns producing events that are very likely to contain a throughgoing cosmic-ray muon. Two strategies were employed, both using an event definition described by the sum of all detected photons in the twelve cells of the non-beam side ARAPUCA module during a 13.33 μs externally tagged PDS trigger. Before either analysis, the sum of photons per event collected at the detector surface in the simulation were scaled by a fixed amount in order to eliminate a systematic normalization difference with data. The first analysis, a comparison of the average light response as a function of transverse distance, was employed to observe some of the bulk effects of the medium. Here, the transverse distance is defined as the length of the segment between the reconstructed particle path and the center point of the ARAPUCA module as they occupy the same position along the axis. Since the ARAPUCA module is in the central APA (APA6), this variable is exclusively a function of the particle position in and as it bisects the detector in the direction, exploiting the symmetry of the detector. The results of this analysis, shown in the left plot of figure 44, suggest that the measured data favor simulation with Rayleigh scattering length hypothesis of 90 cm as opposed -55 -

JINST 15 P12004
to a Rayleigh scattering length of 60 cm in the scintillation medium. A second analysis compares each data track to a simulated track generated with matching position and trajectory in a medium with Rayleigh scattering length set at 90 cm. Results, which are shown in the right-hand plot of figure 44, demonstrate excellent agreement with simulation as a function of the transverse distance from the ARAPUCA to the reconstructed track. In comparisons of data to simulation, one standard deviation in the difference between the reconstructed simulated light and the measured reconstructed light is about 18.6%. These two comparisons show that photons are successfully reconstructed in ProtoDUNE-SP and that the simulation of the optical properties of scintillation medium is in a good agreement with the measurements.

Time resolution
The timing performance of the PD system intrinsically depends upon a combination of factors, from the intrinsic time resolution of the photosensor, to the electronics response of the readout board and signal digitization, to the features of the light propagation, wave-length shifting and photon collection by the PD modules. The overall timing performance is evaluated here in two different applications: time resolution of two consecutive light signals and time matching between light signal and TPC signal.
Resolving successive light signals in time is of importance in physics reconstruction of correlated events, such as stopping muon with decay to Michel electron, or kaon decays, or nucleus de-excitation into gammas after neutrino interaction. Some of these correlations may be observed with light signals in LAr depending on the PD timing performance. To explore this, data were taken with an external trigger from the LCM (Light Calibration Module) producing two consecutive LED flashes with a fixed time difference among them and from the common trigger time. The time difference between the pulses was set in the few μs range typical of the muon decay at rest, and much larger than the pulse width. In figure 45 (left) a recorded waveform from the LCM trigger is shown with the two generated consecutive LED pulses as detected by an ARAPUCA cell/12-M-MPPC channel and digitized by the SSP readout board. The rise time of each of the two signals from the common trigger was measured in the events collected with the LCM trigger and the distribution of their time difference Δ = ( 2 − 1 ) is shown in figure 45 (right). The time resolution to observe two separate light pulses is Δ 14 ns. Time jitter in the LCM pulse formation is small (sub-ns range) and the dominant factor is from digitization (6.67 ns sampling period).
An efficient light flash-to-track matching in LArTPC is important for a correct event reconstruction, background rejection (especially for LArTPC's operated on the surface) and low-energy underground physics.
An average of approximately 70 cosmic-ray tracks are observed overlaying each beam event during TPC readout window. The cosmic-ray tracks arrive at random times relative to the beam trigger. For some of these tracks, such as those that cross the cathode plane or cross one of the anode planes, their actual time of entering the LArTPC volume ( 0 time) can be reconstructed offline from the TPC data by using the 3D track reconstruction algorithms and the geometrical features of these CPA or APA crossing tracks. With the ProtoDUNE-SP TPC at its nominal electric field of 500 V/cm, the full drift time is 2.2 ms. Additional 2.25 ms (0.55 ms) are also recorded before (after) the drift time period, for a total of 5 ms TPC readout window per recorded event. Cathode or anode crossing muons have 0 time distributed over the entire recorded window and reconstructed with a precision of about 20 μs.    PDS detected light flashes corresponding to the 0 -determined TPC tracks are efficiently found in the packets received from the SSP and contained in the PD fragment of the event. Matching is performed in time inside the TPC readout range, looking for the closest flash timestamp to the 0 time of the track, within a given coincidence window. In the case of CPA/APA-crossing tracks the matching efficiency depends on the SSP discriminator threshold for the packet recording and to the width of the coincidence window. An example of flash-to-track matching is given in figure 46, showing the bisector correlation of PDS flash time and TPC track 0 time, for a 4500 APA/CPA crossing track sample. Tracks not matched to a flash are mostly the shorter CPA-crossing tracks whose flash was below threshold.

TPC response
The high-quality ProtoDUNE-SP data will be used to measure particle-argon interaction cross sections. Figure 47 shows various candidate events in the collection plane from ProtoDUNE-SP -57 -data after the noise mitigation described in section 4.1 and electronics gain calibration described in section 4.2. The color scale is in the unit of 1000 ionization electrons (ke).
It is essential to understand the charge response of wires in a LArTPC for calorimetry. In order to measure the particle energy loss per unit length ( / ), it is important to correct for nonuniformities in the detector response and determine the energy scale to convert charge to energy. This section describes the procedure and results of the calibration of the charge and energy loss per unit length of the ProtoDUNE-SP LArTPC. Section 6.1 discusses the calibration of space charge effects caused by the ion accumulation in the TPC. Section 6.2 describes the measurement of drift electron lifetime using TPC tracks and CRT information. Section 6.3 discusses the procedure to correct for remaining nonuniformities in the detector response and determine the energy scale. Section 6.4 shows the calibrated energy loss per unit length of different beam particles, including 1 GeV/ protons, muons, pions and electrons.

Space charge effects in ProtoDUNE-SP
As a detector located on the surface, ProtoDUNE-SP experiences a large flux of cosmic rays that results in a substantial amount of ionization produced in the detector per unit time. Along with the production of ionization electrons, argon ions are also produced in the detector by these cosmic rays. Because argon ions have drift velocities on the order of several millimeters per second at ∼ 500 V/cm in liquid argon, 2-4 × 10 5 times slower than ionization electrons at the same electric field, a considerable amount of positive space charge is expected in the detector as these argon ions build up on a timescale of roughly ten minutes. The convective flow of liquid argon in the detector has a similar velocity scale, and thus the space charge distribution depends on the velocity field of the liquid argon in the TPC. Asymmetries in the fluid flow are expected to produce asymmetries in the space charge distribution. The difficulty of predicting the exact fluid flow pattern necessitates a data-driven study. A steady flux of cosmic rays ensures that the positive ions are constantly replenished in the detector, leading to persistent distortions of the electric field in the TPC.
These electric field distortions alter ionization electron drift paths in the detector, leading to ionization charge being reconstructed at different positions in the detector than where the charge originated from. The electric field distortions also impact the amount of prompt electron-ion recombination experienced at the points of energy deposition in the detector. Both of these effects can bias reconstructed particle energies and trajectories, and by modifying reconstructed / along a particle track (or at the beginning of an electromagnetic shower), can lead to complications in particle identification in a LArTPC detector. As a result, space charge effects should be carefully characterized at any large LArTPC detector operating at or near the surface, and calibrated out when reconstructing particle trajectories, energies and / . The observation of transverse ionization charge migration during drift in early ProtoDUNE-SP data-taking, shown in figure 48, is consistent with a large positive space charge density in the center of the TPC pulling ionization charge inward toward the middle of the detector during drift toward the anode planes. This observation highlights the fact that significant space charge effects are present at ProtoDUNE-SP and need to be addressed when calibrating the detector. In contrast to the case of ProtoDUNE-SP, space charge effects are expected to be negligible at the single-phase DUNE far detector due to the very low cosmic-ray rate deep underground.   plane (right) in ProtoDUNE-SP data; the selected tracks are 0 -tagged by requiring that they cross the cathode plane ( = 0), as described in section 4.5.2. In the absence of space charge effects, the track end points should be reconstructed along the boundary of the TPC active volume (dashed lines). The gaps between the APAs can also be observed in the plane projection (vertical streaks in the middle of the image). Figure 49 shows the magnitude of spatial offsets at four faces of the ProtoDUNE-SP TPC (top, bottom, front or upstream with respect to the beam direction, back or downstream with respect to the beam direction); specifically, spatial distortions in the direction normal to each detector face are shown. These spatial distortions are estimated using the ends of reconstructed tracks that have been 0 -tagged in order to know their position in , the ionization drift coordinate. The transverse spatial distortion is determined by measuring the distance between the end of the track and the location of the detector face in the direction orthogonal to the detector face being considered. As illustrated in figure 49, spatial distortions as large as 40 cm are observed in ProtoDUNE-SP data, largest near the faces of the TPC and furthest from the anode planes; the latter observation can be understood as a result of charge originating further away from the anode experiencing space charge effects for a longer time, yielding a larger impact on drift path in the detector.
A dedicated simulation of space charge effects was developed for ProtoDUNE-SP, using a software package originally developed for MicroBooNE [58,59]. The analysis shown in figure 49 is for data; the same analysis applied to Monte Carlo simulated events is shown in figure 50.
Comparing figures 49 and 50, similar trends are observed in simulation as compared to data, building confidence that the spatial distortions observed in data are indeed a result of space charge effects. However, there are also several differences: • the magnitude of spatial distortions in data are generally larger than in simulation, by as much as a factor of two at some locations in the detector; • there is an asymmetry in the magnitude of the spatial distortions about the cathode ( = 0), which is not present in simulation; and • the trends in the spatial distortion maps differ qualitatively from the simulation in certain parts of the detector, such as near the top of the upstream and downstream detector faces on the > 0 side of the cathode. The first point above may be explained by a combination of potentially using an incorrect value for the argon ion drift velocity, which is not well known in liquid argon, and the possibility of liquid argon flow (not included in simulation) moving the argon ions around in the TPC in addition to their nominal drift in the applied electric field. The second and third points are potentially explained by the effects of liquid argon flow alone. These explanations are at present speculative; more detailed study is ongoing and will be reported in a future work.
Given the significant impact of space charge effects on particle trajectories, energies and / , as well as the inability for the dedicated space charge simulation to reproduce the observations seen in data, a data-driven simulation of space charge effects was produced for ProtoDUNE-SP using the results shown in figures 49 and 50 as a starting point. This data-driven map of space charge effects (both spatial distortions and electric field distortions, each with three components, for a total of six three-dimensional maps) can be "inverted" to remove effects of space charge in a calibration step for both events in actual data and those produced with this data-driven simulation. The data-driven spatial distortion and electric field distortion maps are produced using the following steps: • the two-dimensional transverse spatial offset maps at the four detector faces (top, bottom, upstream, and downstream) shown in figures 49 and 50 are used to form a "scale factor" map at each detector face by taking the ratio of the data map to the Monte Carlo map on a pixel-by-pixel basis; • the scale factor maps are used to rescale the simulated three-dimensional spatial distortion map by linearly interpolating the scale factors between the top and bottom detector faces for spatial distortions in the direction, linearly interpolating the scale factors between the upstream and downstream detector faces for spatial distortions in the direction, and performing the average of the linear interpolations in these two directions for spatial distortions in the direction; the voxel-by-voxel scale factor obtained in this way is used as a multiplicative factor to rescale the spatial distortion magnitude in the corresponding three-dimensional voxel (a "voxel" here refers to a volumetric pixel); • the resulting data-driven spatial distortion maps are then inverted in order to obtain "inverted spatial distortion maps" that can be used to calibrate out spatial distortions in reconstructed -62 -data or Monte Carlo events via repositioning reconstructed ionization charge space points in three dimensions back to their point of original deposition (see more below); and • the gradient of the spatial distortion along the local drift direction, determined using the inverted spatial distortion maps, along with the known ionization electron drift velocity as a function of electric field, are used to obtain the electric field distortion maps (in three dimensions) using a method previously explored at MicroBooNE [60].
The result of this procedure is a set of three-dimensional spatial distortion and electric field maps that are included in the ProtoDUNE-SP simulation used in the first results showcased in this work. The electric field magnitude variations in a couple of slices of the ProtoDUNE-SP TPC are shown in figure 51, comparing to the prediction of the original space charge effect simulation. It is observed in figure 51 that the electric field magnitude variations in data are as large as 25% with respect to the nominal drift electric field; an approximate estimate of the systematic uncertainty on this number is 5% with respect to the nominal drift electric field magnitude (20% relative uncertainty with respect to the full systematic effect), driven by the uncertainty in extrapolating spatial offsets from the detector faces into the center of the detector. The simulation utilizes the data-driven spatial distortion maps to modify the reconstructed position of ionization charge to better represent data events, while the data-driven electric field distortion maps are used to improve the prediction of charge yield after electron-ion recombination, as this effect is dependent on the local electric field magnitude.
Additionally, a calibration of particle / was developed for both tracks and the tracklike segments at the beginnings of electromagnetic showers measured by ProtoDUNE-SP. In this calibration, the spatial distortion map is used to correct for spatial squeezing/stretching of charge, impacting , and the electric field distortion map is used to correct for the electric-field-dependence of electron-ion recombination in the liquid argon, impacting . The performance of this first attempt at a calibration of space charge effects at ProtoDUNE-SP is demonstrated in several of the results presented in this work in sections 6.3 and 6.4.
The time dependence of space charge effects has been observed to be relatively small during the period of time that ProtoDUNE-SP was taking beam data, on the order of 5% of the total spatial distortion magnitude. A detailed study of the time dependence of space charge effects at ProtoDUNE-SP will be presented in a future work.

Drift electron lifetime
The liquid argon of the ProtoDUNE-SP detector contains impurities, such as water and oxygen, that can capture the ionized electrons as they drift towards the APA. Although the negative ions formed by the attached electrons still drift to the APA, they drift much more slowly than the unattached electrons and contribute negligibly to the signals measured on the APAs. The charge measured by the APAs then becomes reduced due to the impurities capturing the electrons, lowering and biasing the amount of charge measured on the wire planes. This effect is modeled as an exponential decay as a function of time: where ( ) is the charge measured on a wire, 0 is the initial charge created by the ionization of the argon accounting for recombination, 0 is the time at which the ionization took place, hit is the time the drifting charge arrived the APA, and is the drift electron lifetime. A larger value of corresponds to higher liquid argon purity, as fewer drifting electrons will attach to impurities as they drift to the APA.
Purity monitors located inside the cryostat, but outside the field cage, measure the drift electron lifetimes for the argon inside their drift volumes, and thus are not expected to measure exactly the drift electron lifetime in the TPC. Furtheremore, the electric field strength in the purity monitors is lower than the electric field strength inside the TPC. Since the rate of drift electron attachment to impurities depends on the electric field strength, the measured lifetimes in the purity monitors are expected to further differ from that in the TPC. In situ measurements of the drift electron lifetime from signals in the TPC therefore are needed in order to calibrate the results of charge-based analyses.
The drift electron lifetime inside the TPC is measured by fitting the / of collection plane hits from cosmic-ray tracks as a function of drift times. A sample of cosmic-ray tracks that pass -64 -through the front and back faces of the TPC and the CRT are selected. CRT data are used to calibrate track positions and to provide timestamps for TPC tracks.
The electron lifetime measurement starts by matching a CRT track to a TPC track using the positions of X and Y from both tracks. The timestamp from the CRT hits serve as the 0 for the TPC track. The / of a hit is defined to be the hit charge ( ) obtained from the area of a Gaussian fit to the deconvolved signal divided by the step length from the previous collection plane hit to the current collection plane hit.
To avoid the space charge effect distortions on the location of a TPC hit, the CRT track is used to determine the hit's position in X and Y as a function of Z, which is found through which collection plane wire the hit occurred. The track's position is then fed into the electric field calibration map from figure 51. This field map corrects the / by a scale factor based on electric field deviations from the space charge effect. The electric field distortions from the space charge effect were observed to cause at most a 1.75% difference in / along the drift distance. These calibrated measurements of calibrated / are fitted to a Landau function convolved with a Gaussian to find the most probable value (MPV) for 100 μs bin in time. An example of such a fit is shown in figure 52. The function that describes the drift electron lifetime then can be quantified by evaluating MPV / as such: where adjustments in the timing are made based on the timestamp provided by the CRT.  Data was taken using the CRT once it became operational on November 1st, 2018 and runs were taken with the CRT during beam data-taking from November 1st, 2018 to November 11th, 2018, the last day of beam. Fits to the MPV of the / distributions as functions of hit time are shown starting the first day in November and for the final day of beam data-taking in figure 53.
-65 -During the end of October 2018, the pumps that circulate and purify the liquid argon were not operating due to an external electrical issue. The pumps resumed recirculating and purifying on November 1st and typically take approximately a week to return the TPC back to its previous state of liquid argon purity. Because of this circumstance, these drift electron lifetime measurements show the structure of charge attenuation for a lower purity run and a higher purity run during purity recovery, respectively.  While the drift electron lifetime can represent the purity, another useful metric is the ratio of / at the anode and cathode or . This is calculated as follows: where full drift is the time it takes to drift from the cathode to the anode, which was measured to be 2.3 ms. Runs were taken with the CRT operating for the last week of beam data-taking. The / was measured for each day possible and occurred during a rise in purity in the detector. The systematic uncertainties determined for this measurement are from the uncertainty in the SCE calibration and impacts diffusion have on the hits as a function of drift time. The SCE effect uncertainty is estimated by evaluating the electron lifetime using a different SCE calibration map measured using cosmic muons that cross the cathode and both anodes of the TPC. The difference between the lifetime value obtained using this alternate map and the lifetime value obtained using the SCE calibration discussed in section 6.1 is defined to be 1 of the SCE systematic uncertainty. The uncertainty due to diffusion is estimated by turning diffusion off in the Monte Carlo simulation of the ProtoDUNE-SP detector, with a lifetime set at 35 ms. The difference in the electron lifetime values extracted with and without diffusion in the Monte Carlo simulation is taken to be the 1 variation due to the diffusion systematic, and is denoted diff . The fractional change in the lifetime due to diffusion is diff = 0.143, which corresponds to a difference in / by 0.7%, assuming an electron lifetime of 35 ms. This value of the fractional uncertainty in the lifetime is assumed for all dates investigated.
Towards the beginning of data-taking / was measured as low as 0.801±0.026, which is equivalent to an electron lifetime of 10.4±1.5 ms, as seen in figure 54. Toward the end of datataking, higher purity was achieved with a / of 0.9745±0.0063 on November 11th of 2018, a value close to a 100 ms drift electron lifetime.

JINST 15 P12004
the impurity can be described as follows: (6.4) with O 2 being the concentration equivalent if all impurities were from oxygen and being the attachment constant for oxygen [15]. Considering the inverse relationship between the drift electron lifetime and the amount of oxygen equivalent impurity, the estimate predicts the impurity never went above 40 ppt equivalent of oxygen in the week of data-taking. At the end of beam data-taking on November 11th, 2018, the impurity in the detector can be estimated to be approximately 3.4±0.7 ppt oxygen equivalent.

Calibration based on cosmic-ray muons
The goal of detector calibration is to convert the measured charge in units of ADC counts to energy in units of MeV, which provides important information for particle identification and energy measurements. In order to get reliable calorimetric information, a two-step calibration procedure is employed following the same method developed by the MicroBooNE collaboration [61]. In the first step, the detector response is equalized using throughgoing cosmic-ray muons. In the second step, the absolute energy scale is determined using stopping cosmic-ray muons. In both steps muons that cross the cathode are used because their 0 can be reconstructed (section 4.5.2). The two steps are described in the following sections, using the results for Run 5770 that was taken on Nov. 3, 2018 as an example.

Charge calibration
The charge deposition per unit length ( / ) in a LArTPC is affected by a number of factors including electronics gain variations, space charge effects, attenuation (due to electronegative impurities like O 2 and H 2 O), diffusion, and other effects. Some effects are calibrated out using measurements described in previous sections such as electronics gains (section 4.2) and space charge effects (section 6.1). Calibrating the electron lifetime in situ via cathode-crossing muons is complicated by the very complex space charge effects. Using the CRT allowed a much more precise calibration, but that system was not operable until late in the run and therefore those more precise lifetime measurements were not available for runs taken before then. The effect of diffusion has not been measured yet. In the equalization step, cathode-crossing cosmic-ray muons are used to calibrate the residual nonuniformity in the / values throughout the TPC after the gain and space charge effect calibrations. The following requirements are applied for track selection: • Fiducial volume requirements: the fiducial volume FV1 is defined as a rectangular prism shaped as follows: the boundary from the anode planes is 10 cm, the boundary from the upstream and downstream ends is 40 cm, and the boundary from the top and bottom of the TPC is 40 cm. In order for a track to be selected, its start point and its end point must be outside FV1.
• Angular requirements: the reconstruction capability of LArTPCs is limited for tracks that are parallel to the APA wires or contained in a plane containing a wire and the electric field direction. Figure 55 shows the / distribution as a function of and , the two Tracks passing the above selection criteria are used for / calibration. Corrections are obtained in the plane and as a function of the drift distance.

• YZ correction factors:
/ values in the plane are affected by many factors including non-uniform wire response caused by nearby dead channels or disconnected wires, detector features such as the electron diverters and the wire support combs, and transverse diffusion. Figures 56(a) and 56(b) show the / distribution in the plane separately for the > 0 drift volume and the < 0 drift volume. The vertical stripes in the < 0 plot show places where charge has been collected or distorted by the grounded electron diverters. The first APA on the left in figure 56(b) has a lower-than average / because of the partiallycharged disconnected G plane. The wire support combs also distort the / averages [5], but only by around 5%, and only in very localized positions that are narrower than the bin sizes in the figure. To correct for these non-uniformities we divide the plane in the two ProtoDUNE-SP drift volumes into a number of 5×5 cm 2 bins. Considering the / values of all the hits lying in a particular bin, the median / value is calculated and denoted ( / ) local YZ . Further, the median / value is calculated considering the hits throughout a drift volume, which is denoted ( / ) global YZ . The YZ correction factor is then defined as / distributions for ProtoDUNE-SP Run 5770 in the plane, for > 0 (a), < 0 (b), using cosmic-ray cathode-crossing muons. A sample of 99689 throughgoing cosmic ray muon tracks was used in making the plots, which constitutes 23.2% of the total number of cathode-crossing tracks in Run 5770. Figure 59 shows the / distribution for throughgoing cosmic-ray muons before and after charge calibration. Once the detector response is equalized, a sample of stopping cosmic-ray muons are selected to determine the absolute energy scale.

Energy scale calibration
The conversion between ADC counts and the number of electrons is primarily determined by the electronics response, including both the gain and the shaping time, and the field response. Even though the electronics gain is measured by the charge injection system (section 4.2) and the field response is calculated with Garfield (section 4.4), the estimated uncertainty on the measurement and calculation is at least a few percent. On the other hand, the energy loss per unit length for a -70 -2020 JINST 15 P12004   / distribution for throughgoing cosmic-ray muons before and after calibration.
-71 -minimum ionizing particle is known to better than 1%. Therefore, a sample of stopping cosmic-ray muons is selected to determine the absolute energy scale for both data and MC. The following cuts are used to select the stopping muon sample: • Fiducial volume cuts: cathode-crossing tracks which start outside FV1 and end inside a smaller volume FV2 are used. The FV2 volume is a rectangular prism inside FV1 shaped as follows: the boundary from the anode planes is 30 cm, the boundary from the upstream and downstream ends is 50 cm, and the boundary from the top and bottom of the TPC is 50 cm.
• Removing broken tracks: some muons are reconstructed as two or more tracks, which mimic a stopping muon. If the end points of the two tracks are within 30 cm and the angle between them is less than 14 • , both tracks are removed. Additionally, any track which starts or stops within 5 cm of an APA boundary are removed.
• Removing tracks with early and late hits: tracks that are cut off by the 6000-tick TPC readout window boundaries may mimic a stopping muon. If any hit associated with a track has a peak time less than 250 ticks or greater than 5900 ticks, the track is removed.
• Removing tracks with Michel hits attached: the presence of an Michel electron can confuse the reconstruction of the muon end point so muons that decay into Michel electrons are removed. The Michel activities are identified by looking for isolated hits close to muon end point. The number of hits within ±5 wires and ±50 ticks from the last hit of the muon track and not belonging to the muon track or any other track longer than 100 cm is counted. If the count is greater than 0, such tracks are removed.
After applying the above selection cuts, a highly pure sample of stopping muons remains. Defining the purity as the number of true stopping muons divided by the total number of candidate stopping muons in our sample, a purity of 99.74% is achieved based on Monte Carlo study. The / values are corrected as described in the previous section. The most probable / value as a function of residual range for stopping muon tracks in LAr is accurately predicted by Landau-Vavilov theory [62]. From the calibrated / values (in ADC/cm) along the muon track in its MIP region (120 to 200 cm from stopping point), the / (in MeV/cm) values are fitted using the modified Box model [63] function to correct for the recombination effect with the charge calibration constant cal (ADC×tick/cm → e/cm) as a free parameter in the 2 minimization. cal is effectively a scaling factor that accounts for the electronics gain, ADC conversion and other residual effects that are not explicitly calibrated out. The energy loss from the stopping muon sample and a comparison with the theoretical prediction in figure 60 show the result of the calibration procedure for ProtoDUNE-SP Run 5770 and the corresponding Monte Carlo sample.

JINST 15 P12004
where cal = Calibration constant used to convert ADC values to number of electrons, ion = 23.6 × 10 −6 MeV/electron (the work function of argon), E = field based on the measured space charge map, = 1.38 g/cm 3 (liquid argon density at a pressure of 124.106 kPa), = 0.93, and = 0.212 (kV/cm)(g/cm 2 )/MeV. and are the Modified Box model parameters which were measured by the ArgoNeuT experiment at an electric field strength of 0.481 kV/cm [63].
The calibration constant cal is normalized so that the unit ("ADC×tick") corresponds to 200 electrons. In the case where the detector response is perfectly modeled (e.g. in the simulation), the calibration constant cal should be exactly 1/200 = 5×10 −3 ADC×tick/e. The calibration constants derived for the collection plane by fitting the stopping muon samples to the predicted / curve are shown in table 6. The uncertainties are statistical only. The difference between data and MC calibration constants is caused by the uncertainties on the gain measurement and the simulation of detector response.

Calorimetric energy reconstruction and particle identification
The calibration constants derived from cosmic-ray muons are applied to beam particles. The following sections discuss the / distributions for beam muons and pions (section 6.4.1), beam protons (section 6.4.2) and beam electrons (section 6.4.3). The identification of MIP particles (muons) and non-MIP particles (protons) is discussed in section 6.4.2.

Identification and calorimetric energy reconstruction of 1 GeV/ beam pions and muons
Measurements of charged pion interactions with argon nuclei are an important physics goal of the ProtoDUNE-SP experiment. Accurate measurement of these interactions allows a more precise understanding of neutrino interactions producing final-state pions, a key study channel of the DUNE experiment. Reconstructing these final state pions and any particles produced by their secondary interactions is important for estimations of neutrino energy. This section describes the results obtained from ProtoDUNE-SP Run 5387 taken on Oct. 18, 2018 corresponding to approximately 12 hours of exposure to a 1 GeV/ beam. The electron drift lifetime of this run was approximately 14 ms as measured by the purity monitor. be found in table 2. At a beam momentum of 1 GeV/ the measured TOF of pions and muons is indistinguishable so the PID will select both pions and muons. Events are first removed for periods of unstable HV or one or more inactive TPC readout boards. The Pandora pattern recognition framework, described in section 4.5.2 is used to reconstruct the particle trajectories in the TPC as well as identify a reconstructed particle as a likely candidate for the beam line track. To remove events where a track has been incorrectly identified as the primary beam particle, quality cuts are placed on the distance and angle between the end of the beam line particle's reconstructed trajectory and the start of the assigned reconstructed TPC beam particle track. These cuts remove backgrounds that are not aligned with the measured beam line track such as cosmic rays and secondary particles produced by the beam particle interacting upstream of the TPC. The cuts used for data are as follows: • Beam quality cuts: angle The cosine of the angle between the beam line track and reconstructed TPC track is required to be > 0.93.
• Beam quality cuts: position where Start TPC is the start position in X of the reconstructed candidate beam track in the TPC before SCE corrections. End Beam is the projected X location of the intersection of the track from the beam line instrumentation with the TPC. The cuts are not centered around zero due the SCE shifting the start points of the reconstructed TPC tracks.
A replica selection is also placed on beam MC events where the true simulated beam particle is either a pion or muon. In MC the truth information of the beam particle is used in place of the beam line information. The cuts used for MC are as follows: • Beam quality cuts: angle The cosine of the angle between the true beam particle and reconstructed TPC track is required to be > 0.93.
• Beam quality cuts: position Here End Beam is the projected X location of the true beam particle's intersection with the TPC and Start TPC is same as for data.  Figure 61. The ratio of track length (SCE corrected) and continuous-slowing-down-approximation (CSDA) length for data candidates under the assumption the particle is a muon. The cut to select the stopping muons is indicated. The histogram is normalized such that the maximum frequency is one.
-75 -Selection of stopping muons: the track lengths of the selected beam particles can be used to separate the beam pions and muons. As 1 GeV/ pions have an expected interaction length in argon of 1 m the majority of pions will interact before coming to a stop via ionization energy loss. Whereas 1 GeV/ muons will stop predominantly via ionization energy losses with an expected path length in argon of~4 m. The measured beam momentum is used to approximate the stopping range of each particle under the assumption it is a muon using the continuous-slowing-down-approximation (CSDA) range [64]. The distribution of the beam tracks' reconstructed lengths divided by their calculated CSDA ranges is shown in figure 61. Requiring the ratio 0.9 < Track Length CSDA Stopping Range < 1.1, (6.10) selects a subsample of stopping particles, predominantly muons. A replica selection cut is placed on the MC sample using the simulated momentum for the true beam particle in each event as input to the ratio calculation. / distributions for the ProtoDUNE-SP beam data after applying the calibration derived using cosmic-ray muons. The distribution for replica selections on a beam Monte Carlo sample with space charge effect simulated is also shown. The histograms are normalized such that the maximum frequency is one.
Calorimetric energy information of beam pions: the charge signal calibration produced from stopping cosmic-ray muons collected during the same run period described in section 6.3 is applied to the selected beam tracks to calculate the true deposited energy as a function of distance ( / ) along their trajectory. Figure 62(a) shows the distribution of / values of all hits on the collection plane from the selected beam pion candidates. That is, all candidates that are not selected by the stopping muon cut (eq. (6.10)) described above. The selected particles are MIPs. The MPVs of the calibrated data and MC samples agree to better than 1%.
Calorimetric energy information of beam stopping muons: figure 62(b) shows the distribution of calibrated / values of all hits on the collection plane from the beam muon candidates selected by the stopping particle cut (eq. (6.10)). As with the pions, the MPVs of the data and MC samples agree to better than 1%. The distribution of the / vs residual range for the selected -76 -2020 JINST 15 P12004 / vs residual range for selected stopping muons in the 1 GeV/ beam after applying the calibration derived using cosmic-ray muons, in data (a) and MC (b). The expected most probable value of / is plotted as a function of residual range for both.
stopping muons is shown for data in figure 63(a) and for MC in figure 63(b). A clear Bragg peak is seen at low residual range, as expected. The measured distribution displays good agreement with the theoretical MPV curve for a stopping muon in argon, in both the minimum ionization region and Bragg peak region of residual range.

Identification and calorimetric energy reconstruction of 1 GeV/ beam protons
To understand the detector response to protons interacting in a LArTPC, an analysis procedure, including the selection of beam protons, detector calibration and calorimetric analysis, has been developed. This section describes the results obtained from ProtoDUNE-SP Run 5387. Stopping protons are used for the detector characterization in terms of calorimetry and particle identification. Protons are selected using the same beam-TPC matching criteria described in section 6.4.1. For the 1 GeV/ beam momentum runs considered here, the beam line PID conditions for protons can be found in table 2.
The measured beam momentum is used to approximate the stopping range under the assumption it is a proton using the CSDA range. Figure 64 shows the distribution of the reconstructed proton track lengths, divided by their expected CSDA ranges. The distribution peaks at 0.88, which is dominated by the stopping protons. The peak position is less than one because of the energy loss upstream and the SCE. The tail on the left of the distribution is due to the interacting protons, since their drift distances inside the LAr are shorter than those of the stopping protons. The ratio cut, 0.74 ≤ (reconstructed proton track length/CSDA range) ≤ 1.09, is used to select the stopping protons.
After the proton event selection, the data-driven corrections, described in section 6.1, are applied to correct for both the spatial and the -field distortions due to the SCE. After these corrections, the / values (ADC/cm) of the stopping protons are converted to the corresponding / values (MeV/cm) using the calibration constants described in section 6.3. The same analysis procedure is applied to a Monte Carlo sample. The histogram is normalized such that the maximum frequency is one. The incident beam momentum is 1 GeV/ . The cut to select the stopping protons is indicated.
good agreement with the expected MPVs. The distributions of / in the data and the MC are shown in figure 65(c). The MPVs of the / distributions between data and MC agree to better than 1%.

/ for 1 GeV/ electrons
It is important to understand the LArTPC response to electromagnetic showers since DUNE will measure electrons coming from oscillated neutrinos, produced via charged current interactions. Accurate measurement of the calorimetric response of electrons in the ProtoDUNE-SP TPC allows a more precise understanding of / separation and estimation of electron neutrino energy. The / for a photon-induced shower is expected to be twice the / of a single electron at the beginning of the shower, due to the photon conversion into an electron-positron pair. This has been verified in a LArTPC by the ArgoNeuT collaboration [65]. To successfully select charged-current interactions in DUNE, a / metric can be used to remove electromagnetic-like background from interactions such as neutral-current 0 production where the photons from 0 decay can mimic an electron shower.
Electrons are selected in Run 5809 taken on Nov. 8, 2018 using the same beam-TPC matching criteria described in section 6.4.1. For the 1 GeV/ beam momentum runs considered here, the beam line PID conditions for electrons can be found in table 2.
The reconstruction of electron-induced showers in the detector follows the same procedure as in track-like events. Signal processing (including deconvolution and noise removal) is followed by hit finding and 2D cluster formation. The reconstruction framework Pandora [46] is used to reconstruct 3D showers. The position and the direction of the shower are used to define the beginning of the shower, which is before the electromagnetic cascade develops. To ensure that the electron candidate has not developed a cascade shower before entering the active TPC volume, a completeness cut was -78 -2020 JINST 15 P12004 required. The completeness is defined as the reconstructed shower energy divided by the incoming electron's momentum. Based on MC studies we expect to have losses due to energy loss upstream and due to signal processing thresholds. If the completeness is at least 80%, the event is selected.
To measure / , first, the charge deposition per unit length / is measured on a single wire at the collection plane. To calculate the effective pitch between hits, the direction of the shower is used to measure the actual distance that the electron traverses in the TPC between adjacent wires. Then, following the discussion in section 6.1 the SCE corrections are applied. The conversion from / to / uses the calibration constants described in section 6.3. To measure / at the beginning of the shower, only hits within 4 cm along the direction of the shower and 1 cm perpendicular to the shower are considered and the median / is computed. The same analysis procedure is applied to the Monte Carlo sample.

The
/ distributions for 1 GeV/ electron candidates are shown in figure 66. The / distributions in figure 66 follow the expected Gaussian-convolved Landau distribution with the / peak value corresponding to one single ionizing particle. This results demonstrates an understanding of the / metric for electrons that would be a valuable input for future analyses. Electrons are selected using the same beam-TPC matching criteria described in section 6.4.1. For the 1 GeV/ beam momentum runs considered here, the beam line PID conditions for electrons can be found in table 2.
The / distributions for various particle all show a good agreement between data and MC in the peak. However, the resolution of / is slightly overestimated in the MC. This could be due to the imperfect modeling of physics processes and/or detector effects.

Particle identification: protons and muons
Robust particle identification (PID) is of fundamental importance for the physics goals of ProtoDUNE-SP and the future DUNE experiment. The calorimetric-based PID method in a LArTPC uses the reconstructed energy deposits as a function of residual range for the stopping particles. Event selections of the stopping muons and the stopping protons are described in section 6.3.2 and section 6.4.2, respectively. The stopping protons and muons are shown in figure 67(a). The highly ionizing protons are clearly separated from the muons over the entire range from their stopping points.
Based on the obtained calorimetry information, a likelihood-based parameter, , is adopted to quantify the PID performance of the ProtoDUNE-SP detector. The method is to compare the particle species with respect to the stopping proton hypothesis. The parameter is defined to be: where is the -th measurement before the end of the track, ( ) is the associated error of the -th hit, covers the measurements over the last 26 cm of the track, and T is the total number of hits. Only the collection plane information is used. Figure 67(b) shows the distributions of the stopping protons and the stopping muons. The protons and the muons are well-separated. The PID performance for pions is expected to be similar to that of muons.

Photon detector response
Homogeneous calorimeters are instrumented targets where the kinetic energy ( ) of incident particles is absorbed and transformed into a detectable signal. The deposited energy is typically detected in the form of charge or light. When the energy is large enough, a shower of secondary particles is produced (through electromagnetic or strong processes) with progressively reduced energy. If the shower is fully contained and the output signal is efficiently collected, the calorimetric energy resolution is expected to be good, improving with energy as 1/

√
. Calorimeters can also provide information on shower position, direction and size as well as arrival time 0 of the particle.
A LArTPC is a sophisticated version of a homogeneous calorimeter, with additional imaging and particle identification capabilities. Energy deposition in the liquid argon target yields free charge from ionization and it also yields fast scintillation light. The best energy resolution would be obtained by collecting both the charge and the light signals, which are anticorrelated by the randomness of the recombination processes. With detectors based on LArTPC technology, calorimetry typically relies only on the charge signal collection, while the use of the light signal is limited to 0 determination and triggering purposes. A first attempt to extend the use of scintillation light for calorimetry was recently performed in a low energy range with a small sized LArTPC [66]. Operating protoDUNE-SP on the H4-VLE charged particle test beam offers the opportunity to directly probe with light the calorimetric response of liquid argon to fully contained EM and hadronic showers in the sub-to few-GeV energy range.

Calorimetric energy reconstruction from scintillation light and energy resolution
As described in section 5.1, in ProtoDUNE-SP the photon detection system comprises a series of optical modules positioned inside the APA frames, behind the TPC wire planes and the grounded mesh. The active liquid argon volume is only on one side of the APA's, on the side facing the central cathode. The total photo-sensitive area is ∼ 1.5% of the boundary surface of the LAr volume. The relatively modest optical coverage and the one-sided geometry of the PD system, compared -81 -for example to the 4 coverage of scintillation or Cherenkov detectors, are expected to limit the light yield and the uniformity of the calorimetric response along the drift direction. In this section, beam electrons and data from the ARAPUCA module in the beam side of the PDS are utilized to investigate the light yield and resolution of the ProtoDUNE-SP PD system. Figure 68. 3D event display of a real 7 GeV beam electron in the TPC volume [only tracks inside a predefined sub-volume (red box) are shown]. The beam electron enters near the cathode and an EM shower develops in LAr along the beam direction, about 10 • downward and 11 • toward the anode plane, where the PDS beam side modules are located inside the APA frames. Scintillation photons from energy deposits along the shower are detected by the ARAPUCA module.

Beam electrons and EM showers
In a sequence of beam runs, data were collected with incident positive electrons ( + ) with energies of 0.3, 0.5, 1, 2, 3, 6 and 7 GeV, providing a large sample of EM showers developing in the LAr volume. The beam is delivered with a typical momentum spread of ±5% around the nominal setting. The beam line instrumentation (see section 3.3.1) provides an event-by-event particle identification and momentum measurement with a precision of Δ / 2.5% [27]. Light signal from the single beam side ARAPUCA module is used for this calorimetric response study. The ARAPUCA module is positioned inside the upstream APA3 frame, nearly at the same height of the entering beam and oriented along the axis. In figure 68 a 3D display of a 7 GeV electron event from the ProtoDUNE-SP data sample is shown as reconstructed by the TPC. The EM shower develops immediately downstream of the beam entry point in the LArTPC volume in front of the ARAPUCA module, at ∼3 m distance in the (drift) direction, and propagates longitudinally along the beam direction, about 10 • downward and 11 • toward the anode plane. Scintillation light is emitted isotropically from every location at which ionization occurs along the shower. The total photo-sensitive area of the ARAPUCA module is ∼ 0.5 × 10 −3 of the surface surrounding the LArTPC active volume (beam side). Summing over the twelve cells in the ARAPUCA module, the total number of photons detected Ph = Det is evaluated event by event, for each beam run.
Monte Carlo events, already used for the efficiency study, are also available, generated as described in section 5.3 with incident electrons as in the beam runs (same energy distributions and direction). Scintillation light from the EM shower development in LAr is propagated to the photo-detector(s) and the total number of photons incident on the surface of the ARAPUCA module is evaluated for each event of the MC simulated momentum run. In figure 69, the energy distribution (left) of the incident electrons from the beam spectrometer of the CERN H4-VLE beam line for each beam run and the corresponding calorimetric response from the ARAPUCA detector (right) expressed by the number of detected photons are shown. A Gaussian fit of both distributions (red lines in figure 69) gives the average electron energy e and the corresponding average photon counting Ph , and their spreads ( , ), for each run. The average number of detected photons as a function of the beam energy is shown in figure 70. This relationship gives the calorimetric energy response from light data. Correspondingly, the response as obtained from the MC simulation, expressed by the average number of detectable photons (incident at the detector surface) from EM showers at given electron beam energy, is presented in figure 71 (left).
To a first approximation, the average light response is a linear function of the energy over the entire range of tested beam energies as shown in figure 70 (left) with the result of the linear fit.
-83 -The slope of the fit 1 gives the light yield light = 102.1 photons/GeV. The quoted light is relative to a diffuse light source (EM shower) at a distance of about 3 m (see figure 68). The non-zero (negative) intercept ( 0 = −8.4 photons from the fit) corresponds to an incident energy offset of −82 ± 14 MeV from the nominal value for all beam energies. From the CERN H4-VLE beam line MC simulations (section 3.2 and 3.3) beam electrons are expected to release 10-20 MeV in the material in the portion of the beam line downstream the spectrometer and additional ∼ 20-30 MeV while crossing the materials inside the cryostat from the end of the beam pipe and the active volume of the TPC (cryostat insulation and membrane, beam tube and a thin LAr layer in between). The observed energy offset from the linear fit of the light response provides direct evidence, though in slight excess, of the expected energy loss of beam electrons before entering the LArTPC. A slight deviation from linearity is observed in the light response at higher incident energies, both in the data (figure 70 -left) and in the Monte Carlo (figure 71 -left). This is due to the light response dependence on source-to-detector distance. At higher energies, the longitudinal shower profile extends deeper in the LAr volume along the beam direction and closer to the ARAPUCA module, with some increase of visibility. Based on the reconstruction of the shower profile at the different incident electron energies (see figure 41 -top-right), a geometry correction to the cells' acceptance has been calculated and a normalization factor applied to the data at different energies. Most of the nonlinearity was then removed. The intercept of the linear fit after correction indicates an energy offset of -56 ± 14 MeV, in better agreement with the expected beam electron energy loss in the materials before entering the TPC -details of this study can be found in [67]. Based on the linearity of the light response, the relative calorimetric energy resolution / e is obtained from the / Ph ratio of the light response ( figure 70 -right). The energy resolution, as for a homogeneous calorimeter, can be expressed in a general form [68] depending on three different contributions: where the symbol ⊕ indicates a quadratic sum and is in GeV. The terms on the right-hand -84 -side are referred to below as the "constant term", the "stochastic term" and the "noise term." The relative weight of the three terms depends on the energy of the incident particle. The stochastic term contribution to the energy resolution comes from the statistical fluctuations in the number of photons detected. The relatively large value ( 1 = 9.9%) -when compared to typical homogeneous calorimeters -is ascribed to the limited photo-sensitive coverage of the ARAPUCA module. The noise term comes from the electronic noise of the readout chain. Its value ( 2 = 0.057 GeV) is exactly as expected from the measured signal-to-noise-ratio of the ARAPUCA readout (section 5.2.2). The constant term is large ( 0 = 6.2%) and due to different contributions. The main one comes from the incident beam electron energy spread ( figure 69 -left), depending on the actual beam line configuration (collimators aperture at different momentum setting). The mean value of the relative energy spread / = (5.8 ± 0.4)%. An additional contribution comes from fluctuations in the energy loss in the materials before electrons enter the TPC. Since the energy loss occurs downstream of the momentum spectrometer, this energy degradation and its fluctuation do not appear in the incident beam energy spectra and it is evaluated by simulations (∼ 2%). Other contributions to the resolution, such as non-uniformity on the detector illumination, channel to channel response variation and possible shower leakage across the cathode, have been investigated and shown to be negligible [67]. The light yield and resolution response obtained from a single ARAPUCA module is adequate. An extrapolation of the performance to a PDS system consisting entirely of ARAPUCA modules, obtained by scaling the detected photon response of the light guide bars with the ratio of the ARAPUCA-to-light guide efficiencies (presented in section 5.3.1), indicates that it can perform calorimetric energy reconstruction with an expected light yield of 1.9 photons/MeV. This performance exceeds the specifications of the DUNE Far Detector [5] by almost a factor of four. A comparison of electron data and the corresponding MC simulation can be used to validate the simulation of the light propagation and collection. The average number of photons incident on the surface of the ARAPUCA module from the MC (shown in figure 71 -left) is scaled by a normalization factor , an average value over the ARAPUCA cells' efficiency shown in section 5.3.1, to give the simulated detected photons Ph simulated = Ph incident . The ratio Ph detected / Ph simulated is shown as a function of incident beam energy in figure 71 (right). A -85 -systematic deviation, between 5 and ≤ 10%, is found for electrons with energies between 0.3 GeV and 1 GeV. This deviation is attributed to the statistical limitations on the visibility values of the photon library used in the Monte Carlo for converting the energy deposited along the EM shower into the number of photons impinging upon the ARAPUCA module.

Conclusions
This paper summarizes the first results on the performance of the ProtoDUNE-SP LArTPC using large samples of data from a test-beam run at the CERN Neutrino Platform. The dedicated H4-VLE beam line delivers electrons, pions, protons and kaons in the 0.3 -7 GeV/ momentum range, which are crucial to the study of detector performance and the measurement of particle-argon cross sections. In table 7 the detector's high-level performance parameters from studies and findings presented in this report are shown and they are compared with the corresponding DUNE SP Far Detector design specifications. For each of the categories shown, the ProtoDUNE-SP performance meets or exceeds the DUNE specification, in several cases by a large margin. This successful performance demonstrates the effectiveness of the single-phase detector design and the execution of the fabrication, assembly, installation, commissioning, and operations phases [11]. The electric field in the TPC drift volume was stable at the nominal level of 500 V/cm with >99.5% of uptime during the data taking periods with beam and cosmics. A drift electron lifetime in LAr in excess of 20 ms has been achieved and it was sustained for an extended period of data-taking. It reached approximately (89 ± 22) ms for the last day of beam data-taking. This corresponds to a concentration of impurity in the liquid argon of 3.4±0.7 ppt oxygen equivalent. The DUNE Far Detector specification is for the impurity concentration to be less than 100 ppt O 2 equivalent.
The TPC and cold electronics show excellent signal-to-noise performance. The signal-to-noise ratios corresponding to the most-probable-value ionization of a minimum ionizing particle are 40.3, 15.1 and 18.6, for collection, U and V wires, respectively, after noise filtering and signal processing.
-86 - The number of solidly unresponsive TPC channels was initially 29 out of 15360 and rose to 36 over the course of a year and five months of operations. Approximately 105 additional channels are noisy or have other issues with the electronics so that they were not included in the analyses presented in this report.
Three different photon detection technologies were implemented in the PDS and characterized with muon and electron beam data. The ARAPUCA technology showed 2% efficiency, the highest among the three, with a light response to EM energy deposit linear over the entire range of beam energies. A PDS system consisting entirely of ARAPUCA modules, with an expected light yield of 1.9 photons/MeV, will exceeds the specifications of the DUNE Far Detector.
Space-charge effects were predicted to be prominent in ProtoDUNE-SP. Spatial distortions in the apparent positions of tracks of up to 40 cm are observed in the data, based on the points of entry and exit into the TPC. Changes in the magnitude of the electric field by up to 25% are inferred from the spatial distortion measurements. Data-based, three-dimensional maps of spatial offsets and electric field strengths are made and are used to correct the observed data positions and ionization strengths for use in precision analyses.
The measured resolutions of the calibrated TPC and photon detector responses to protons, muons, electrons, and charged pions are similar to those in the simulations that are used to predict the performance of the first DUNE far detector module.
The data collected by ProtoDUNE-SP during beam runs and cosmic-ray runs will allow detailed studies of detector characteristics such as fluid flow, and they will also allow the measurement of argon-hadron cross sections. The results of these studies and measurements will be reported in future publications.