The design and construction of the MICE Electron-Muon Ranger

The Electron-Muon Ranger (EMR) is a fully-active tracking-calorimeter installed in the beam line of the Muon Ionization Cooling Experiment (MICE). The experiment will demonstrate ionization cooling, an essential technology needed for the realization of a Neutrino Factory and/or a Muon Collider. The EMR is designed to measure the properties of low energy beams composed of muons, electrons and pions, and perform the identification particle-by-particle. The detector consists of 48 orthogonal layers of 59 triangular scintillator bars. The readout is implemented using FPGA custom made electronics and commercially available modules. This article describes the construction of the detector from its design up to its commissioning with cosmic data.


Ionization cooling
The Neutrino Factory [1,2] based on a high-energy muon storage-ring is the ultimate tool to study the neutrino mixing matrix and is established as the best facility to discover, and study the possible leptonic CP violation. It will produce the most intense, pure and focused neutrino beam ever achieved and is also the first step towards a µ + µ − collider [3,4]. The Neutrino Factory accelerator design uses muons as a neutrino source. A proton beam bombards a target to produce pions. These pions are captured and focused in a high-field solenoid channel and decay to muons, creating a low energy muon beam with very large emittance. The emittance (occupied phase-space volume) of the muons needs to be reduced, i.e the muon beam must be cooled , so that the beam can be accelerated efficiently. Ionization cooling [5], summarised in figure 1, provides the only practical solution to muon cooling, because it is fast enough to cool the beam within the short muon lifetime (τ µ ∼ 2.2 µs). The emittance reduction is achieved by passing muons through a low-Z material (absorber), in which they lose energy via ionization, reducing both their longitudinal and transverse momentum. The longitudinal component is restored by accelerating cavities, providing a net reduction of the beam emittance. To maximize cooling, the absorber must be placed at a position where the transverse momentum p T has a maximum, i.e. at a minimum of the transverse betatron function, β ⊥ .

MICE
The international Muon Ionization Cooling Experiment (MICE) [6] is under development at the Rutherford Appleton Laboratory (UK). The goal of the experiment is to build a section of a cooling channel that can demonstrate the principle of ionization cooling.
Since energy loss and multiple Coulomb scattering are momentum dependent, so is the ionization cooling effect. MICE uses a variety of muon beams of limited intensity and central momenta in the range 140-240 MeV/c with a spread of ∼ 20 MeV/c. These muon beams are generated using a titanium target [7] dipped into the ISIS proton beam [8]. Secondary and tertiary particles are captured, momentum-selected and transported to the cooling section by a system of magnets: a 5 T superconducting decay solenoid, two dipoles, nine quadrupoles and a mechanism for inflation of the initial emittance, the diffuser.
The cooling section of MICE is similar to the one of the International Design Study for the Neutrino Factory and is schematically represented in figure 2. It consists of one primary lithium hydride (LiH) absorber, either side of which are a focus coil, two 201 MHz RF cavities and two secondary absorbers. The two superconducting focus-coil modules provide strong focusing at the absorber, ensuring that the transverse betatron function is minimised at this position and enhancing the cooling effect. Each particle is detected individually by two identical Scintillating fibre trackers in 4 T solenoids, situated upstream and downstream of the cooling section. The beam emittance is reconstructed by measuring the position and momentum (x, y, p x , p y , p z ) of each muon. The two secondary absorbers provide additional cooling effect, but also serve as shields, protecting the two trackers from the dark-current-induced radiation coming from the RF cavities.  Figure 2. Schematic view of the MICE experiment.
The particle content of the beam is measured by a dedicated system of detectors situated upstream and downstream of the cooling channel and designed to provide precise muon, pion and electron identification. The upstream part includes two time-of-flight hodoscopes (TOF0 and TOF1 [9]) and a Cherenkov detector (Ckov [10]). The downstream part combines another time-of-flight hodoscope (TOF2 [11]) with a calorimeter system. The calorimeter system consists of the KLOE-Light (KL [10]) lead-scintillator sampling calorimeter, operating as a preshower for the totally-active Electron-Muon Ranger (EMR [12]), placed behind it.
MICE will measure the normalised transverse emittance N with a precision of σ N / N ∼ 0.1% and is expected to witness a ∼ 6 % cooling for a muon beam with a nominal momentum of 200 MeV/c and a 4D input normalised emittance of N = 5.8 π·mm·rad.

EMR
The EMR is a fully-active scintillator detector. It can be classified as tracking-calorimeter as its granularity allows for track reconstruction. The primary purpose of the detector is to distinguish muons from their decay products, rejecting events in which the muon decayed in-flight in the cooling section. This allows for the selection of a muon beam with a contamination below 1 % [13]. The range of the muon track can be measured, providing an estimate of the momentum of the muon.
The construction of the detector started in the early 2011 and in October 2013 the detector was fully commissioned with beam during one month of dedicated data-taking at RAL. The detector was upgraded in October 2014, including the replacement of the singleanode photo-multiplier tubes and the installation of a new high-voltage power supply.

EMR Design Concept
The EMR consists of triangular scintillator bars arranged in planes. One plane contains 59 bars and covers an area of 1.27 m 2 . Each even bar is rotated by 180 degrees with respect to the odd one. A cross-section of bars and their arrangement in a plane is shown in figure 3. This configuration does not leave dead area for particles crossing a plane with angles less than 45 degrees with respect to the beam axis.  The light, produced when a particle crosses a bar, is collected by a wave-length shifting (WLS) fibre glued inside the bar. At both ends, the WLS fibre is coupled to clear fibres that transport the light to a photomultiplier tube (PMT). The clear fibres are protected with rubber sleeves and packed in aluminium fibre boxes as drawn in figure 4. In order to increase the bending radius, which affects light attenuation, each fibre has its own length. The two bunches of clear fibres coming from the two sides of a plane are glued into different types of connectors (figure 5): one is designed to interface with a multi-anode photomultiplier tube (MAPMT) and the other with a single-anode photomultiplier tube (SAPMT).
Two planes attached to each other via aluminum profiles form a rigid structure called a module ( figure 6). The full detector contains 24 modules as shown in figure 7. Panels cover all sides of the detector in order to ensure light-tightness. The signals coming from a MAPMT are read out and processed by a dedicated front-end board attached directly to the fibre box as shown in figure 6. The SAPMTs are equipped with a voltage divider and the analog signal is sent outside the detector for digitization. Figure 6. CAD drawing of one EMR module made of an X plane and a Y plane. There are two front-end boards and two single-anode PMTs per module.
A calibration system was installed inside the enclosure of the detector in order to monitor the drift of the gain and the quantum efficiency of the PMTs. This system is made of a LED driver distributing light homogeneously to 100 fibres. Each fibre box is connected to one of the calibration fibres through a connector. Inside a fibre box a clear fibre connects the calibration fibre to the PMT (see figure 4).
All the cables inside the detector are fed through four patch-panels. There are 96 high-voltage, 6 low-voltage, 48 analog, 48 digital, and three configuration cables in total. A support frame is designed to withhold the full weight of the sensitive volume (∼ 1 tonne) with its readout system. In order to protect the front-end electronics from the magnetic field of the spectrometer solenoid, a shielding plate is mounted on the side of the detector that faces the beam. The total weight of the detector is almost 2.5 tonnes.

Optical Elements
The scintillator bars were manufactured at an extrusion facility at Fermilab [14]. Each bar is 110 cm long, has a triangular, 1.7 cm high, 3.3 cm wide section and is pierced with a 3 mm hole to host a wavelength shifting fibre. The scintillator is made of polystyrene pellets 1 as base, 1% PPO 2 as primary and 0.03% POPOP 3 as secondary fluor. Each bar is coated with TiO 2 reflector in order to increase the trapping efficiency. The light output of the scintillator was measured [15] with a PMT (25% quantum efficiency) and it is around 18 photo-electrons.
The WLS fibre glued inside each bar is a double-cladding 1.2 mm fibre produced by Saint-Gobain Crystals [16]. The core material is polystyrene with acrylic cladding. It has a larger numerical aperture of 0.58 compared to the 0.2-0.3 of graded-index multi-mode fibres used in data communication. Their trapping efficiency is 3.5 %. The light is absorbed in the blue part of the visible spectrum and re-emitted in green ( figure 8, top).
The clear fibres, used to transfer light from the ends of scintillator bar to the PMTs, are 1.5 mm multi-cladding fibres produced by Kuraray [17] with a special structure (S-type) that allows for better flexibility. The aperture of this fibre matches the one of WLS fibre to ensure a minimal transmission loss.
A special connector was designed to couple the clear fibre to the WLS fibre [18] and is represented in figure 9. It has a small cylindrical enlargement meant to be filled with glue  to fix the fibre in the connector. This configuration avoid crimping the fibre since a sharp edge of the connector would easily damage it. The retaining clip (B) is screwed into the wavelength shifting fibre connector (A) to allow the clear fibre connector (C) to be safely attached. All these pieces are non-standard and a special mold was designed to produce them.

Photo-detectors
The EMR has a dual readout. Each scintillator plane is equipped with a multi-anode PMT (MAPMT), measuring the light output of individual bars, and a single-anode PMT (SAPMT), recording the integrated response of all bars in the plane.
The MAPMT is a 64-channel PMT produced by Hamamatsu (model R5900-00-M64 [19], as pictured in figure 10). The spectral response (figure 8, bottom-left) matches the peak emission frequency of the wavelength shifting fibre. It is placed in a µ-metal tube acting as additional shielding against the fringe magnetic field. The PMT is aligned with respect to the fibre connector in such a way that each fibre shines on one PMT channel. It is important to measure the dimensions of the PMT and particularly the position of the anode matrix with respect to the PMT case. Figure 11 shows the distributions of the measured dimensions (width and height) and displacements of the anode matrix for 53 MAPMTs. On average, the matrix is shifted by 0.5 mm upwards, which was taken into account in the design of the MAPMT fibre connectors. The SAPMT is also placed in a µ-metal casing. The EMR detector was initially assembled using second hand SAPMTs, available after the disassembly of the HARP experiment [20]. They were 10-stage, linear-focused PMTs produced by Philips (model XP2972). A spe- cial selection procedure was developed in order to select the best samples for the assembly of the detector [21]. In 2014, during the upgrade of the detector, all Philips SAPMTs were replaced by new tubes produced by Hamamatsu (model R6427 [19], figure 8 bottom-right).

Electronics Layout
In MICE the spill is defined as the short period following a target dip in the ISIS proton beam. The maximum spill rate allowed by the MICE target system is ∼ 0.75 Hz. The overall principle of the MICE Data Acquisition (DAQ) system is that, during the spill, the accumulated digital data is kept in local memory buffers and the readout is performed once at the end of the spill.
A schematic layout of the EMR electronics is shown in figure 12. The multi-anode PMT is connected via a flex cable to a front-end board (FEB), which processes the signals and sends them to a piggy-back digitizer-buffer board (DBB) for digitization and storage. The FEB is configured by the VME configuration board (VCB), which resides in the VME crate in the control rack. Each VCB is able to configure up to 16 FEBs, therefore three of them are required for the full detector. The DBBs are readout in groups of six. In each group the first DBB is a master and the other five are slaves. All the six boards are daisy-chained via an ethernet cable and the master is connected to a VME readout board (VRB), which transfers all the data from the six DBBs to the DAQ computer. In the whole detector there are 8 groups of DBBs, i.e. 8 VRBs are installed in the control rack.

Front-End and Digitizer-Buffer Boards
The multi-anode PMT is readout by a dedicated front-end board equipped with a piggyback digitizer-buffer board [22], which stores hit information during a spill. Figure 13 shows the full assembly that is mounted on each plane of the detector. It consists of a PMT and its voltage divider connected to a FEB through a flex cable. The FEB processes all 64 the MAPMT signals using a 64-channel ASIC 4 called MAROC 5 [23]. The analogue signals are fed into the chip where they are processed in parallel. Each channel consists of a pre-amplifier with a variable gain, a tunable slow shaper for analogue readout, a tunable fast shaper and a discriminator for the digital. The MAROC ASIC provides parallel digital outputs forwarded to two high density connectors. The width of the discriminated signal represents the time-over-threshold measurement. One multiplexed analogue output is also provided and this output is digitized by an external ADC 6 . It takes 12.8 µs (64 channels with a multiplexing clock of 5 MHz) to process the multiplexed signals, a time too long for the MICE DAQ duty cycle which foresees one particle every 5 µs during ∼ 1 ms spills). Only the fast time-over-threshold measurement is used and recorded.
The function of the FPGA chip 7 is mainly to forward data from the MAROC to the DBB and to send configuration signals from the VCB to the MAROC and verify their status. The board has a separate power supply for the analogue and the digital parts. The board is operated at 5V and has a power consumption of 3W.
The two essential roles of the DBB are to sample 63 of the channels coming from the FEB plus an external trigger signal and to store the accumulated digital data during the spill. It also transmits these data upon request from the acquisition system. The digitization starts when the board receives the "Spill Gate" signal from an external LEMO connector. The number of clock ticks from the beginning of the spill to the leading edge and trailing edge of every discriminated signal coming from the FEB is recorded. The difference between two subsequent measurements represents the time-over-threshold of the original signal. The clock sampling rate is 400 MHz (2.5 ns resolution). The external trigger signal is fed into one specific input channel and is treated as any other signal. This signal does not serve as a trigger for the DBB itself, since the board records continuously and all signals 4 Application-Specific Integrated Circuit 5 Multi Anode ReadOut Chip 6 Analog Devices AD9220 7 Altera Cyclone II (EP2C35F484C8N) arriving within the spill gate are digitized and recorded. The timing of the trigger signal is important to identify the hits that belong to a given particle and to match them with other detectors. The board also calculates the width of each spill, counts the number of spills, the number of triggers in each spill and the number of hits in each channel.
The architecture of the DBB is organized around a single FPGA 8 that performs the sampling, data buffering and data-flow control functions of the board. The internal memory of the FPGA, configured as FIFO, is used to store the event data. Two gigabit transceivers 9 are interfaced to the FPGA to provide the physical transmission channels and form an upstream command link and a downstream data link. Six DBBs are grouped together and daisy-chained with upstream and downstream links via Ethernet cables. The first DBB in each group is directly connected to the VRB via four coaxial cables.

VME Configuration Board
The VCB is a single FPGA 10 board designed to configure the MAROC chips on the FEBs. The communication between the two boards is accomplished by LVDS 11 signals driven and received by LVDS drivers/receivers connected to a corresponding FPGAs. The MAROC chip is configured by TTL 12 signals composed of 830 bits coding the configuration parameters.The VCB would in principle allow the readout of the MAROC boards analog output but this is not implemented in the current design. The board communicates with the DAQ computer through the VME bus via the VME controller.

VME Read-Out Board
One VRB performs the readout of a group of six DBBs. It is a single FPGA 13 board with a gigabit transceiver 14 , which drives the communication with the DBBs and four high-speed 16M-bit static RAMs 15 , providing a local memory buffer. The total size of the digital data, accumulated in six DBBs during the spill can vary significantly, depending on the configuration of the beamline channel. Typically this size does not exceed 25 kB, including noise records. During the readout cycle, the data transfer between the DBBs and the DAQ computer is executed in two steps. After a request from the DAQ computer, the VRB starts transferring data from the 6 DBBs. The gigabit transceiver is used for this and the received data is temporarily stored locally. The four static RAMs, organized as 16 bits data words, are grouped in two pairs, providing the record of the DBB data, originally structured in 32 bits data words. Once the first part of the transfer is completed and all the data accumulated by the 6 DBBs during the spill are available in the local memory buffer of the VRB, the DAQ computer sends a second request which triggers the transfer of these data over the VME bus. 8 Altera Stratix II (EP2S30F484C3N) 9 TLK1501 10 Altera Cyclone II (EP2C50F484C8N) 11 Low-Voltage Differential Signaling, communication protocol. 12 Transistor-Transistor Logic 13 Altera Cyclone II (EP2C50F484C8N) 14 TLK1501 15 IS61WV102416BLL-10TLI -SRAM, 16Mbit, 10ns, 48TSOP

Flash ADC Board
A waveform digitizer V1731, made by CAEN [24] is used to read out signals from the singleanode PMTs. The digitizer has a sampling frequency of 500 MHz (2 ns timing resolution). The pulse shape of the input signal is digitized by an 8-bit ADC and continuously written in a circular memory buffer. When a trigger is received, the FPGA writes a certain number of samples into the buffer, which then is available for readout via the VME bus.

Mechanics
The total weight of the sensitive volume of the detector is almost 1 tonne. During construction and installation, it was required to be rotated and transported from Geneva to the UK. A reinforced support frame, represented in figure 14, was designed to withstand the weight of the sensitive detector and the stress coming from the transportation and installation. In its final position, the EMR is installed such that planes are located perpendicular to the beam direction. Figure 14. EMR support frame. When installed in the MICE experimental hall, the EMR is integrated into the support structure of the other downstream particle identification detectors. Figure 15 shows the location of the sensitive volume with respect to the support frame. The frame is covered with panels so that the entire detector is light-tight. A 5 cm-thick iron plate is used as magnetic shielding (total weight of ∼ 755 kg). The opening in the shielding panel, which matches the size of the sensitive volume, is closed with a thin rubber end cap. The back panel is closed with a metal end cap.

Construction
All the construction work was done at the University of Geneva. As exposure to ultra-violet (UV) light or high temperature can damage the polystyrene molecules, activities related to fibres and scintillators were performed in a UV clean room, i.e. lights and windows were covered with UV-protective films, while air conditioning kept the temperature around 25°C. The first step in the construction was to glue the wavelength shifting fibres into the bars. Transparent epoxy 16 was used to glue the WLS fibre in order to increase the light collection efficiency. Although 2832 bars were required for building the full detector, 3150 bars were glued and assembled with fibre connectors in order to provide enough spares. Both faces of the bar's fibre connectors were polished with a custom polishing machine. Four different grades of sand paper were used to achieve a mirror like quality of the polished surfaces. The last step was performed using a 1 µm grade diamond-based polishing paper.
Fiber bundles made of 60 clear fibres (see figure 16) were manufactured. In the bundle, each fibre has an individual length, providing a maximum bending radius when connected. A fibre connector (see figure 9, bottom right) is glued at one end of each fibre. At the other end all fibres were glued either in multi-anode or single-anode PMT connectors (see figure 5). Once glued, both fibres and connectors were polished on a bench, similar to the one used to polish all bar connectors. In total 96 fibre bundles were produced (48 per type of PMT). Figure 16. Clear fibre bundle construction: fibres cut to the right lengths (left), an MAPMT connector (centre) and its fibre connectors (right). 16 Prochima E30 water effect resin

Quality Assurance Tests
Several quality tests were implemented, in order to assure the best possible performance of the different components of the detector.
A dedicated bar quality test bench was built in order to test the light transmission of each bar, including the transmission of the WLS fibre and the quality of the two connectors. The test bench consisted of a LED 17 system, a holder for 4 scintillator bars and a digital camera placed in a light-tight box. The LED system included a blue LED source, a light mixing box and diffusers to provide a homogeneous light signal in the four bars. The camera takes a photo of the four connectors at the opposite side of the bars. One of the bars is considered to be a reference to which the other measurements are normalized to. This takes into account the effect of any LED instability and allows to compare different measurements.
An automated program was used to analyse the photos (figure 17, left) and calculate the luminosity of each bar. The right plot in figure 17 shows the distribution of the measured relative residuals of the light output with respect to the reference bar. The relative residual is defined as the difference between the measured value and the average value normalised by the average. Only bars with a relative residual intensity above -0.15 were accepted for the plane assembly. A fraction of 9.7% of the 3150 bars did not pass that requirement and were rejected. A similar test was used to examine each EMR plane after the assembly [25]. A LED tube attached to a single-anode PMT connector was used to send light through the fibres (WLS and clear) to the multi-anode PMT connector, where a picture of the PMT mask was taken by a camera. An automated program was used to analyse the photos (figure 18, left) and calculate the relative residuals of the light intensity of the individual channels as shown for a single plane in the right plot of figure 18. This test verified the light transmission of the fibre bundles, but also the quality of the interconnections between the WLS fibres and clear fibres. A plane was accepted only if the relative residual intensities of all 60 channels were above -0.4.  A separate test bench was set up in order to verify the functionality of the three major components of the EMR electronics: the multi-anode PMTs, the front-end boards and the digitizer-buffer boards. It reproduced the full electronics chain used to readout the detector with the only difference that the light was generated by a LED source, powered by a variable amplitude pulser. The LED was attached to the MAPMT injecting light in all channels at the same time. The final measurement that is provided by the system is a time-overthreshold (ToT) of the PMT signal. During the tests this measurement was used as a figure of merit to characterize the electronics chain (PMT, FEB and DBB). The top of figure 19 shows an example of a fully functional electronics chain and the bottom an example of a faulty board. Boards exhibiting the former behaviour were accepted for installation in the detector.

Examining the performance with the LED calibration system
After the assembly was completed, the detector was fully powered and tested during a few days of LED and cosmics data collection. As described above, the detector is equipped with a built-in LED system for calibration. Light is transported from a LED driver through 96 clear fibres to each SAPMT and to one specific channel of each MAPMT (test channel).
The LED driver was tuned with a variety of voltages ranging from 11.0 V to 22.0 V in steps of 0.5V. For each setting, 10000 pulses were recorded. The mean time-over-threshold in the test channel of a MAPMT is represented as a function of the LED driver voltage in figure 20. The green area represents the voltage region for which the recorded ToT is consistent with the signature of a minimum ionizing particle.
The collected data were used to investigate the dependence of the ToT measurement on the original total charge of the MAPMT signal. This can be done, assuming that the total charge of the signal in the test channel of the MAPMT is proportional to the total charge Q, recorded by the SAPMT when both receive light from the same LED pulse. An exponential behaviour of the form (3.1) Figure 19. MAPMT readout quality tests of a functional board (top) and a faulty board (bottom). The left plots show the time-over-threshold distribution as a function of the channel number and the right-hand plots represent the integrated distribution of all channels in a given board.  is expected, with a and b being two unknown parameters. The parameter a gives the slope of the exponential in log scale and depends on the EMR characteristics such as the scintillation time constant, the FEB shaping function or the threshold level. As a result, we expect this parameter to be constant for each plane with small variations. The parameter b, on the other hand, depends on the two PMTs gain and can vary significantly from one plane to another. These two parameters were obtained experimentally by fitting the relation Q vs. ToT for each individual plane of the detector. Figure 21 shows the exponential relation between time-over-threshold and charge in one of the EMR planes.

Examining the performance with cosmic rays
Cosmic rays present an ideal source of particles that can be used to characterize, debug and tune the detector. Cosmic rays that reach the detector are typically multi-GeV muons that cross EMR without stopping. An externally generated 3 ms signal was used in order to reproduce the timing structure of the "Spill" gate signal, used by the MICE DAQ system. A coincidence between the SAPMT signals from two planes and the Spill gate signal was used as a trigger. The EMR planes were perpendicular to the ground at the time of this test. Data were taken for 60 hours and yielded ∼ 2.23 × 10 5 triggers. The raw measurements of the EMR comprise the hit time and ToT for each bar and the integrated plane charge. The two planes used as trigger did not record a plane charge. The number of hits recorded in each bar was of the order of ∼ 10 3 . The test revealed only 5 dead channels (∼0.2 % of the whole detector). A typical cosmic event is shown in figure 22.

Cosmic muon signature
Cosmic muons are minimum ionizing particles and hence deposit on average the same amount of energy per unit length. The muon typically hits two triangular bars in a plane, by design. The additional hits come either from crosstalk or noise (e.g. third hit in plane 26 in figure 22, top-left). All hits from cosmic muons have approximatively the same time offset with respect to the trigger. To separate the true hits from the noise, a cut on the time difference between a bar hit and the trigger was applied. A thorough study of the crosstalk was performed and is presented in section 3.4. Figure 23 shows the time and ToT structure of the hits recorded in the MAPMT for the whole sample of cosmic data. The hits come prior to the trigger in the readout chain due to the delay in the logic box. Time walk affects the timing so that the lower amplitude signals come later on average. The distinctive spike present at ∼ 15 ADC counts in the ToT distribution is a feature of the cosmic data acquired with detector planes perpendicular to the ground and the non-linear connection between charge and ToT.
The SAPMTs were used to measure the total charge in planes. The digitizers store waveforms of signals associated to triggers within a certain acquisition window. These waveforms are integrated in a signal window off-line taking into account the pedestal positions in order to compute the total plane charge, as shown for the whole cosmic data sample in figure 24.

LED-based crosstalk analysis
The EMR is susceptible to two types of crosstalk: optical crosstalk, i.e. a single fibre of a bundle shining on more than one channel of the MAPMT mask, and anode crosstalk, i.e. a photo-electron leaking from a dynode to an adjacent accelerating structure. An analysis was developed in [26,27] to evaluate the significance of this phenomenon.
Cosmic or beam data are poorly suited for this analysis. A real particle often hits two bars or more within each plane, which makes it impossible to disentangle real signals from crosstalk in neighbouring channels. A LED calibration system is a more reliable tool to drive the analysis. The test channel, connected to the LED light source, has four directly adjacent channels: top (N), bottom (S), left (W) and right(E). This method ensures that hits in the adjacent channels are caused by crosstalk only.
The first parameter that characterizes the crosstalk is the charge ratio R i Q , between the signal amplitude in an adjacent channel i and the primary amplitude in the test channel. As explained already, the charge is not measured directly but is related to the ToT through equation 3.1. For the ratio we have: R i Q is measured for the maximum LED voltage setting as the resolution evolves as 1/ √ Q. The ratio measured in the 192 readout channels (directly adjacent N,S,W,E channels of each plane) is represented in figure 25. The fraction of the original signal that typically leaks in adjacent channels is 4.49 ± 0.11 %.
The second parameter used to characterize the crosstalk is the rate. The measured quantity is the ratio R i N of hits in a surrounding channel i to the total amount of pulses generated in the test channel. This quantity is measured in the 192 readout channels for a voltage setting in the green area of figure 20, corresponding to MIP-like signals, and represented in figure 26. The average rate fraction is 0.20 ± 0.01 %, well within design requirements.  The measurement of the crosstalk rate in the adjacent channels also provides a measurement of the misalignment of the MAPMT mask with respect to the fibre bundle. If a mask is shifted, light is more likely to leak and create signals in the channel towards which it is offset. The centre of the mask with respect to the centre of fibre bundle is computed as with (x i , y i ) the coordinates of the surrounding channels and w i the number of hits recorded in them. The resolution is a function of 1/ √ N , where N is the amount of signals recorded, hence a high voltage is chosen for this analysis. The results for the 48 planes are presented in figure 27. There is a noticeable cluster around (−0.3, 0.3) but nothing that could impair the detector.

Cosmic-based channel mismatch analysis
The EMR design, involving the connection of external clear fibres to internal WLS fibres [18], leaves room for human error in matching the two correctly. A dedicated analysis was developed in order to verify the consistency of this connection across the 2832 bars in the detector.
This analysis [26,27] uses the distance between each bar hit and its particle track as a tool to estimate the likelihood of mismatch. A mismatched channel is not reconstructed in the right location and is, on average, significantly less consistent with the other measurements in a reconstructed particle track. Cosmic muons were particularly suited for this procedure as they cross the whole detector in straight lines, without stopping and provide full coverage. When the data sample used in this analysis was recorded, the EMR was positioned up right with planes vertically oriented. Two cuts are applied to the data sample in order to rid the muon tracks of artificial hits caused by crosstalk and noise. Crosstalk signals were rejected by placing a lower limit on the ToT measurement (ToT>5). Restricting the delay between the trigger time and the hit time to a small interval was used to get rid of most of the noise (-100< ∆t <-80 ADC counts).
To reconstruct tracks and calculate the distance of each hit from its particle trail, the hits were split into two projections qz, q = x, y. The plane ID of the channel hit provides the z coordinate and the bar ID provides either the x or y coordinates, depending on the plane orientation. The (q i , z i ) coordinates were those of the barycentre of the triangular section of the bar corresponding to the hit. For a linear fit q = a q z + b q , the absolute distance between a hit (q i , z i ) and the track within a plane is ∆q i = |q i − (a q z i + b q )|. Distances are expressed in bar units (b.u.) in the following developments. A b.u. corresponds to the height of the triangular section or equivalently to the half width of its base.
The critical secondary variables, measured for each channel are the ratios of mismatch, R i . Given an integer i, the ratio R i corresponds to the fraction of the sample for which the bar is within i ± 2/3 b.u. off-track. For a distance distribution f (∆), the ratio is defined as ( 3.4) with σ = 2/3 b.u., an arbitrary overlapping uncertainty on the point.
For instance, the ratio R 1 represents the probability of a bar of being mismatched by exactly 1 b.u., i.e. to be swapped with an adjacent bar. It is shown in [27] that R i is theoretically estimated to take values summarized in table 1 for different scenarios. The X − Y asymmetry of the R i ratio is due to the different angular distribution of muons seen by the vertical and the horizontal bars.

Matched
Mismatched xz proj. yz proj. xz proj. yz proj. The mismatch ratio for adjacent bars (R 1 ) was measured and is represented for each channel in figure 28, left. The ratio distribution is represented next to it in log scale. The bulk of the distribution is centred around 28.88 %, consistent with the weighted average of the theoretical predictions for the two projections. Bars 47 and 48 of plane 44 record a ratio of 62.5 ± 3.5 % and 57.2 ± 3.2 %, respectively, significantly larger than the bulk one and in agreement with the prediction. Their proximity to each other corroborates the hypothesis of a channel swap. The mismatch is fixed at the level of the channel map in the reconstruction software.  The same analysis has been performed for potential mismatches of two bars or more, R i≥2 . Figure 29 represents the value of that ratio for each channel. The results strongly reject any mismatch at this level.

PMT Calibration
A thorough charge calibration was performed shortly after completion of the detector. Cosmic data were used and the charge on the MAPMT side, Q i M was reconstructed by using equation 3.1. Provided these measurements, a calibration constant is produced for each MAPMT and SAPMT channel:

Transportation and installation at Rutherford Lab
The total weight of the EMR detector is 2.5 tonnes. Therefore a special care was taken to insure safety and shock-free transportation of the detector. The detector was attached to special shock absorbers [28] designed to withstand its weight and allow for shock absorption in all three directions. The shock absorbers were then attached to a pallet by which the detector was handled. It was placed in a truck and delivered from the University of Geneva to the Rutherford Appleton Laboratory (Didcot, Oxfordshire, UK) in September 2013. Once delivered, the EMR detector was installed in the MICE hall and positioned vertically at the end of the existing MICE beamline. It was later exposed to a beam whose parameters were varied in order to achieve different beam compositions and momenta. This data were used to verify the designed functionality of the detector, i.e. the ability to distinguish different particle types (muons, electrons and pions) and to measure their ranges [29]. It was demonstrated that the detector is capable of identifying electrons with an efficiency of 98.6%, providing a purity of the MICE muon beam that exceeds 99.8%.

Conclusions
This paper describes the design and the construction of the MICE Electron-Muon Range detector. The EMR is a fully-active scintillator detector, which provides tracking and calorimetric information. A preliminary evaluation of its performance with cosmic and LED data is reported. The data-quality analysis revealed an excellent performs of the detector with only 0.2 % dead channels and cross-talk well within the design requirements.