The Detector Control System for the magnetic field sensors in New Small Wheel phase I upgrade of ATLAS detector

In conjunction with the High Luminosity upgrade of the Large Hadron Collider accelerator at CERN, the ATLAS detector is also undergoing an upgrade to handle the significantly higher data rates. The muon end-cap system upgrade in ATLAS, lies with the replacement of the Small Wheel. The New Small Wheel (NSW) is expected to combine high tracking precision with upgraded information for the Level-1 trigger. To accomplish this, small Thin Gap Chamber (sTGC) and MicroMegas detector technologies are being deployed. Due to their installation location in ATLAS, the effects of Barrel Toroid and End-Cap Toroid magnets on NSW must be measured. For the final experiment at ATLAS, each sTGC large double wedge will be equipped with magnetic field Hall effect sensors to monitor the magnetic field near the NSW. The readout is done with an Embedded Local Monitor Board (ELMB) called MDT DCS Module (MDM). For the integration of this hardware in the experiment, first, a detector control system was developed to test the functionality of all sensors before their installation on the detectors. Subsequently, another detector control system was developed for the commissioning of the sensors. Finally, a detector control system based on the above two is under development for the expert panels of ATLAS experiment. In this paper, the sensor readout, the connectivity mapping and the detector control systems will be presented.


Introduction: ATLAS Phase I upgrade
The Large Hadron Collider (LHC) complex will be upgraded in several phases which will allow the reach of the physics program to be significantly extended. It will remain the highest energy accelerator in the world for at least the next two decades. Its full exploitation was the highest priority of the European Strategy for Particle Physics Update (ESPPU) of 2013. The high priority has been confirmed by the recent 2020 ESPPU.
The LHC improvements will result in the luminosity increasing to 5 × 10 34 cm −2 s −1 . With luminosity leveling, the integrated luminosity is expected to be 3000fb −1 after about 10 years of operation [1]. The upgraded LHC will produce collisions at a centre-of-mass energy at or near its ultimate design of 14TeV. This increase in luminosity from the original design by almost an order of magnitude will lead to an increase of particle rates by the same amount. Thus, a major upgrade of the experiments is required to cope with these new conditions and to fully exploit the HL-LHC physics potential.
The ATLAS experiment was designed for a broad physics programme, including the capability of discovering the Higgs boson over a wide mass range and performing searches for the production Two major issues represent a serious limitation on the ATLAS performance beyond design luminosity [2], [3]: • The performance of the muon tracking chambers (in particular in the end-cap region) degrades with the expected increase of cavern background rate. • Unacceptable rate of fake high p T Level-1 muon triggers (approximately 90%) coming from the interaction point (IP) due to low energy particles (mainly protons) that are produced by the material around the end-cap region in similar angles.
In order to solve the two problems together, ATLAS proposes to replace the present muon Small Wheels with the 'New Small Wheels' (NSW). The NSW is a set of precision tracking (Micromegas) and trigger (sTGC) detectors able to work at high rates with excellent real-time spatial and time resolution. These detectors can provide the muon Level-1 trigger system with online track segments of good angular resolution to confirm that muon tracks originate from the IP. In this way the end-cap fake triggers will be considerably reduced. Considering it's location (Figure 1), NSW is interfacing with the ATLAS Toroid Magnet System which provides magnetic field for the outer shell of muon detectors. ATLAS consists of three superconducting toroid magnets, two end-cap toroid magnets behind NSW and one barrel toroid magnet surrounding the calorimeters [4]. The effect of the magnetic field on NSW is thus significant to be measured.

Hardware for magnetic field monitoring in NSW
The MDT-DCS Module (MDM) is the local monitor-and-control platform for the ATLAS MDT muon chambers. It is developed by Nikhef and is based on the ATLAS collaboration ELMB module, whose purpose was to serve various detector control tasks. The MDM will also serve NSW for temperature and magnetic field monitoring with specially designed sensors.
MDM's functionality lies with it's user programmable microcontroller and the analog/digital connectors. It consists of 30 NTC connectors, 2 B-Field sensor connectors, JTAG interface, SPI interface (CSM-ADC) and CAN-bus connectors. CAN bus is the chosen fieldbus by the ATLAS Detector Control System (DCS) to interface with I/O within the detector using the CANopen protocol.
The magnetic field sensor modules for NSW are also developed by Nikhef and can measure B-Field values in three dimensions with a precision of 10 −4 and a maximum of 1.4T [5]. The

Readout
Using the CANopen protocol, each data object in the MDM can be accessed through the Object Dictionary (OD). In addition, the CANopen Service Data Object (SDO) confirmed message mechanism is used to read from and write to data objects in the OD. For the T-sensors and the Bsensors specifically, a more efficient method of read-out is offered by the CANopen mechanism of Transmit Process Data Object and Receive Process Data Object (TPDO and RPDO) messages.
Following this scheme, writing on the OD index 2800h, none or up to four B-sensor modules can be selected in a form of a bit mask (bfMask). The MDM was originally designed to readout two B-sensor modules. However, a configuration of two sensors per input (maximum 4 per MDM) can be achieved by connecting two sensor in series on the same IDC flat cable as shown on Figure 3 [6].
After the bfMask is configured, the MDM sends one PDO message containing 5 bytes for each B-sensor input and per B-sensor module 4 inputs are read: Hall sensors H1, H2, H3 and the temperature sensor. Illustration of this data output is shown in Table 1.  Figure 3: Connection of more than two B-sensor modules to one MDM. Note: the shown connector is not the IDC flat cable approved by ATLAS for the actual experiment.
this challenge, a Supervisory Control and Data Acquisition (SCADA) framework needs to be established.
The ATLAS Detector Control System (DCS) is tasked to be a coherent and safe for operation interface for all sub-systems of the experiment. It must also be able to bring the detector into any desired operation state, allow automatic or manual actions, report abnormal system behavior to operators, monitor and archive all parameters necessary for the experiment. ATLAS is hierarchically organized in a tree-like structure of detectors, followed by sub-detectors, subsystems for each detector, etc. [7] Thus, the DCS must conform to this structure.
Implementation of the DCS is done through the industrial control software WinCC OA by Siemens. The Joint Controls Project (JCOP) was also founded in order to maximize synergy effects for the DCS of the four experiments at the LHC by using common DCS components. Within JCOP and WinCC OA, standards for the use of DCS hardware are established and are the basis for all DCS applications.

DCS for the testing of B-sensor modules
In order to start monitoring the magnetic field for NSW, a testing setup for the B-sensor modules must be built to ensure their functionality before installation. The test bench consists of several components listed below: • an MDM configured with a mask to receive up to four B-sensor modules • a PCB with different (more convenient) 10-pin IDC flat cable connectors that connects to the MDM's inputs • IDC flat cables with swapped pins at the second sensor position • terminal Impedance of 180Ω for the CANbus interface • a CAN cable that connects the MDM with a CANnode power supply giving 8-12V • a Sys Tec CAN-USB module that interfaces with the power supply (125000 bit rate) • a Laptop for the DAQ system and the DCS.
In practice, sensors are connected to the setup and the data is fed through the CANbus daisy chain, being serialized by the Sys Tec and received at the computer. At the computer end, a CentOS 7 Virtual Machine is used for the readout. For the DAQ, an OpcUaCanOpenServer with the appropriate XML and schemas is configured to receive data from the Sys Tec driver and publish it. The DCS has an OPC UA Client configured to receive the data and monitor it with a panel. For B-sensor testing, the user typically has to start the server, open the DCS panel and inspect the B-sensor connectivity and data output to decide if it is nominally functioning or not. With this test bench, all 192 B-sensors were successfully tested. The same setup is also used in a portable manner to test the sensors after their installation on a sector as well.

DCS for the commissioning of B-sensor modules
The commissioning site for NSW is building 191 at CERN where Micromegas and sTGC wedges enter the building to be integrated into a full NSW wedge. All services are installed on the wheel and are being commissioned by the groups to bring each sector to the desirable state for the experiment.
Each wheel will house a total of 32 MDMs which are installed on the JD shielding disc behind each of the large NSW wedges (4 per wedge). Their exact location is designated by the parameter called 'side on spoke' which notes the locations on the JD shielding disc and ranges from 1 to 4. In addition, they are also separated by the Lowering (L) and Rising (R) sides, noting the next (R) or previous (L) sector number on the wheel.
Likewise, B-sensor modules are installed only on large sTGC detectors in a total of 12 per NSW wedge. Specifically, they are located at the outermost sTGC module from IP. The Bsensors are labeled with a number designating their horizontal location and a letter for the vertical location on the detector. Details of all this layout and connectivity are displayed at Figure 5.
Similar configuration to the one used at the test setup in a larger scale is used to monitor the B-sensor modules for NSW. The MDMs are monitored in wheel quadrants while being connected in CANbus daisy chains of 8. Each daisy chain connects to a terminal impedance of 180Ω on one end and to a Sys Tec module on the other end. Thus, in total 4 daisy chains connect to 2 Sys Tec modules with 2 inputs each and are subsequently read out by a computer. At the computer, the OpcUaCanOpenServer makes the data available to OPC UA clients.
Configuration of the MDMs on the wheel is done through the CAN interface in low level by setting the correct bfMasks on each one. Then, data is available from the server and is passed to the developed DCS with an OPC UA client. The design of the DCS tries to reflect the DCS for ATLAS experiment in a short version, showing data of all MDMs connected on a single sector ( Figure 6). Figure 6 shows temperature readout in milidegrees and Hall readout without the 24-bit conversion. The best indicator of valid data coming through the B-sensor is the temperature  reading since calibration to magnetic field data cannot be done in this stage. For side A, a total of 93/96 sensors were successfully commissioned and work for side C is currently on-going.

DCS for ATLAS Experiment
In the ATLAS DCS framework, several computers are being set up for every project to monitor and control different hardware. Thus, each project is designed under specific guidelines. The B-field project will be monitored in a way similar to the commissioning site, with the difference that the Sys Tec will connect to an MDT readout computer. The MDT computer will utilize  Data will be stored in the datapoints of the B-field project according to the following structure: Figure 8: Representation of the datapoint structure of B-field monitoring.
Certain calculations for the B-field project will be handled offline since the MDM only provides the ADC values of the Hall voltage (Appendix A). The 24-bit unsigned integer values from the MDM will be transformed into signed integer values to display counts of negative and positive voltages.
After Hall values are available offline, the actual B x , B y , B z values will be calculated. Each B-sensor module was calibrated in Saclay and thus a table of calibration constants accompanies each sensor ID [8]. A Saclay software will use these calibration constants to offline construct the B-field values through the database. Finally, the DCS will be monitoring these values from the database. The final calibration value for the magnetic field will be computed as B cal = B 2 x + B 2 y + B 2 z . Since each end-cap magnet torus loop is directly behind a large NSW wedge and the magnetic field lines pass through NSW sectors, large sector volumes have constant  (Figure 9). It is thus interesting to introduce and monitor the quantity where N notes the number of a sensors declared as 'connected' on the same sector and B cal,i the B cal value of an individual sensor on this sector. The B-field DCS in ATLAS will not be part of the sub-detector tree of services as described earlier. Alternatively, it will be part of the expert panels for NSW DCS and thus, statuses will not represent alarms and states will not represent control operations. However, the ATLAS color convention will be used to represent value ranges for every sensor on NSW like a colormap ( Figure 9). The sector state is computed both by the average magnetic field value and the number of functional sensors on the NSW wedge. Figure 9: Map of the magnetic field (by C. Paraskevopoulos) around large NSW sectors (left) and the DCS colormap for the magnetic field values (right). Color code is according to ATLAS convention used as 'OK' (green), 'WARNING'(yellow), 'ERROR' (orange) and 'FATAL' (red). This color scheme can be extended for more granularity if necessary.
The DCS for ATLAS experiment has been designed in such a way that the user can navigate through the B-sensor colormap (Figure 9), the MDM list, a sector, an MDM and finally a sensor ( Figure 10). The development of the DCS also reflects the information propagation like data field and states from one panel to the other.

Conclusions
In conclusion, commissioning of NSW side A B-field modules has been successful and commissioning for NSW side C is currently in progress. Thus the number of final functioning B-sensor modules for ATLAS experiment is not available.
Finally, in respect to the ATLAS experiment DCS, since the calibration mechanism of the ADC values is not yet available, the ADC values are being updated through a simulation mechanism of random numbers. The copy-mechanism for the datapoints is still under development to fully replace the simulated values. However, any mechanism that updates the project datapoints does not interfere with the GUI and operation of the DCS and thus it's functionality is unaffected and successfully tested.

Appendix A. Physics of Hall Effect Sensors
The Hall effect can be understood by basic principles of electromagnetism. The Lorentz force exerted on a charged particle is: Figure A1: Representation of the Hall Voltage in a metal with current in the x direction.
In this example, ⃗ E = (E x , 0, 0), ⃗ v = (v x , 0, 0) and ⃗ B = (0, 0, B z ) and thus: Equation A.2 shows two effects happening at the same time: charge carriers are forced both to the x direction by V x and to the y direction by ⃗ B. Although the magnetic field forces them to the one side of the plate, this process is self-limiting, because the excess concentration of charges to one side and consequent depletion on the other gives rise to an electric field E H accros the transducer. This field causes the carriers to try to redistribute themselves evenly and simultaneously gives rise to a voltage V H that can be measured across the plate. Thus at the y direction after equilibrium: and therefore Integrating the Hall electric field over w, assuming it is uniform, gives us the Hall Voltage: The current computation gives I = ndw(−v x )(−e) where n is the charge carrier density and dw is the cross-sectional area. Plugging I into equation A.5: For the complete measurement, a module with three plates in x, y and z direction can therefore measure all components of a given magnetic field in space. [9] HEP