{'fraction_non_alphanumeric': 0.021589273539883342, 'fraction_numerical': 0.0056813877736535115, 'mean_word_length': 5.069885057471264, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
The ATLAS Detector Control System

The ATLAS experiment is one of the multi-purpose experiments at the Large Hadron Collider (LHC) at CERN, constructed to study elementary particle interactions in collisions of high-energy proton beams. Twelve different sub detectors as well as the common experimental infrastructure are controlled and monitored by the Detector Control System (DCS) using a highly distributed system of 140 server machines running the industrial SCADA product PVSS. Higher level control system layers allow for automatic control procedures, efficient error recognition and handling, manage the communication with external systems such as the LHC controls, and provide a synchronization mechanism with the ATLAS data acquisition system. Different databases are used to store the online parameters of the experiment, replicate a subset used for physics reconstruction, and store the configuration parameters of the systems. This contribution describes the computing architecture and software tools to handle this complex and highly interconnected control system.

Abstract. The ATLAS experiment is one of the multi-purpose experiments at the Large Hadron Collider (LHC) at CERN, constructed to study elementary particle interactions in collisions of high-energy proton beams. Twelve different sub detectors as well as the common experimental infrastructure are controlled and monitored by the Detector Control System (DCS) using a highly distributed system of 140 server machines running the industrial SCADA product PVSS. Higher level control system layers allow for automatic control procedures, efficient error recognition and handling, manage the communication with external systems such as the LHC controls, and provide a synchronization mechanism with the ATLAS data acquisition system. Different databases are used to store the online parameters of the experiment, replicate a subset used for physics reconstruction, and store the configuration parameters of the systems. This contribution describes the computing architecture and software tools to handle this complex and highly interconnected control system.

Introduction
The ATLAS experiment [1] is one of the general purpose detectors at the Large Hadron Collider (LHC) at CERN near Geneva, Switzerland. It is designed to study elementary particle interactions in high energy proton proton collisions. With a length of 44 m and a diameter of 25 m it is the largest of the experiments. It has a weight of 7000 t and 100.000.000 readout channels. The ATLAS detector is built from 12 individual sub detectors, with the potential to be operated independently, and all serving a designated purpose for the combined operation. The task of the detector control system is the control and monitoring of ATLAS, its sub detectors and the technical infrastructure in a coherent and safe way. The DCS must bring the detector into any desired operational state, continuously monitor and archive the operational parameters, signal any abnormal behavior. In addition, ATLAS DCS must serve as a homogeneous interface to all sub-detectors and the technical infrastructure of the experiment. Finally, the DCS has to handle the communication to other systems which are controlled independently, such as the LHC accelerator, the CERN technical services, the ATLAS magnets and the Detector Safety System (DSS). A more detailed description of the complete ATLAS DCS and specific sub-detector control system hardware and software can be found in [2], [1] and references therein.

Overall System Architecture
The detector control system for the ATLAS detector was designed and implemented within the frame of the Joint Controls Project (JCOP) [4], a collaboration of the CERN controls group and DCS teams of the LHC experiments. Standards for DCS hardware and software were established together with implementation policies both, commonly for JCOP and specifically for ATLAS. This includes field buses, protocols, and the common SCADA, PVSS II. The aim of a common approach is to reduce the manpower needed for development and maintenance.
The DCS architecture can be divided in front end (FE) and back end (BE): The front end encompasses the DCS hardware, such as power supplies, environmental sensors, or cooling circuits. The back end designates the software used to integrate front end controls. the industrial Supervisory Controls And Data Acquisition (SCADA) product PVSS serves as base software, with the software components of the JCOP framework facilitating the integration of standard hardware devices and the implementation of homogeneous controls applications.
The BE is organized in three layers (see Fig. 1): The local back end is responsible for the connection of the sub system front end and its readout. This is located on the local control stations (LCS). The second layer consists of process control of subsystems with a single sub detector control station (SCS) allowing its stand-alone operation. Global control stations are running service applications and operator interfaces, and provide the integration of the sub detectors into the common ATLAS DCS.
The ATLAS detector control system is a distributed system of more than hundred stations run in a private network, based on control applications developed by the different sub systems and is based on the event driven processing of more than 10.000.000 data elements. A coherent integration must be guaranteed.

The Front End
The requirements for the DCS front end hardware comprise items such as low cost, low power consumption, and high I/O channel density. Electronics in the detector cavern have to allow for remote firmware upgrades, be insensitive to magnetic fields, and be tolerant to radiation exposure expected during the experiment lifetime. For equipment interconnection, the CAN industrial field-bus and the CANopen protocol is used wherever possible and appropriate.  Besides a number of commercial power supplies that are in use in the ATLAS experiment, custom design devices are most often interfaced to the DCS using the Embedded Local Monitoring Board (ELMB).
The ELMB was developed as a common low cost I/O device [3]. It provides 64 analog and 24 digital channels at a size of 50x67 mm 2 , an 8 bit 4 MHz micro controller and a CAN bus interface. It is tolerant to strong magnetic fields and radiation hard for integrated doses up to 50 Gy. Furthermore, the ELMB can be embedded within custom designs and has a modular, remotely extendable firmware with a general purpose CANopen I/O application. More than 10000 ELMBs are in use within all LHC experiments, over 5000 alone within ATLAS.

The Back End
The hardware platform for the BE system are industrial, rack-mounted server machines. Two different standard machine types, one for applications requiring good I/O capability, a second for processing-intensive applications with I/O via Ethernet connectivity. Both models feature redundant, hot-swappable power supplies and disk shadowing.
The SCADA (Supervisory Control and Data Acquisition) system used as a base of the detector control software is PVSS. It was chosen for its scalability, platform independence, adaptability and support of many industrial standards among other things. Individual Control Systems can be connected via LAN to form a "distributed system", well suited for ATLAS DCS with the base of potentially independently operated sub detectors. PVSS provides a built in alarm mechanism, with configurable levels for each input value, and the possibility to mask known alarms or require acknowledgement.
As an interface between the front end devices and the SCADA, the OPC standard is used as the main solution. Commercial equipment manufacturers as well as developers of custom devices provide the OPC servers for which PVSS provides an OPC client. For the ELMB CAN bus readout and control, a dedicated CANopen OPC server has been developed. Device types for which OPC could not be used due to maintenance or platform constraints (OPC is limited to MS Windows TM ), custom readout applications were interfaced to PVSS using the CERN standard middle-ware DIM [5]. Custom drivers are in use for some of the sub systems. PLCs are interfaced to PVSS via Mod-Bus.
The JCOP framework provides guidelines, components and tools. A generic, platformindependent, and object-oriented implementation of a state machine toolkit for a highly distributed environment, interfaced to a PVSS control application is provided. The hierarchical structure of the control systems can be modeled by the software, with a well defined set of states, commands and transitions (see also section 6).

Data Storage
The availability of historical DCS values allows to monitor and diagnose the state of the detector and DCS hardware and monitor the evolution of detector conditions. Part of these values measured by the detector control system are used for physics data reconstruction. To store these values, relational data bases are used. These DCS data can be accessed directly from PVSS via the online DB, made available to the operator visualized in trends, or offline from the Oracle databases. In order to provide direct and easy access to the PVSS Oracle archive to collaboration members, a dedicated web-based data viewer (DCS Data Viewer: DDV) was developed [7]. Due to its generic and modular approach, DDV can be easily used for other experiment control systems that archive data using PVSS. The subset of data that is relevant to physics analysis is replicated to a dedicated Conditions Database, accessable directly by the physics reconstruction software.

Operations
The safe operation of the ATLAS detector control system by a small shift crew requires safe transitions between well defined operational states and the quick recognition and response to error conditions. The operation of the ATLAS detector is based on a finite state machine using the JCOP toolkit introduced in section 4 in conjunction with the PVSS alarm screen. The complete DCS BE is mapped onto a hierarchy of Finite State Machine (FSM) elements using the FSM toolkit. State changes are propagated upwards and commands downwards in the hierarchy allowing for the operation of the complete detector by means of a single FSM object at the top level. For the top levels of the hierarchy, a fixed state model (see Fig. 2) is applied. It reflects conditions optimal for physics data taking (READY), for unstable beam conditions (STANDBY), or an unpowered detector (SHUTDOWN). Compromised conditions are signalled by the NOT READY state, transient ones by TRANSITION. The state UNKNOWN is used when the actual condition cannot be verified. On lower level nodes, additional states reflecting subdetector specific conditions are permitted. The actual state of these logical objects is determined by the states of the associated lower level objects (children) via state rules.
For critical parameters, alarms can be configured and are classified into one of the severity Warning, Error, or Fatal. To avoid the accumulation of a large number of alarms on the user interface, a masking functionality has been added to hide past occurrences e.g. after a follow up has been initiated.
Each FSM object in the lowest hierarchy level has an attribute called Status which assumes the highest severity of alarms active for the respective device. The Status is then propagated up in the FSM hierarchy and thus allows for error recognition within the top layers of the detector tree and permits to identify problematic devices. To reduce the probability of operational errors, automatic routines are introduced wherever possible. One of these categories is e.g. the interaction with the LHC, signalling or initiating a safe detector state for beam injection or beam adjust mode. The data exchange between the ATLAS DCS and external control systems is handled via a dedicated, DIM-based data exchange protocol. All external control systems are homogeneously interfaced to the ATLAS DCS using dedicated DCS Information Servers. A generic data integrity monitoring has been implemented signaling any error condition related to the data quality and availability for the more than 20 different providers.

Outlook
The detector control system has been proven very reliable during operation. Nevertheless, continous consolidation, like the automation of routine maintenance tasks or the handling of recurring failure modes is to guarantee this also for the future. Limitations in lifetime, like the DCS control stations, or technology like PCI bus for hardware interface cards requires consolidation on the hardware side. Finally, the planned upgrades of the LHC for higher luminosity include the necessity of upgrades also on the detector and the control system side. On the one hand this is defined by more stringent requirements for e.g. radiation hardness of on detector components. Addressing this issue, the ELMB++ [8] is intended as successor for the ELMB. But also the upgraded detectors require an upgrade of the control system handling their operation. The first of these upgrades is planned for the long shutdown 2012/13 and will be an additional innermost barrel layer for the Pixel Detector.